提供: Bright Pattern Documentation
• English
転送
1件のインタラクションをコンサルテーションコールに転送します。
リクエスト
構文
| transfer(customTransferData?: CustomTransferData, mainCallId?: string, consultCallId?: string): Promise<OperationResult<null>> |
条件:
| type CustomTransferData = Record<string, string | number | boolean | undefined | null> |
パラメータ
| パラメータ | パラメータ値 | データ型 | オプション/必須 | 説明 |
| customTransferData | String | オプション | ここでは、受信者へのインタラクションと共に転送される任意のカスタムデータを定義できます。 | |
| mainCallId | String | オプション | 転送したいインタラクションのIDです。指定されていない場合は、アクティブなインタラクションが使用されます。 | |
| consultCallId | String | オプション | 転送先のコンサルテーションコールインタラクションのIDです。指定されていない場合は、アクティブなインタラクションに関連付けられたコンサルテーションコールが使用されます。 |
リクエスト例
transferButton.onclick = () => {
const mainItemId = mainItemIdInput.value
const consultCallId = consultCallIdInput.value
let transferData: any | null = null
try {
transferData = JSON.parse(transferDataTextarea.value)
} catch (e) {
alert('You have syntax error in the transfer data structure. Cannot parse JSON.')
}
adApi.transfer(transferData, mainItemId, consultCallId)
}
戻り値
null