機械翻訳について

ガイダンス・パネルおよびオーケストレーション・サブビューの有効化およびランタイムのテスト

営業担当が処理を実行する必要があるオーケストレーション・ステップは、営業オブジェクト概要ページの「ガイダンス」パネルに表示されます。 オーケストレーションにより、手動ステップもサポートするタスクおよびアポイントメントが作成されます。 ガイダンス・パネルは、特定のレコードに対してアクティブなオーケストレーションが実行されている場合にのみ表示されます。

基本契約カスタム・オブジェクトのガイダンス・パネルおよびサブビューを有効にするには、次のステップに従います。 まず、「基本契約」詳細ページの変数を次のように作成します:

  1. Visual Builder Studioで、「アプリケーションUI」タブをクリックします。

  2. cx-custom > agreements_cを展開し、agreements_c-detailノードをクリックします。

  3. agreements_c-detailタブで、「変数」サブタブをクリックします。

  4. 「+変数」をクリックします。

  5. 「変数の作成」ダイアログで、「変数」オプションが選択されていることを確認し、IDフィールドにorchPanelPollingAttributesと入力します。

  6. タイプ・フィールドで、「オブジェクト」を選択します。

  7. 「作成」をクリックして、次のフィールドを作成します。
    1. 「タイプ」番号のorchPanelNumberOfPolls
    2. 「タイプ」番号のorchPanelPollIntervals
    3. 「タイプ」番号のorchPanelPollStartAfter
  8. orchPanelPollingAttributes変数に示されているデフォルト値を指定
    {
        "orchPanelNumberOfPolls": 5,
        "orchPanelPollIntervals": 1,
        "orchPanelPollStartAfter": 2
    }
  9. agreements_c-detailタブで、「ページ・デザイナ」サブタブをクリックします。

  10. 「コード」ボタンをクリックします。

    このスクリーンショットは、コード・ボタンを示しています。
  11. 「テンプレート」タブを選択し、次のようにガイダンス・パネルの「オーケストレーション・ガイダンス・パネル・テンプレート」を追加します:

    <template id="orchestrationPanelTemplate">
      <oj-bind-if test="[[ $functions.isOrchestrationOptedIn() === true && $variables.isOrchestrationAssociated === true ]]">
        <oj-vb-fragment name="oracle_cx_fragmentsUI:cx-orchestration" bridge="[[ vbBridge ]]" class="oj-flex oj-sp-foldout-layout-panel">
          <oj-vb-fragment-param name="resource"
            value="[[ { 'name': 'Agreements_c', 'endpoint': 'custom', 'id': $page.variables.id, 'puid': $page.variables.puid } ]]">
          </oj-vb-fragment-param>
          <oj-vb-fragment-param name="extensionId" value="[[ $application.constants.extensionId ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="style" value="[[ 'panel' ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="orchPanelNumberOfPolls"
            value="[[ $application.constants.orchPanelPollingAttributes.orchPanelNumberOfPolls ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="orchPanelPollIntervals"
            value="[[ $application.constants.orchPanelPollingAttributes.orchPanelPollIntervals ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="orchPanelPollStartAfter"
            value="[[ $application.constants.orchPanelPollingAttributes.orchPanelPollStartAfter ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="isOrchestrationAssociated" value="{{ $variables.isOrchestrationAssociated }}">
          </oj-vb-fragment-param>
        </oj-vb-fragment>
      </oj-bind-if>
    </template>
  12. 次のように、ガイダンス・サブビューの「オーケストレーション・ガイダンス・サブビュー・テンプレート」およびテンプレートを追加します:

    <template id="orchestrationSubviewTemplate">
      <oj-bind-if test="[[ $functions.isOrchestrationOptedIn() === true && $variables.isOrchestrationAssociated === true ]]">
        <oj-vb-fragment name="oracle_cx_fragmentsUI:cx-orchestration" bridge="[[ vbBridge ]]">
          <oj-vb-fragment-param name="resource"
            value="[[ { 'name': 'Agreements_c', 'endpoint': 'custom', 'id': $page.variables.id, 'puid': $page.variables.puid } ]]">
          </oj-vb-fragment-param>
          <oj-vb-fragment-param name="extensionId" value="[[ $application.constants.extensionId ]]"></oj-vb-fragment-param>
          <oj-vb-fragment-param name="style" value="[[ 'subview' ]]"></oj-vb-fragment-param>
        </oj-vb-fragment>
      </oj-bind-if>
    </template>
  13. cx-detailコードに次のパラメータを追加します。

    <oj-vb-fragment-param name="resource" value="[[ { 'name': 'Agreements_c', 'endpoint': 'custom', 'id': $page.variables.id, 'puid': $page.variables.puid } ]]">

    ノート: リソース名は、ファイルが生成されたカスタム・オブジェクト名である必要があります。
  14. 次に、JSONタブをクリックし、PanelsContainerLayoutを検索します。

    Visual Builder StudioのAgreementsカスタム・オブジェクトで使用されるJSONコードのサンプル・スクリーンショット

  15. displayPropertiesの後に、オーケストレーション・パネルのエントリを追加して、折りたたみページで使用できるようにします。 また、sectionTemplateMapの後に、orchestrationPanelテンプレートIDを指定します。

    PanelsContainerLayout例

    "PanelsContainerLayout": {
          "label": "Container Rule Set 1",
          "layoutType": "container",
          "layouts": {
            "case1": {
              "label": "Case 1",
              "layoutType": "container",
              "layout": {
                "displayProperties": [
                  "orchestrations",
                  "AgreementContacts_Src_Agreements_cToAgreementContacts_c_Tgt",
                  "Note"
                ],
                "sectionTemplateMap": {
                  "AgreementContacts_Src_Agreements_cToAgreementContacts_c_Tgt": "AgreementContacts_Src_Agreements_cToAgreementContacts_c_TgtPanelTemplate",
                  "Attachment": "AttachmentPanelTemplate",
                  "Note": "NotePanelTemplate",
                  "orchestrations": "orchestrationPanelTemplate",
                  "Resource": "AgreementResource_Src_Agreements_cToAgreementResource_c_TgtPanelTemplate"
                }
              }
            }
          },
          "rules": [
            "PanelsContainerLayout-rule1"
          ]
        }
  16. PanelsContainerLayoutの例と同様に、SubviewContainerLayoutを検索します。
  17. displayPropertiesの後に、オーケストレーション・サブビューのエントリを追加します。 また、sectionTemplateMapの後に、オーケストレーション・サブビュー・テンプレートIDを指定します。

    SubviewContainerLayout例

    "SubviewContainerLayout": {
          "label": "Container Rule Set 1",
          "layoutType": "container",
          "layouts": {
            "case1": {
              "label": "Case 1",
              "layoutType": "container",
              "layout": {
                "sectionTemplateMap": {
                  "AgreementContacts_Src_Agreements_cToAgreementContacts_c_Tgt": "AgreementContacts_Src_Agreements_cToAgreementContacts_c_Tgt",
                  "Note": "Note",
                  "orchestrations": "orchestrationSubviewTemplate"
                },
                "displayProperties": [
                  "orchestrations",
                  "AgreementContacts_Src_Agreements_cToAgreementContacts_c_Tgt",
                  "Attachment",
                  "Note"
                ]
              }
            }
          },
          "rules": [
            "SubviewContainerLayout-rule1"
          ]
        }
  18. JavaScriptタブをクリックし、次のコード・スニペットを追加して、オーケストレーションがオプトインされているかどうかを確認します。

    customobject_c-detail-page.js

    define(['vx/oracle_cx_salesUI/ui/self/applications/cx-sales/resources/utils/CrmCommonUtils'], (CrmCommonUtils) => {
      'use strict';
     
      class PageModule {
     
        constructor(context) {
          // default intialize..
          this.eventHelper = context.getEventHelper();
        };
     
        /**
         * function to check if orchestration opted in.
         */
        isOrchestrationOptedIn() {
          const isOrchestrationEnabled = CrmCommonUtils.getProfileValue(this.profileOptions, 'ORA_ZCA_ENABLE_ORCHESTRATION');
          const isFunctionalPrivilegeEnabled = cxcore?.utils?.userInfo?.getPermissions()?.includes('ZCA_VIEW_SALES_ORCHESTRATION_PRIV');
          return (isOrchestrationEnabled !== "N" && isFunctionalPrivilegeEnabled == true);
        };
      }
       
      return PageModule;
    });
  19. vb-require-bundleエントリの後にGruntfile.jsに次のコードがあることを確認します。"vx/oracle_cx_fragmentsUI/ui/self/resources/js/utils/callbackHelper"
  20. 次の大まかなステップを使用してランタイムをテストします:
    1. 契約カスタム・オブジェクト・レコードを作成し、関連するオーケストレーションを自動化するためにオーケストレーションの「条件」フィールドで使用される属性を移入します。
    2. 「契約」折りたたみページおよび関連する「ガイダンス」パネルのレコードにナビゲートします。
    3. 「ガイダンス」パネルから、「すべての目標を表示」リンクをクリックして「オーケストレーション」サブビューに移動します。