onNewInteraction
このハンドラーは、エージェントデスクトップアプリケーションにおいて、現在利用可能なエージェントに新規のインタラクションが接続された際に発信されます。
リクエスト
構文
| on('ON_NEW_INTERACTION', handler: OnNewInteractionHandler): void
interactionId: string 状態: InteractionState タイプ: InteractionType 件名: string 関連オブジェクト: InteractionAssociatedObjectsData コールパーティ: CallParty[] callMuted: boolean callRecording: boolean attachedData: AttachedData phoneNumber?: string メール?: string callDirection?: CallDirection startTime?: number 終了時刻?: number duration?: number 説明?: string disposition?: string グローバルインタラクションID?: string サービス?: string 再生URL?: string 録音URL?: string DNIS?: string ANI?: string origination?: InteractionOrigination } type InteractionOrigination = "dialpad" | "dialpad-search" | "ディレクトリ" | "履歴" | "お気に入り" | "ワークアイテム" | "インターアクション" | "連絡先プロフィール" | "ヘルプ" | "会議" | "auto" | "integration-api" type InteractionType = "音声" | "チャット" | "メール" type InteractionState = "不明" | "キューに追加された状態" | "ivr" | "wrap_up" | "wrap_up_hold" | "delivered" | "delivery_pending" | "hold" | "完了" type CallDirection = "インバウンド" | "アウトバンド" type CallParty = { id: string 名前: string 電話: string userId?: string } |
パラメータ
| パラメータ | パラメータ値 | データ型 | オプション/必須 | 説明 |
| interaction | ||||
| 入力 | 文字列 | 必須 | インタラクションの種類を示します。認識される種類は以下の通りです:
| |
| agentId | 文字列 | 必須 | エージェントのid | |
| interactionId | 文字列 | 必須 | インタラクションのid | |
| globalInteractionId | 文字列 | オプション | インタラクションのグローバルインタラクション id (GIID) | |
| サービス | 文字列 | オプション | そのインタラクションに関連するサービスの名前 | |
| callParties | 文字列 | 必須 | 通話参加者のリストを提供します。なお、これは type が「音声」であるインタラクションに適用されます。 詳細:
| |
| callMuted | ブール値 | 必須 | true に設定するとコールのミュートが有効になり、false に設定するとコールのミュートが有効になりません。なお、コール以外のインタラクションでは常に false となります。 | |
| callRecording | ブール値 | 必須 | true に設定すると、通話録音機能が有効になります。false に設定すると、通話録音機能は無効になります。なお、通話以外の操作については、常に false に設定されます。 | |
| disposition | 文字列 | オプション | このインタラクションの処理結果カテゴリーの名前 | |
| recordingUrl | 文字列 | オプション | 通話録音のURLです。なお、これはタイプが'「音声」であるインタラクションに適用されます。 | |
| callDirection | 文字列 | オプション | コールのタイプです。認識される方向は以下の通りです:
なお、これはtypeが「音声」であるインタラクションに適用されます。 | |
| DNIS | 文字列 | オプション | ダイヤル番号認識サービス (DNIS)です。なお、これはタイプが「音声」であるインタラクションに適用されます。 | |
| transferANI | ? | オプション | 転送時の自動番号識別(ANI)です。なお、これはタイプが「音声」のインタラクションに適用されます。 | |
| phoneNumber | 文字列 | オプション | 受信先の電話番号です。なお、これは音声タイプのインタラクションに適用されます。 | |
| startTime | 数値 | オプション | インタラクションの開始日時 | |
| endTime | 数値 | オプション | インタラクションの終了日時 | |
| duration | 数値 | オプション | インタラクションの duration(秒単位) | |
| 発生元 | 文字列 | オプション | インタラクションがどのように開始されたかを示します。あらかじめ定義された値のリストがあります。 |
リクエスト例
const interactionsList: InteractionData[] = [];
function newInteractionCallback(data: InteractionData) {
interactionsList.push(data);
}
adApi.on("ON_NEW_INTERACTION", newInteractionCallback);
戻り値
null