ガイダンス・パネルおよびオーケストレーション・サブビューの有効化およびランタイムのテスト
営業担当が処理を実行する必要があるオーケストレーション・ステップは、営業オブジェクト概要ページの「ガイダンス」パネルに表示されます。 オーケストレーションにより、手動ステップもサポートするタスクおよびアポイントメントが作成されます。 ガイダンス・パネルは、特定のレコードに対してアクティブなオーケストレーションが実行されている場合にのみ表示されます。
基本契約カスタム・オブジェクトのガイダンス・パネルおよびサブビューを有効にするには、次のステップに従います。 まず、「基本契約」詳細ページの変数を次のように作成します:
-
Visual Builder Studioで、「アプリケーションUI」タブをクリックします。
-
cx-custom > agreements_c
を展開し、agreements_c-detail
ノードをクリックします。 -
agreements_c-detail
タブで、「変数」サブタブをクリックします。 -
「+変数」をクリックします。
-
「変数の作成」ダイアログで、「変数」オプションが選択されていることを確認し、IDフィールドに
orchPanelPollingAttributes
と入力します。 -
タイプ・フィールドで、「オブジェクト」を選択します。
-
「作成」をクリックして、次のフィールドを作成します。
- 「タイプ」番号のorchPanelNumberOfPolls
- 「タイプ」番号のorchPanelPollIntervals
- 「タイプ」番号のorchPanelPollStartAfter
orchPanelPollingAttributes
変数に示されているデフォルト値を指定{ "orchPanelNumberOfPolls": 5, "orchPanelPollIntervals": 1, "orchPanelPollStartAfter": 2 }
-
agreements_c-detail
タブで、「ページ・デザイナ」サブタブをクリックします。 「コード」ボタンをクリックします。
-
「テンプレート」タブを選択し、次のようにガイダンス・パネルの「オーケストレーション・ガイダンス・パネル・テンプレート」を追加します:
<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>
-
次のように、ガイダンス・サブビューの「オーケストレーション・ガイダンス・サブビュー・テンプレート」およびテンプレートを追加します:
<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>
-
cx-detailコードに次のパラメータを追加します。
<oj-vb-fragment-param name="resource" value="[[ { 'name': 'Agreements_c', 'endpoint': 'custom', 'id': $page.variables.id, 'puid': $page.variables.puid } ]]">
ノート: リソース名は、ファイルが生成されたカスタム・オブジェクト名である必要があります。 - 次に、JSONタブをクリックし、
PanelsContainerLayout
を検索します。 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" ] }
- PanelsContainerLayoutの例と同様に、
SubviewContainerLayout
を検索します。 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" ] }
- 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; });
- vb-require-bundleエントリの後に
Gruntfile.js
に次のコードがあることを確認します。"vx/oracle_cx_fragmentsUI/ui/self/resources/js/utils/callbackHelper"
- 次の大まかなステップを使用してランタイムをテストします:
- 契約カスタム・オブジェクト・レコードを作成し、関連するオーケストレーションを自動化するためにオーケストレーションの「条件」フィールドで使用される属性を移入します。
- 「契約」折りたたみページおよび関連する「ガイダンス」パネルのレコードにナビゲートします。
- 「ガイダンス」パネルから、「すべての目標を表示」リンクをクリックして「オーケストレーション」サブビューに移動します。