Loading
設定並維護零售執行
目錄
選取篩選

          沒有結果
          沒有結果
          以下是搜尋小祕訣

          檢查關鍵字的拼字。
          使用較常見的搜尋字詞。
          選取較少篩選條件以擴大您的搜尋。

          搜尋所有 Salesforce 說明
          設定 Agentforce 的內容傳送

          設定 Agentforce 的內容傳送

          透過在 Consumer Goods Cloud 行動應用程式中分析內容資料,協助您的工作人員更快速且更準確地工作。您可以在自訂專案中設定流程和業務邏輯契約,以定義應用程式如何建立和傳送此內容。

          必要版本

          提供版本:已啟用 Consumer Goods Cloud 的 EnterpriseUnlimited Edition
          需要的使用者權限
          設定 Agentforce 的內容傳遞 開發人員、自訂者
          備註
          備註 當您在實體行動裝置上的 Consumer Goods Cloud 行動應用程式中使用 Agentforce 時,便可使用內容傳送。在 Modeler 模擬器應用程式中無法使用。

          例如,若要從商店 Cockpit 傳遞造訪識別碼,請執行下列步驟:

          1. 在以 Visual Studio Code 為基礎的 Modeler 中開啟您的自訂專案。
          2. 視需要在流程契約中定義 Action 邏輯。
            1. 開啟相關的流程契約。
            2. 實作邏輯,將資料傳送至 Action,或從已可用的物件中提取資料。在此範例中,建立使用物件名稱和記錄識別碼作為輸入參數的邏輯 Action,以呼叫自訂業務邏輯。
              <Action actionType="LOGIC" name="LaunchAgentforce" call="ProcessContext::CardController.launchAgentforce">
                 <Parameters>
                      <Input name="objectName" type="Literal" value="Visit" />
                      <Input name="recordId" type="Binding" value="ProcessContext::mainBO.PKey" />
                 </Parameters>
              </Action>
            3. 新增 agentforceLaunchEvent 外部事件並將其繫結至動作。
              <ExternalEvent name="agentforceLaunchEvent" action="LaunchAgentforce" />

            以下是流程契約組態的範例:

            <!-- Define the Action to call the Business Logic function -->
            <Action actionType="LOGIC" name="LaunchAgentforce" call="ProcessContext::CardController.launchAgentforce">
               <Parameters>
                  <!-- Pass the Object API Name -->
                  <Input name="objectName" type="Literal" value="Visit" />
                  <!-- Pass the Record ID dynamically from the current Business Object -->
                  <Input name="recordId" type="Binding" value="ProcessContext::mainBO.PKey" />
               </Parameters>
            </Action>
                  
            <!-- Define the External Event to intercept the header button click -->
            <ExternalEvent name="agentforceLaunchEvent" action="LaunchAgentforce" />
          3. 實作邏輯以建構裝載並呼叫原生多面向。
            1. 開啟流程動作中參照的業務邏輯契約。
            2. 實作與您在 Action 呼叫中定義的名稱相符的函數。
            3. 建構包含 objectApiName 與屬性的 JSON 裝載。
            4. 叫用 Facade.launchAgentForce() 函數。

            以下是業務邏輯實作的範例:

            function launchAgentforce(objectName, recordId){
                  var me = this;
            
            //////////////////////////////////////////////////////////////////////////////               
            //                 Add your customizing javaScript code below.              //  
            //////////////////////////////////////////////////////////////////////////////
                  var promise;
            
                  let payload = {
                    "objectAPIName": objectName,
                    "attributes": {
                    "recordId": recordId
                }
            };
            
            Facade.launchAgentForce(payload);
            promise = Promise.resolve();
            
            //////////////////////////////////////////////////////////////////////////////               
            //                 Add your customizing javaScript code above.              //
            ////////////////////////////////////////////////////////////////////////////// 
                  return promise;
             }

          標記為緊急之特定造訪記錄的裝載結構範例。

          {
              "objectApiName": "Visit",
              "attributes": {
                "recordId": "a00xx0000012345AAA",
                "pageType": "standard_recordPage",
                "actionName": "view"
              },
              "additionalAttributes": [
                {
                  "name": "customStatus",
                  "value": "urgent",
                  "type": "String"
                }
              ]
          }

          參數詳細資料:

          • objectApiName:(字串) 必要。Salesforce 物件內容的 API 名稱。
          • attributes:(物件) 必要。記錄識別碼的容器,尤其是 recordId。
          • additionalAttributes:(陣列) 選擇性。額外內容的金鑰值配對。
           
          正在載入
          Salesforce Help | Article