Loading
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む
Lightning Web コンポーネントからの OmniScript 内でのリモート通話の実行

Lightning Web コンポーネントからの OmniScript 内でのリモート通話の実行

標準ランタイムでは、カスタマイズされたOmniScriptコンポーネントまたはカスタムLightning Webコンポーネントからリモート通話を実行します。

リモート通話を呼び出す前に、次の操作を行います。

カスタマイズされた OmniScript コンポーネントからのコール

OmniScript コンポーネント (omniscriptText など) を拡張し、omniscriptBaseMixin コンポーネントを拡張していない場合、次を使用して UUID を取得します。

this.scriptHeaderDef.uuid

メモ
メモ

予期しない動作を回避するために、OmniScriptBaseMixin コンポーネントと別の OmniScript コンポーネントを拡張することはお勧めしません。

Lightning Web コンポーネントからの Integration Procedure のコール

OmniscriptActionUtilsForCore ユーティリティは、example_integrationprocedure という名前の有効な Integration Procedure をコールします。種別は example、サブ種別は integrationprocedure です。

import OmniscriptActionUtilsForCore from 'c/omniscriptActionUtilsForCore';

this.omniactions = new OmniscriptActionUtilsForCore(this.omniScriptHeaderDef.uuid);
this.omniactions.runIntegrationProcedure({
    ipName: "example_integrationprocedure",
    options: {},
    input: {}
}).then((result) => {
    window.console.log("IP RESULT :");
    window.console.log(result);
});

Lightning Web コンポーネントからのデータマッパーの抽出の呼び出し

OmniscriptActionUtilsForCore ユーティリティは、Data Mapper Extract という名前の getsomeaccounts をコールします。

this.omniactions = new OmniscriptActionUtilsForCore(this.omniScriptHeaderDef.uuid);
this.omniactions.runDataMapperExtract({
    dmName: "getsomeaccounts",
    options: {},
    input: {}
}).then((result) => {
    window.console.log("DME RESULT :");
    window.console.log(result);  
});

Lightning Web コンポーネントからのデータマッパーの読み込みの呼び出し

OmniscriptActionUtilsForCore ユーティリティは、「createaccount」という名前のデータマッパー読み込みをコールします。

this.omniactions = new OmniscriptActionUtilsForCore(this.omniScriptHeaderDef.uuid);
this.omniactions.runDataMapperLoad({
    dmName: "createaccount",
    options: {},
    input: {}
}).then((result) => {
    window.console.log("DML RESULT :");
    window.console.log(result);  
});

Lightning Web コンポーネントからのデータマッパー変換の呼び出し

OmniscriptActionUtilsForCore ユーティリティは、「transformdata」という名前のデータマッパー変換をコールします。

this.omniactions = new OmniscriptActionUtilsForCore(this.omniScriptHeaderDef.uuid);
this.omniactions.runDataMapperTransform({
    dmName: "transformdata",
    options: {},
    input: {
        "one" : {
            "dataforone" : "ONEE"
        },
        "two" : {
            "datafortwo": "TWOOO"
        }
    }
}).then((result) => {
    window.console.log("DMT RESULT :");
    window.console.log(result);  
});

Lightning Web コンポーネントからの Apex のコール

OmniScript のカスタム Lightning Web コンポーネントで Apex インポートがサポートされるようになりました。「Import Apex Methods」を参照してください。

カスタム LWC で OmniStudio 管理パッケージ Apex クラスをコールする場合は、必ず標準ランタイム同等クラスに置き換えてください。詳細は、Salesforce サポートにお問い合わせください。

 
読み込み中
Salesforce Help | Article