EngagementContext
getEngagementContext APIをコールして、startCommEvent操作のレスポンスで取得するこのコンテキスト。
このオブジェクトは、新しいコール接続が確立されたtabContextをカプセル化します。つまり、ユーザーは、そのコール接続によって開かれているオブジェクトを制御できます。 getEngagementContext APIは、IMcaStartComActionResponseオブジェクトでgetResponseData APIをコールすることで、取得するオブジェクトであるIMcaStartComActionDataからコールできます。 IMcaStartComActionResponseオブジェクトは、StartCommEvent操作のレスポンスです。
構文
構文は次のとおりです:
                
            getEngagementContext(): IEngagementContext;EngagementContextにアクセスする方法のTypescriptの例を次に示します:
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') as IPhoneContext;
        const request: IMcaStartCommEventActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('startCommEvent') as IMcaStartCommEventActionRequest;
	    // 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
        const inData: IMcaStartCommInDataRequest = request.getInData();
        phoneContext.publish(request).then((res: IOperationResponse) => {
            const response: IMcaStartComActionResponse = res as IMcaStartComActionResponse;
            const startCommData: IMcaStartComActionData = response.getResponseData();
            const engagementContext: IEngagementContext = startCommData.getEngagementContext();
        })EngagementContextにアクセスする方法の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('startCommEvent');
// You should set correct appClassification here. eg: ORA_SERVICE for Service App
// Refer to Application Classification Code for the list of supported app classifications
request.setAppClassification('appClassfication');
request.setEventId('1'); // Set the event ID here
const inData = request.getInData();
phoneContext.publish(request).then((response) => {
    const startCommData = response.getResponseData();
    const engagementContext = startCommData.getEngagementContext();
})サポートされている操作
| メソッド名 | 説明 | 例 | 
|---|---|---|
| FeedLiveTranscript | この操作は、進行中の通話中にライブ・トランスクリプト・メッセージを追加するために使用します。 | FeedLiveTranscript | 
| FeedSystemMessage | この操作は、進行中の通話中にシステム・メッセージを追加するために使用します。 | FeedSystemMessage | 
サポートされているメソッド
| メソッド名 | 説明 | 例 | 
|---|---|---|
| getEngagementId | エンゲージメント・オブジェクトの一意のID。 | IEngagementContextのgetEngagementIdエントリを参照してください。 | 
| getTabContext | UIでエンゲージメントが開かれるTabContext。 このコンテキストを使用すると、そのtabContextで開かれたレコードにアクセスし、アクションを実行できます。 TabContextオブジェクトに追加されたすべてのAPIは、このAPIの戻り値に対してtrueを保持します。 | IEngagementContextのgetTabContextエントリを参照してください。 | 
| getEngagementData | そのエンゲージメント・オブジェクトのデータをフェッチする関数。 | IEngagementContextのgetEngagementDataエントリを参照してください。 | 
| getChannelType | PhoneContext APIリクエストでチャネル・タイプを取得するファンクション(ORA_SVC_PHONEなど)。 | IEngagementContextのgetChannelTypeエントリを参照してください。 | 
| getChannel | コンテキスト・オブジェクトの型を取得する関数。 値はPHONEです。 | IEngagementContextのgetChannelエントリを参照してください。 | 
| getWrapupContext | UIでラップ・アップが使用可能な場合は、startCommおよびcloseCommでラップ・アップRecordContextをフェッチするファンクション。 | RecordContextのgetWrapupContextエントリを参照してください。 |