機械翻訳について

ExecuteSmartAction操作

これは、スマート・アクションのパブリッシュ・リクエスト・オブジェクトの作成に使用するコマンドです。 この要求オブジェクトは、適切なスマート処理IDが実行されるセットです。 これは、recordContextまたはtabContextを介して公開できます。

構文

Typescriptのサンプルを次に示します。

const tabContext: ITabContext =  await uiEventsFrameworkInstance.getCurrentBrowserTabContext();
const recordContext: IRecordContext =  tabContext.getActiveRecord();  

// Get smartActionContext from tab context or record context (use one of the following)
let smartActionContext: IsmartActionContext = await tabContext.getSmartActionContext();
let smartActionContext: IsmartActionContext = await recordContext.getSmartActionContext();

// Create publish request object
const requestObject: IExecuteSmartActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');

// set the proper smart action id (see section 'How to get the smart action id ?' for more details)
requestObject.setId(<SmartActionId>);

smartActionContext.publish(requestObject).then((response: ISmartActionOperationResponse) => {

  console.log((response.getResponseData() as ISMartActionOperationResponseData).getId());
});
JavaScriptのサンプルを次に示します。
const tabContext =  await uiEventsFrameworkInstance.getCurrentBrowserTabContext();
const recordContext =  tabContext.getActiveRecord();  

// Get smartActionContext from tab context or record context (use one of the following)
let smartActionContext = await tabContext.getSmartActionContext();
let smartActionContext = await recordContext.getSmartActionContext();

// Create publish request object
const requestObject = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');

// set the proper smart action id (see section 'How to get the smart action id ?' for more details)
requestObject.setId(<SmartActionId>);

smartActionContext.publish(requestObject).then((response) => {

  console.log(response.getResponseData().getId());
});

担当者のRecordContextからLog-A-Callスマート・アクションのExecuteSmartAction操作を公開します

コンタクト・ページからexecuteSmartActionを使用する方法の例を次に示します(IDはスマート・アクションのActionIdです)。 コールをログに記録するためにスマートアクションを実行するには、コールを記録するコマンドでリクエストオブジェクトを設定します。 「スマート処理」ホーム・ページから必要なコマンドを取得できます。 要求オブジェクトの準備が完了すると、スマート処理コンテキストに公開されます。

Typescriptのサンプルを次に示します。

const tabContext: ITabContext =  await uiEventsFrameworkInstance.getCurrentBrowserTabContext();
const recordContext: IRecordContext =  tabContext.getActiveRecord(); 
let smartActionContext: IsmartActionContext = await recordContext.getSmartActionContext();
const requestObject: IExecuteSmartActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');
requestObject.setId('SDA-LogACall-contacts');
smartActionContext.publish(requestObject).then((response: ISmartActionOperationResponse) => {
  console.log((response.getResponseData() as ISMartActionOperationResponseData).getId());
});
JavaScriptのサンプルを次に示します。
const tabContext =  await uiEventsFrameworkInstance.getCurrentBrowserTabContext(); 
const recordContext =  await tabContext.getActiveRecord();  
let smartActionContext = await recordContext.getSmartActionContext();
const requestObject = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');
requestObject.setId('SDA-LogACall-contacts');
smartActionContext.publish(requestObject).then((response) => {
  console.log(response.getResponseData().getId());
});

SDA-createContact-interactionsスマート・アクションの場合、TabContextからExecuteSmartAction操作を公開します

不明なコンタクト・ページからexecuteSmartActionを使用する方法の例を次に示します(IDはスマート・アクションのActionId)。

Typescriptのサンプルを次に示します。

const tabContext: ITabContext =  await uiEventsFrameworkInstance.getCurrentBrowserTabContext();
let smartActionContext: IsmartActionContext = await tabContext.getSmartActionContext();
const requestObject: IExecuteSmartActionRequest = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');
requestObject.setId('SDA-createContact-interactions');
smartActionContext.publish(requestObject).then((response: ISmartActionOperationResponse) => {
  console.log((response.getResponseData() as ISMartActionOperationResponseData).getId());
});
JavaScriptのサンプルを次に示します。
const tabContext =  await uiEventsFrameworkInstance.getCurrentBrowserTabContext()
let smartActionContext = await tabContext.getSmartActionContext();
const requestObject = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');
requestObject.setId('SDA-createContact-interactions');
smartActionContext.publish(requestObject).then((response) => {
  console.log(response.getResponseData().getId());
});

ポップ操作成功後のExecuteSmartAction操作の公開

コンタクト・ページからexecuteSmartActionを使用する方法の例を次に示します(IDはスマート・アクションのActionIdです)。

Typescriptのサンプルを次に示します。

const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID');
const globalContext: IGlobalContext = await  uiEventsFrameworkInstance.getGlobalContext();
const requestObject: IPopFlowInAppRequest = uiEventsFrameworkInstance .requestHelper.createPublishRequest('PopOperation');
requestObject.setRecordType('Contact');
requestObject.setRecordId("CDRM_70980");
const popResponse: IPopFlowResponse = await globalContext.publish(requestObject);
const tabContext: ITabContext = await popResponse.getResponseData();
const recordContext: IRecordContext= await tabContext.getActiveRecord();
let smartActionContext: ISmartActionContext = await recordContext.getSmartActionContext();
const smartActionRequestObject: IExecuteSmartActionRequest  = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');
smartActionRequestObject.setId('SDA-CreateServiceRequest-contacts');
let result: ISmartActionOperationResponse = await smartActionContext.publish(smartActionRequestObject);
JavaScriptのサンプルを次に示します。
const uiEventsFrameworkInstance: IUiEventsFrameworkProvider = await CX_SVC_UI_EVENTS_FRAMEWORK.uiEventsFramework.initialize('MyFirstExtensionID');
const globalContext: IGlobalContext = await  uiEventsFrameworkInstance.getGlobalContext();
const requestObject:  = uiEventsFrameworkInstance.requestHelper.createPublishRequest('PopOperation');
requestObject.setRecordType('Contact');
requestObject.setRecordId("CDRM_70980");
const popResponse = await globalContext.publish(requestObject);
const tabContext = await popResponse.getResponseData();
const recordContext= await tabContext.getActiveRecord();
let smartActionContext = await recordContext.getSmartActionContext();
const smartActionRequestObject = uiEventsFrameworkInstance.requestHelper.createPublishRequest('ExecuteSmartAction');
smartActionRequestObject.setId('SDA-CreateServiceRequest-contacts');
let result = await smartActionContext.publish(smartActionRequestObject);