機械翻訳について

closeCommEvent

このアクションでは、コール/拒否シナリオがある場合にユーザーが公開する必要があります。

たとえば、エージェントがコール通知で「辞退」をクリックすると、CTI統合コード・ベースは、同じサブスクリプションが追加されている場合、コマンドが'decline'のonAgentInteractionCommandイベントの通知を受け取ります(同じ例については、onAgentInteractionCommandの例を参照してください)。

現在、コール拒否コマンドの通知を取得すると、CTI統合はcloseCommEvent操作を公開する必要があります。この操作により、CTIがonOutgoingEventのイベント通知を取得したときに、CTIがそのコールを拒否する場合は、closeCommEventパブリッシュAPIをコールする必要があります。

ノート: closeCommEvent操作リクエストに渡す必要があるinDataパラメータは、newCommEvent操作レスポンスで取得されるoutDataレスポンスと一致している必要があります。 closeComm inDataリクエストのsetReason APIを使用すると、ユーザーはcloseCommEvent操作の理由を設定できます(たとえば、理由はMISSED、REJECT、WRAPUPなど)。

closeCommEvent操作をコールするTypescriptの例を次に示します。

/// <reference path="uiEventsFramework.d.ts"/>     
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
    const multiChannelAdaptorContext: IMultiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
    const phoneContext: IPhoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE');
    const request: IMcaCloseCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('closeCommEvent') as IMcaCloseCommEventActionRequest;
    // You should set correct appClassification here. eg: ORA_SERVICE for Service App
	// Refer https://docs.oracle.com/en/cloud/saas/fusion-service/fairs/application-classification-code.html#s20059918 for the list of supported app classifications
    request.setAppClassification('appClassfication');
    request.setEventId('1'); // Set the event ID here
    // request.setInputData(_inboundData);// _inboundData of type - IMcaStartCommInData
    request.setReason('WRAPUP'); // Specify the reason
    const inData = request.getInData();
    phoneContext.publish(request).then((res: IOperationResponse) => {
        const response = res as IMcaCloseComActionResponse
    }).catch(() => {
    })     

closeCommEvent操作をコールするJavaScriptの例を次に示します。

const uiEventsFrameworkInstance = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('appname', 'v1');
const multiChannelAdaptorContext = await uiEventsFrameworkInstance.getMultiChannelAdaptorContext();
const phoneContext = await multiChannelAdaptorContext.getCommunicationChannelContext('PHONE');
const request = uiEventsFrameworkInstance.requestHelper.createPublishRequest('closeCommEvent');
// You should set correct appClassification here. eg: ORA_SERVICE for Service App
// Refer https://docs.oracle.com/en/cloud/saas/fusion-service/fairs/application-classification-code.html#s20059918 for the list of supported app classifications
request.setAppClassification('appClassfication');
request.setEventId('1'); // Set the event ID here
// request.setInputData(_inboundData);// _inboundData of type - IMcaStartCommInData
request.setReason('WRAPUP'); // Specify the reason
const inData = request.getInData();
phoneContext.publish(request).then((res) => {
}).catch(() => {
})