Loading
保险
InsProductAsyncRatingService:fetchProductsPrice

InsProductAsyncRatingService:fetchProductsPrice

使用此服务获取异步评级结果。

类:InsProductAsyncRatingService

方法:fetchProductsPrice

此服务专为团体福利大型团体报价用例构建。

工作原理

  1. 此服务将保险评级请求的 ID 作为输入。
  2. 该服务查询存储的评级请求,并检索信息,包括状态、评级产品 ID、评级选项、评级输入和评级输出。
    备注
    备注 只有当评级请求的状态为“已完成”或“已评级”时,服务才会提供评级产品的价格。
  3. 该服务根据评级输出计算每个根产品的总价格。
  4. 如果includeProductJson选项设置为false,将返回所有评级产品的价格映射。如果includeProductJson选项设置为true,则返回产品 JSON。

输入

输入 描述
requestId

必需。

保险评级请求的 ID。此 ID 会在异步评级流程开始时生成。

远程选项

选项 说明
includeMemberPrices

表示是否在输出中包含成员级价格。

默认值是 false。

includeProductJson

表示是否在响应中包含产品 JSON。

默认值是 false。

当此选项为true时,输出包含需要额外处理时间的大型 JSON 节点。

includeRawCalculationResult

表示是否在响应中包含原始计算结果。

默认值是 false。

此选项仅在 includeProductJson 设置为 true 时有效。

输入 JSON

以下是示例输入 JSON:

{
 "requestId": "8zkRO000000004D",
}

Options 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