機械翻訳について

着信コールの処理

このシナリオは4つの状態に分けることができます。

  1. コールを受信しました
  2. Fusionからコールが受け入れられました
  3. Fusionからコールが拒否されました
  4. Fusionから切断されたコール

コールを受信しました

この状態では、顧客がサービス・センター番号をコールしており、電話回線が鳴っています。

リングが受信したシナリオを示す図。

このシナリオは次のようになります:
  1. コールが最初にCTIサプライヤによって受信され、着信コールがあることをパートナ・アプリケーションに通知します。
  2. パートナ・アプリケーションは、newCommEventアクションを起動して、着信コールをFusionアプリケーションに通知します。

    パートナ・アプリケーションから次のコードを実行して、newCommEventアクションを起動できます:

    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const requestObject: IMcaNewCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('newCommEvent')  as IMcaNewCommEventActionRequest;
    // Set request object properties
    requestObject.setEventId('1');
    requestObject.getInData().setInDataValueByAttribute('SVCMCA_ANI', phoneNumber);
    requestObject.getInData().setInDataValueByAttribute("SVCMCA_COMMUNICATION_DIRECTION", "ORA_SVC_INBOUND");
    requestObject.setAppClassification('ORA_SERVICE');
    
    // Step 3: Invoke the API
    phoneContext.publish(requestObject).then((operationResponse: IMcaNewComActionResponse) => {
        // Custom logic for handling the partner application UI
    }).catch(() => {
    })
  3. Fusionアプリケーションは、このアクションを識別すると、担当者番号の検索を実行し、アクション・レスポンスの担当者詳細を返します。
  4. 最後に、Fusionアプリケーションは、ダイアログ・ボックスを介した着信コールについてエージェントに通知します。
  5. この時点で、エージェントはコールに応答するか拒否できます。

Fusionからコールが受け入れられました

このシナリオでは、エージェントは「回答」ボタンをクリックして、コールを受け入れます。コールが受け入れられたシナリオを示す図。

  1. エージェントがFusionアプリケーションの「回答」ボタンをクリックすると、onToolbarInteractionCommandイベントがコマンドにacceptとして起動されます。

    onToolbarInteractionCommandイベントをリスニングするコードを次に示します。 このコードは、パートナ・アプリケーションから実行して、onToolbarInteractionCommandイベントをサブスクライブできます:

    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const requestObject: IMcaEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('onToolbarInteractionCommand') as IMcaEventRequest;
    
    // Step 3: Invoke the API
    phoneContext.subscribe(requestObject, (eventResponse: IMcaOnToolbarInteractionCommandEventResponse) => {
    	const eventResponseDetails: IMcaOnToolbarInteractionCommandDataResponse = eventResponse.getResponseData();
    	const command: string = eventResponseDetails.getCommand();
        switch (command) {
            case "accept":
                // Notify CTI Vendor to accept the call
                break;
            case "disconnect":
                // Notify CTI Vendor to disconnect the call
                break;
            case "reject":
                // Notify CTI Vendor to disconnect the call
                break;
            }
    }).catch(() => {
    })
  2. パートナ・アプリケーションは、このイベントを受信し、イベントがコールを受理する場合、パートナ・アプリケーションは、CTIサプライヤにコールを受理するように通知します。
  3. CTIサプライヤがパートナ・アプリケーションにコールの受入れを通知すると、パートナ・アプリケーションは startCommEventアクションを起動できます。

    パートナ・アプリケーションから次のコードを実行して、startCommEvent アクションを起動できます:

    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const request: IMcaStartCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('startCommEvent') as IMcaStartCommEventActionRequest;
    request.setAppClassification('ORA_SERVICE');
    request.setEventId('1');
    
    // Step 3: Invoke the API
    phoneContext.publish(request).then((operationResponse: IMcaStartComActionResponse) => {
    	// Extract the required data from response and use for updating the partner app
        const contactName: string = operationResponse.getResponseData().getData()['SVCMCA_CONTACT_NAME'];   // sample for getting the contact name
    }).catch(() => {
    });
  4. Fusionアプリケーションでこのアクションが識別されると、一致した担当者とエンゲージメント・パネルは、スクリーン・ポップのFusion構成管理で構成されたルールに基づいて開きます。

Fusionからコールが拒否されました

このシナリオでは、エージェントは「拒否」ボタンをクリックしてコールを拒否します。

コールが拒否されたシナリオを示す図
  1. エージェントがFusionアプリケーションの「回答」ボタンをクリックすると、onToolbarInteractionCommandイベントが起動され、コマンドが拒否されます。
    パートナ・アプリケーションから次のコードを実行して、onToolbarInteractionCommandイベントをサブスクライブできます:
    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const requestObject: IMcaEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('onToolbarInteractionCommand') as IMcaEventRequest;
    
    // Step 3: Invoke the API
    phoneContext.subscribe(requestObject, (eventResponse: IMcaOnToolbarInteractionCommandEventResponse) => {
    	const eventResponseDetails: IMcaOnToolbarInteractionCommandDataResponse = eventResponse.getResponseData();
    	const command: string = eventResponseDetails.getCommand();
        switch (command) {
            case "accept":
                // Notify CTI Vendor to accept the call
                break;
            case "disconnect":
                // Notify CTI Vendor to disconnect the call
                break;
            case "reject":
                // Notify CTI Vendor to disconnect the call
                break;
            }
    }).catch(() => {
    })
  2. パートナ・アプリケーションは、このイベントを受信し、イベントがコールを拒否する場合、パートナ・アプリケーションは、CTIサプライヤにコールを拒否するように通知します。
  3. CTIサプライヤがパートナ・アプリケーションにコールが拒否されたことを通知すると、パートナ・アプリケーションは closeCommEventアクションをREJECTとして起動できます。

    パートナ・アプリケーションから次のコードを実行して、closeCommEventアクションを起動できます:

    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const requestObject: IMcaNewCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('closeCommEvent') as IMcaCloseCommEventActionRequest;
    // Set request object properties, in this scenario we need to set the reason as reject
    requestObject.setReason("REJECT");
    
    // Step 3: Invoke the API
    phoneContext.publish(requestObject).then((operationResponse: IMcaCloseComActionResponse) => {
        console.log('closeCommEvent fired', operationResponse);
    }).catch(() => {
    })
  4. Fusionアプリケーションがこのアクションを識別すると、コール・ダイアログ・ボックスはUIから破棄されます。

Fusionから切断されたコール

このシナリオでは、会話が完了すると、エージェントはFusionの「コールの終了」ボタンをクリックします。

コール切断のシナリオを示す図。

  1. エージェントがFusionアプリケーションの「コールの終了」ボタンをクリックすると、onToolbarInteractionCommandイベントが切断コマンドで起動されます。

    パートナ・アプリケーションから次のコードを実行して、onToolbarInteractionCommandイベントをサブスクライブできます:

    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const requestObject: IMcaEventRequest = uiEventsFrameworkInstance.requestHelper.createSubscriptionRequest('onToolbarInteractionCommand') as IMcaEventRequest;
    
    // Step 3: Invoke the API
    phoneContext.subscribe(requestObject, (eventResponse: IMcaOnToolbarInteractionCommandEventResponse) => {
    	const eventResponseDetails: IMcaOnToolbarInteractionCommandDataResponse = eventResponse.getResponseData();
    	const command: string = eventResponseDetails.getCommand();
        switch (command) {
            case "accept":
                // Notify CTI Vendor to accept the call
                break;
            case "disconnect":
                // Notify CTI Vendor to disconnect the call
                break;
            case "reject":
                // Notify CTI Vendor to disconnect the call
                break;
            }
    }).catch(() => {
    })
  2. パートナ・アプリケーションは、このイベントを受信し、イベントがコールを切断する場合、パートナ・アプリケーションは、CTIサプライヤにコールの切断を通知します。
  3. CTIサプライヤがパートナ・アプリケーションにコールが切断されたことを通知すると、パートナ・アプリケーションはcloseCommEventアクションを起動できます。
    // Step 1: Get the proper context
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE') as IPhoneContext;
    
    // Step 2: Create the request object
    const requestObject: IMcaNewCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('closeCommEvent') as IMcaCloseCommEventActionRequest;
    // Set request object properties
    requestObject.setReason("WRAPUP");
    
    // Step 3: Invoke the API
    phoneContext.publish(requestObject).then((operationResponse: IMcaCloseComActionResponse) => {
        console.log('closeCommEvent fired', operationResponse);
    }).catch(() => {
    })
  4. Fusionアプリケーションは、このアクションを識別すると、UIにラップ・アップ・ウィンドウをレンダリングします。