# Fdc3Api

Canonical page: https://www.adaptabletools.com/docs/reference/fdc3api

FDC3 intents and context raised from a grid row, and checks for standard FDC3 types.

```ts title="TypeScript"
export interface Fdc3Api 
```

## Methods

| Method | Returns | Description |
| --- | --- | --- |
| [broadcastFromPrimaryKey(primaryKeyValue, contextType, channel)](https://www.adaptabletools.com/docs/reference/fdc3api.md#broadcastfromprimarykey) | `Promise<void> \| undefined` | Broadcasts the given Context from the given Row Node with the given Primary Key Value |
| [broadcastFromRow(rowNode, contextType, channel)](https://www.adaptabletools.com/docs/reference/fdc3api.md#broadcastfromrow) | `Promise<void>` | Broadcasts the given Context from the given Row Node |
| [buildContextDataForPrimaryKey(contextType, primaryKeyValue)](https://www.adaptabletools.com/docs/reference/fdc3api.md#buildcontextdataforprimarykey) | `Context \| undefined` | Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value |
| [buildContextDataFromRow(contextType, rowNode)](https://www.adaptabletools.com/docs/reference/fdc3api.md#buildcontextdatafromrow) | `Context` | Builds FDC3 Context Data based on the given Context Type and Row Node |
| [getContextLabel(contextType)](https://www.adaptabletools.com/docs/reference/fdc3api.md#getcontextlabel) | `string` | Returns the human-friendly label for the given Context Type |
| [getDesktopAgent()](https://www.adaptabletools.com/docs/reference/fdc3api.md#getdesktopagent) | `DesktopAgent` | Returns the FDC3 Desktop Agent |
| [isStandardContextType(contextType)](https://www.adaptabletools.com/docs/reference/fdc3api.md#isstandardcontexttype) | `boolean` | Whether this context type is one of the FDC3 standard types. |
| [isStandardIntentType(intentType)](https://www.adaptabletools.com/docs/reference/fdc3api.md#isstandardintenttype) | `boolean` | Whether this intent is one of the FDC3 standard intents. |
| [raiseIntentForContextFromPrimaryKey(primaryKeyValue, contextType, appIdentifier)](https://www.adaptabletools.com/docs/reference/fdc3api.md#raiseintentforcontextfromprimarykey) | `Promise<IntentResolution> \| undefined` | Finds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value |
| [raiseIntentForContextFromRow(rowNode, contextType, appIdentifier)](https://www.adaptabletools.com/docs/reference/fdc3api.md#raiseintentforcontextfromrow) | `Promise<IntentResolution>` | Finds and raises an Intent based on the given Context from the given Row Node |
| [raiseIntentFromPrimaryKey(primaryKeyValue, intent, contextType, appIdentifier)](https://www.adaptabletools.com/docs/reference/fdc3api.md#raiseintentfromprimarykey) | `Promise<IntentResolution> \| undefined` | Raises an Intent with the given Context from the given Row Node with the given Primary Key Value |
| [raiseIntentFromRow(rowNode, intent, contextType, appIdentifier)](https://www.adaptabletools.com/docs/reference/fdc3api.md#raiseintentfromrow) | `Promise<IntentResolution>` | Raises an Intent with the given Context from the given Row Node |

## Method Details

### broadcastFromPrimaryKey

Broadcasts the given Context from the given Row Node with the given Primary Key Value

```ts title="TypeScript"
broadcastFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, channel?: Channel): Promise<void> | undefined;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| primaryKeyValue | `string \| number` | The Primary Key Value |
| contextType | `ContextType` | The FDC3 Context Type |
| channel | `Channel` | (optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to |

###### Returns

 Broadcasts the given Context from the given Row Node with the given Primary Key Value

`Promise<void> | undefined`

### broadcastFromRow

Broadcasts the given Context from the given Row Node

```ts title="TypeScript"
broadcastFromRow(rowNode: IRowNode, contextType: ContextType, channel?: Channel): Promise<void>;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| rowNode | `IRowNode` | The Row Node |
| contextType | `ContextType` | The FDC3 Context Type |
| channel | `Channel` | (optional) Channel to broadcast to; if not provided, the Context will be broadcast to whatever User Channel the app is joined to |

###### Returns

`Promise<void>`

### buildContextDataForPrimaryKey

Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value

```ts title="TypeScript"
buildContextDataForPrimaryKey(contextType: ContextType, primaryKeyValue: string | number): Context | undefined;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| contextType | `ContextType` | The FDC3 Context Type |
| primaryKeyValue | `string \| number` | The Primary Key Value |

###### Returns

 Builds FDC3 Context Data based on the given Context Type and the Row Node with the given Primary Key Value

`Context | undefined`

### buildContextDataFromRow

Builds FDC3 Context Data based on the given Context Type and Row Node

```ts title="TypeScript"
buildContextDataFromRow(contextType: ContextType, rowNode: IRowNode): Context;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| contextType | `ContextType` | The FDC3 Context Type |
| rowNode | `IRowNode` | The Row Node |

###### Returns

 Builds FDC3 Context Data based on the given Context Type and Row Node

`Context`

### getContextLabel

Returns the human-friendly label for the given Context Type

```ts title="TypeScript"
getContextLabel(contextType: ContextType): string;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| contextType | `ContextType` | The FDC3 Context Type |

###### Returns

 The human-friendly label for the given Context Type

`string`

### getDesktopAgent

Returns the FDC3 Desktop Agent

```ts title="TypeScript"
getDesktopAgent(): DesktopAgent;
```

###### Returns

 The FDC3 Desktop Agent

`DesktopAgent`

### isStandardContextType

Whether this context type is one of the FDC3 standard types.

```ts title="TypeScript"
isStandardContextType(contextType: string): boolean;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| contextType | `string` | Context type to check, for example `fdc3.instrument` |

###### Returns

 `true` when this context type is one of the FDC3 standard types

`boolean`

### isStandardIntentType

Whether this intent is one of the FDC3 standard intents.

```ts title="TypeScript"
isStandardIntentType(intentType: string): boolean;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| intentType | `string` | Intent to check, for example `ViewChart` |

###### Returns

 `true` when this intent is one of the FDC3 standard intents

`boolean`

### raiseIntentForContextFromPrimaryKey

Finds and raises an Intent based on the given Context from the given Row Node with the given Primary Key Value

```ts title="TypeScript"
raiseIntentForContextFromPrimaryKey(primaryKeyValue: string | number, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| primaryKeyValue | `string \| number` | The Primary Key Value |
| contextType | `ContextType` | The FDC3 Context Type |
| appIdentifier | `AppIdentifier` | The App Identifier |

###### Returns

 The intent resolution, or `undefined` when the row cannot be found

`Promise<IntentResolution> | undefined`

### raiseIntentForContextFromRow

Finds and raises an Intent based on the given Context from the given Row Node

```ts title="TypeScript"
raiseIntentForContextFromRow(rowNode: IRowNode, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| rowNode | `IRowNode` | The Row Node |
| contextType | `ContextType` | The FDC3 Context Type |
| appIdentifier | `AppIdentifier` | The App Identifier |

###### Returns

 The intent resolution from the app that handled it

`Promise<IntentResolution>`

### raiseIntentFromPrimaryKey

Raises an Intent with the given Context from the given Row Node with the given Primary Key Value

```ts title="TypeScript"
raiseIntentFromPrimaryKey(primaryKeyValue: string | number, intent: Intent, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution> | undefined;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| primaryKeyValue | `string \| number` | The Primary Key Value |
| intent | `Intent` | The FDC3 Intent |
| contextType | `ContextType` | The FDC3 Context Type |
| appIdentifier | `AppIdentifier` | The App Identifier |

###### Returns

 Raises an Intent with the given Context from the given Row Node with the given Primary Key Value

`Promise<IntentResolution> | undefined`

### raiseIntentFromRow

Raises an Intent with the given Context from the given Row Node

```ts title="TypeScript"
raiseIntentFromRow(rowNode: IRowNode, intent: Intent, contextType: ContextType, appIdentifier?: AppIdentifier): Promise<IntentResolution>;
```

###### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| rowNode | `IRowNode` | The Row Node |
| intent | `Intent` | The FDC3 Intent |
| contextType | `ContextType` | The FDC3 Context Type |
| appIdentifier | `AppIdentifier` | The App Identifier |

###### Returns

 Raises an Intent with the given Context from the given Row Node

`Promise<IntentResolution>`
