Loading
學習
目錄
選取篩選

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

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

          搜尋所有 Salesforce 說明
          使用進階交易詳細資料條列定價對應自訂欄位

          使用進階交易詳細資料條列定價對應自訂欄位

          使用者可以使用「進階詳細資料條列定價」功能,透過定價程序更新銷售交易項目或銷售交易項目詳細資料的自訂欄位。透過此功能,使用者不再需要使用自訂觸發或流程來更新這些欄位。此功能適用於修正、續約和取消使用個案。

          必要版本

          適用於:Lightning Experience
          適用於:已啟用交易管理的 Revenue Cloud EnterpriseUnlimitedDeveloper Edition
          所需的使用者權限
          若要設定和使用進階詳細資料條列價格:

          Salesforce 管理員

          「定價設計時間使用者」權限集

          開始之前,請先完成這些工作。

          • 若要開啟「進階詳細資料條列價格」功能,請在「設定」中尋找並選取「收入設定」,然後開啟「進階詳細資料條列價格」設定。
          • 設定您的 定價程序

          更新收入定價程序

          若要設定進階詳細資料條列定價,請修改您的收入定價程序。

          1. 進入 App Launcher,尋找並選取「定價程序」,然後選取要更新的定價程序。
          2. 透過新增新的地圖條列項目元素作為定價程序中定價設定旁的第二個元素,來修改定價程序。
          3. 將內容標記對應新增至地圖條列項目。

            輸入變數

            輸出變數

            LineItem

            SalesTrxnItemDetailSource

            LineItemQuantity

            ItemDetailQuantity

            NetUnitPrice

            ItemDetailNetUnitPrice

            price_water_fall

            DetailPriceWaterfallIdentifier

            InputUnitPrice

            ItemDetailUnitPrice

            ItemBillingReference

            ItemDetailBillingReference

            ItemNetTotalPrice

            ItemDetailTotalPrice

            TotalLineAmount

            ItemDetailTotalLineAmount

            EffectiveFrom

            ItemDetailEffectiveFrom__std

            EffectiveTo

            ItemDetailEffectiveTo__std

            PricingTermCount

            ItemDetailPricingTermCount__std

            itemTransientEndDate

            ItemDetailTransientEndDate__std

            ItemPricingSource

            ItemDetailPricingSource__std

            DerivedPricingAttribute

            ItemDetailDerivedPricingAttribute__std

            ItemGroupSummarySubtotal

            ItemDetailGroupSummaryTotal__std

            ListPrice

            ItemDetailListPrice__std

            IsContracted

            ItemDetailIsContracted__std

            ItemContractPrice

            ItemDetailContractPrice__std

            STI_TenantName__c

            STID_TenantName__c

            新增內容標記對應後,您會看見 SalesTransaction 和 SalesTransactionItemDetail 之間具有已更新內容定義的預設對應。

          更新衍生的定價探索程序

          如果您使用衍生的定價,請在完成對收入定價程序的變更後,對您的探索程序進行額外變更。這些變更是必要的,才能決定有效的貢獻和衍生產品。

          1. 進入 App Launcher,尋找並選取「探索程序」,然後選取要更新的探索程序。
          2. 將兩個新元素新增至探索程序至價格衍生的產品:探索設定和對應條列項目。
            將這些變數新增至 Discovery 設定。
            • 輸入變數:條列項目
            • 輸出變數:LineItem
            將這些變數新增至地圖條列項目。
            • 輸入變數:SalesTransactionItem
            • 輸出變數:SalesTransactionItemDetail

            將這些其他變數新增至地圖條列項目。

            輸入變數

            輸出變數

            LineItem

            SalesTrxnItemDetailSource

            EffectiveFrom

            ItemDetailEffectiveFrom__std

            EffectiveTo

            ItemDetailEffectiveTo__std

            DerivedPricingAttribute

            ItemDetailDerivedPricingAttribute__std

          3. 使用修正、續約和取消 (ARC) 使用個案的定價程序來支援自訂欄位。
            如果您使用 ARC API 並想要使用自訂欄位,則適用自訂欄位設定。
            1. 自訂欄位新增至 QuoteLineItem、QuoteLineItem Detail、OrderProduct 和 OrderProductDetails 物件。
            2. 內容定義中,針對 SalesTransactionItem 和 SalesTransactionItemDetail 節點中的這些自訂欄位建立項目。
            3. 在 QuoteEntitiesMapping 和 OrderEntitiesMapping 中建立 必要對應
          4. 修改自訂欄位的收入定價程序。
            1. 在定價程序中,修改 MapLineItem 元素以新增 SalesTransactionItem.CustomField 和 SalesTransactionItemDetail.CustomField 之間的對應。
            2. 在定價程序中建立任何必要的自訂元素,以將值指派給 SalesTransactionItem.CustomField。

              定價程序會自動偵測特定條列是否有詳細資料項目,並寫入 SalesTransactionItemDetail.CustomField (若存在)。否則,會寫入至 SalesTransactionItem.CustomField。

              在新銷售交易期間,會填入 SalesTransactionItem 上的 CustomField。針對含詳細資料行的 ARC 案例,詳細資料行會寫入至 SalesTransactionItemDetail 上的 CustomField。如果未針對 ARC 建立詳細資料行,則詳細資料行會寫入至 SalesTransactionItem 上的 CustomField。

          5. 若要在 QuoteLineItem 或 OrderProducts 上使用詳細資料行撰寫自訂欄位,請完成此涉及程序計畫和 Apex 類別的額外設定。
            1. 啟用程序計畫。進入「設定」,尋找並選取「收入設定」,然後開啟「定價程序計畫協調流程」設定。
            2. 針對報價和訂單建立程序計畫
            3. 在程序計畫中,確認所有步驟皆包含 MapLineItem 元素。根據定價程序中使用的欄位,修改對應
            4. 使用此 ApexCustomFieldHandler Apex 類別範例,您可以視需要增強以更新多個自訂欄位。此類別會查詢 SalesTransactionItem 和 SalesTransactionItemDetail 節點、從詳細資料項目提取自訂欄位值,然後更新 SalesTransactionItem 上的對應自訂欄位。
          範例
          範例
          global class ApexCustomFieldHandler implements RevSignaling.SignalingApexProcessor {
          
              public virtual class BaseException extends Exception {}
              public class OtherException extends BaseException {}
              
              public RevSignaling.TransactionResponse execute(RevSignaling.TransactionRequest request) {
                  
                  String contextId = request.ctxInstanceId;
                  Context.IndustriesContext industriesContext = new Context.IndustriesContext();
                  
          
                  // STEP 2 - Query SalesTransactionItem nodes
                  Map<String, Object> inputQueryItem = new Map<String, Object>{
                      'contextId' => contextId,
                      'tags' => new List<String>{ 'SalesTransactionItem', 'SalesTransactionItemDetail' }
                  };
                  Map<String, Object> itemQueryOutput = industriesContext.queryTags(inputQueryItem);
                  Map<String, Object> itemQueryResult = (Map<String, Object>) itemQueryOutput.get('queryResult');
                  List<Object> itemData = (List<Object>) itemQueryResult.get('SalesTransactionItem');
                  List<Object> itemDetailData = (List<Object>) itemQueryResult.get('SalesTransactionItemDetail');
          
          
                  Map<String, String> salesTransactionItemIdToCustomAggregatedValue = new Map<String, String>();
                  
                  // STEP 3 - Custom Field Value from SalesTransactionItemDetail
                  for(Object itemDetailObj : itemDetailData) {
                      Map<String, Object> itemDetailNode = (Map<String, Object>) itemDetailObj;
                      Map<String, Object> detailTagMap = (Map<String, Object>) itemDetailNode.get('tagValue');
                      
                      String lineItemId = (String)((Map<String, Object>) detailTagMap.get('SalesTrxnItemDetailParent')).get('tagValue');
                      String cfValue = (String)((Map<String, Object>) detailTagMap.get('STID_TenantName__c')).get('tagValue');
                      
                      System.debug('Custom Field Value for Detail Item' + cfValue);
                      if(cfValue != null) {
                          salesTransactionItemIdToCustomAggregatedValue.put(lineItemId, cfValue);
                      }
                  }
          
          
                  // STEP 4 - Build update list
                  List<Map<String, Object>> itemNodeUpdates = new List<Map<String, Object>>();
          
                  for (Object itemObj : itemData) {
                      Map<String, Object> itemNode = (Map<String, Object>) itemObj;
                      Map<String, Object> tagMap = (Map<String, Object>) itemNode.get('tagValue');
                      
                      String lineItemId = (String)((Map<String, Object>) tagMap.get('LineItem')).get('tagValue');
                      
                      List<Object> dataPath = (List<Object>) itemNode.get('dataPath');
          
                      dataPath.remove(0); // Remove contextId
          
                      itemNodeUpdates.add(new Map<String, Object>{
                          'nodePath' => new Map<String, Object>{ 'dataPath' => dataPath },
                          'attributes' => new List<Object>{
                              new Map<String, Object>{
                                  'attributeName' => 'STI_TenantName__c',
                                  'attributeValue' => salesTransactionItemIdToCustomAggregatedValue.get(lineItemId)
                              }
                          }
                      });
                  }
          
                  // STEP 5 - Create collection context update
                  if (!itemNodeUpdates.isEmpty()) {
                      Map<String, Object> updateInput = new Map<String, Object>{
                          'contextId' => contextId,
                          'nodePathAndAttributes' => itemNodeUpdates
                      };
                      
                      //Step 6 - Update context
                      System.debug('--- PREHOOK: SUBMITTING CONTEXT UPDATE ---');
                      System.debug(JSON.serializePretty(updateInput));
                      industriesContext.updateContextAttributes(updateInput);
                  }
          
                  RevSignaling.TransactionResponse response = new RevSignaling.TransactionResponse();
                  response.status = RevSignaling.TransactionStatus.SUCCESS;
                  return response;
              }
          }
          
          重要
          重要 若要將自訂欄位資訊新增至「資產狀態期間」和「資產動作來源」,請建立適當的跨內容對應
           
          正在載入
          Salesforce Help | Article