提供: Bright Pattern Documentation
• English
onNewInteraction
このハンドラーは、エージェントデスクトップアプリケーションにおいて、現在利用可能なエージェントに新規のインタラクションが接続された際に呼び出されます。
リクエスト
構文
| on('ON_NEW_INTERACTION', handler: OnNewInteractionHandler): void
interactionId: string state: InteractionState type: InteractionType subject: string associatedObjects: InteractionAssociatedObjectsData callParties: CallParty[] callMuted: boolean callRecording: boolean attachedData: AttachedData phoneNumber?: string email?: string callDirection?: CallDirection startTime?: number endTime?: number duration?: number description?: string disposition?: string globalInteractionId?: string service?: string playbackUrl?: string recordingUrl?: string DNIS?: string ANI?: string origination?: InteractionOrigination } type InteractionOrigination = "dialpad" | "dialpad-search" | "directory" | "recent" | "favorites" | "workitem" | "interaction" | "contact-profile" | "help" | "conference" | "auto" | "integration-api" type InteractionType = "voice" | "chat" | "email" type InteractionState = "unknown" | "queued" | "ivr" | "wrap_up" | "wrap_up_hold" | "delivered" | "delivery_pending" | "hold" | "completed" type CallDirection = "inbound" | "outbound" type CallParty = { id: string name: string phone: string userId?: string } |
パラメータ
| パラメータ | パラメータ値 | データ型 | オプション/必須 | 説明 |
| interaction | ||||
| type | 文字列 | 必須 | インタラクションの種類を示します。認識される種類は以下の通りです:
| |
| agentId | 文字列 | 必須 | エージェントのID | |
| interactionId | 文字列 | 必須 | インタラクションのID | |
| globalInteractionId | 文字列 | オプション | インタラクションのグローバルインタラクションID(GIID) | |
| service | 文字列 | オプション | そのインタラクションに関連するサービスの名前 | |
| callParties | 文字列 | 必須 | 通話参加者のリストを提供します。なお、これは type が"voice"であるインタラクションに適用されます。 詳細:
| |
| callMuted | ブール値 | 必須 | true に設定するとコールがミュートされ、false に設定するとコールはミュートされません。なお、コール以外のインタラクションでは常に false となります。 | |
| callRecording | ブール値 | 必須 | true に設定すると、通話録音が有効になります。false に設定すると、通話録音は無効になります。なお、通話以外のインタラクションでは、常に false に設定されます。 | |
| disposition | 文字列 | オプション | このインタラクションの処理結果(ディスポジション)カテゴリーの名前 | |
| recordingUrl | 文字列 | オプション | 通話録音のURLです。なお、これはtypeが"voice"であるインタラクションに適用されます。 | |
| callDirection | 文字列 | オプション | コールのタイプです。認識される方向は以下の通りです:
なお、これはtypeが"voice"であるインタラクションに適用されます。 | |
| DNIS | 文字列 | オプション | ダイヤル番号認識サービス(DNIS)です。なお、これはtypeが"voice"であるインタラクションに適用されます。 | |
| transferANI | ? | オプション | 転送時の自動番号識別(ANI)です。なお、これはtypeが"voice"であるインタラクションに適用されます。 | |
| phoneNumber | 文字列 | オプション | 着信先の電話番号です。なお、これはtypeが"voice"であるインタラクションに適用されます。 | |
| startTime | 数値 | オプション | インタラクションの開始日時 | |
| endTime | 数値 | オプション | インタラクションの終了日時 | |
| duration | 数値 | オプション | インタラクションの持続時間(秒単位) | |
| origination | 文字列 | オプション | インタラクションがどのように開始されたかを示します。あらかじめ定義された値のリストがあります。 |
リクエスト例
const interactionsList: InteractionData[] = [];
function newInteractionCallback(data: InteractionData) {
interactionsList.push(data);
}
adApi.on("ON_NEW_INTERACTION", newInteractionCallback);
戻り値
null