Loading
保險
InsProductAsyncRatingService:fetchProductsPrice

InsProductAsyncRatingService:fetchProductsPrice

使用此服務可取用非同步評分結果。

類別:InsProductAsyncRatingService

方法:fetchProductsPrice

此服務針對群組福利大型群組報價使用個案建立。

運作方式

  1. 此服務會使用保險等級要求的識別碼作為輸入。
  2. 服務會查詢已儲存的等級要求,並取用包含狀態、評分產品識別碼、等級選項、等級輸入和等級輸出的資訊。
    備註
    備註 只有在等級要求狀態為「已完成」或「已評分」時,服務才會提供評分產品的價格。
  3. 服務會根據等級輸出計算每個根產品的總價格。
  4. 如果 includeProductJson 選項設定為 false,則會傳回所有評價產品的價目地圖。如果 includeProductJson 選項設定為 true,則會傳回產品 JSON。

輸入

輸入 描述
requestId

必要。

保險等級要求的識別碼。此識別碼會在非同步評分流程開始時產生。

遠端選項

選項 描述
includeMemberPrices

表示是否要在輸出中包含成員層級價格。

預設值為 false。

includeProductJson

表示是否要在回應中包含產品 JSON。

預設值為 false。

當此選項為 true 時,輸出會包含需要額外處理時間的大型 JSON 節點。

includeRawCalculationResult

表示是否要在回應中包含原始計算結果。

預設值為 false。

此選項僅在 includeProductJson 設定為 true 時才有效。

輸入 JSON

以下是範例輸入 JSON:

{
 "requestId": "8zkRO000000004D",
}

選項 JSON

以下是範例選項 JSON:

{     
  "includeProductJson": false,
  "includeRawCalculationResult": false,
  "includeMemberPrices": false
}

輸出 JSON

以下是範例輸出 JSON:

{
  "productPriceMap": {
    "parsedCalcData": {
      "01t8c00000PLIiEAAX": {
        "01t8c00000PLIiEAAX": {
          "MedicalCalcMatrixAgeBased__QuotePremium":1020.0
        }
      },
      "01t8c00000P49yeAAB":{
        "01t8c00000P49yeAAB": {
          "DentalPremiumCalcMatrixAgeBased__QuotePremium":325.0
        }
      }
    }
  },
  "Status":"Completed"
}

使用產品 JSON 輸出 JSON

以下是含產品 JSON 的範例輸出 JSON:

{
  "result": {
    "totalSize": 2,
    "records": [
      {
        "nameResult": {
          "childProducts": {},
          "attributeCategories": {}
        },
        "fields": {
          "Price": 325.0,
          "currencySymbol": "$",
          "currencyCode": "USD",
          "productId": "01t8c00000P49yeAAB",
          "ParentClassCode__c": null,
          "ParentClassId__c": null,
          "TotalInsuredFormula__c": null,
          "Term__c": null,
          "PricingFormula__c": "aggTotalPrem",
          "IsConfigurable__c": true,
          "RecordTypeName__c": "Product",
          "PricingSource__c": null,
          "ImageId__c": null,
          "Tier__c": null,
          "IsRecommended__c": false,
          "RateBandId__c": null,
          "SubType__c": null,
          "Type__c": null,
          "MarketSegment__c": null,
          "LineOfBusiness__c": "Group Benefits",
          "ProductCode": "dentalPremium",
          "Family": null,
          "Description": null,
          "Name": "dentalPremium",
          "Id": "01t8c00000P49yeAAB",
          "CalculatedPriceData": {
            "aggTotalPrem": 325.0,
            "DentalPremiumCalcMatrixAgeBased__QuotePremium": 325.0
          }
        },
        "displaySequence": -1
      },
      {
        "nameResult": {
          "childProducts": {},
          "attributeCategories": {}
        },
        "fields": {
          "Price": 1020.0,
          "currencySymbol": "$",
          "currencyCode": "USD",
          "productId": "01t8c00000PLIiEAAX",
          "ParentClassCode__c": null,
          "ParentClassId__c": null,
          "TotalInsuredFormula__c": null,
          "Term__c": null,
          "PricingFormula__c": "aggTotalPrem",
          "IsConfigurable__c": true,
          "RecordTypeName__c": "Product",
          "PricingSource__c": null,
          "ImageId__c": null,
          "Tier__c": null,
          "IsRecommended__c": false,
          "RateBandId__c": null,
          "SubType__c": null,
          "Type__c": "Medical",
          "MarketSegment__c": null,
          "LineOfBusiness__c": "Group Benefits",
          "ProductCode": "MEDICAL",
          "Family": null,
          "Description": null,
          "Name": "Medical",
          "Id": "01t8c00000PLIiEAAX",
          "CalculatedPriceData": {
            "aggTotalPrem": 325.0,
            "MedicalCalcMatrixAgeBased__QuotePremium": 325.0
          }
        },
        "displaySequence": -1
      }
    ]
  },
  "Status": "Completed"
}
 
正在載入
Salesforce Help | Article