Loading
保险
InsEnrollmentService:getRatedProducts

InsEnrollmentService:getRatedProducts

使用该服务返回给定登记者及其受抚养人的合格产品列表。当计划的费率类型为“Composite”时,将显示每个产品的费率带价格。

类:InsEnrollmentService

方法:getRatedProducts

重要
重要

查找返回一系列与注册无关的评级产品的服务?你走错地方了

您需要 InsProductService:getRatedProducts。

工作方式

  1. 此服务会获取登录系统的登记者的userId或contactID、contractId以及今天的日期。

  2. 服务会获取登记者和受抚养人(如果适用)信息。它还会找到对今天有效的合同,即今天在注册开始日期和注册结束日期内。

  3. 根据登记者的信息和合同,服务会获取登记者及其家属可以登记的所有产品的列表。

  4. 该服务使用筛选选项进一步筛选可用产品列表。

  5. 该服务计算每个产品的费率。评级流程基于计划级别评级类型设置或在产品级别设置的集成程序。

    • 如果评级类型设置为 Composite,则费率带。信息用于解析合同行级别的PricingLogData__c数据。

    • 如果评级类型设置为Age,价格将从链接到产品的计算程序中计算。此服务支持 InsProductService.getRatedProducts 支持的所有远程选项。要了解更多信息,请阅读 InsProductService:getRatedProducts。

远程选项

选项

说明

effectiveDate

“YYYY-MM-DD HH:MM:SS” 或 %OmniScriptDataElement%

默认为今天的日期。

服务拉取effectiveDate于EffectiveDate__c、EndDate__c和IsActive之间的产品。

filters

Product2FieldName:Value,Product2FieldName:%Element Name%

使用带有冒号的 API 名称,后跟值或变量。例如,在 OmniScript 中,变量可以是元素的名称,例如输入选项列表。

使用逗号分隔多个筛选器参数。

筛选器可以包括Product2对象上的任何字段。

includeFilterAttrValues

true 或 false

默认为 false。

在输出 JSON 中,与产品阵列一起,添加filterAttrValues对象。此对象包含标记为可筛选的根产品属性,以及可能的值列表。一些 UI 模板使用此列表来筛选大型产品集。不包括子产品属性。

includeInputKeys

只有计算程序使用的输入键在结果中具有值。

includeRawCalculationResult

true 或 false

默认为 false。

在 RawPriceData 键中包含计算过程的全部结果。

mergeList

true 或 false

默认为 false。

通过使用相同的评级程序按产品分组评级程序呼叫,优化评级呼叫。它使用输入对象数组进行一次评级调用。

这在提取大量产品列表时非常有用。多个评级调用可以达到 SQL 限制。评级程序架构已优化,以处理一系列输入对象,并最大限度地减少所需的 SQL 查询数量。

不支持带有聚合步骤的计算程序。

productClasses

“ProductClassName1,ProductClassName2”

产品类名称的逗号分隔列表。将产品列表限制为这些产品类。

stage

用作评级 IP 中的交换机。

输入 JSON

如果将censusId用作输入(显示示例 ID),服务将采用以下输入 JSON:

{"userId": "xxxx",
"contactId": "xxxx",
"contractId": "xxx"}

该服务从人口普查成员对象中检索userInputs,特别是从member.AttributeSelectedValue__c字段中。这些属性需要匹配产品的预期输入。

或者,您可以通过以下方式定义自己的 userInputs:

"additionalInputs": 
{
    "stage": "Quote"
},
{"userId": "xxxx",
"contactId": "xxxx",
"contractId": "xxx",
"userInputs": 
    [
        {"vBirthdate": "1969-09-20",
        "FamilyTier": "Employee Only"}
    ]
}            

输出 JSON

该服务使用产品 JSON 结构模型返回一系列评级产品。这包括 childProducts(如果有)下包含的任何子承保范围规格。它还包括每种产品的所有价格带的价格数据。

在本例中,登记者的合同选项返回三种产品及其价格带等级价格(请参阅RateBandTierPriceData节点)。此处,评级类型设置为 Composite。

{  
   "totalSize":3,
   "records":[  
      {  
         "displaySequence":-1,
         "CalculatedPriceData":{  
            "Family":900.5,
            "Self + Child":555.5,
            "Self + Spouse":590,
            "Self":245
         },
         "Id":"01tf4000002ApR0AAK",
         "Name":"Bronze PPO 5000 (HSA)",
         "Family":"Commercial",
         "ProductCode":"SG-PPO-5000-HSA",
         "LineOfBusiness__c":"Group Health",
         "MarketSegment__c":"Small Group",
         "Type__c":"Medical",
         "SubType__c":"HDHP",
         "IsRecommended__c":false,
         "Tier__c":"Bronze",
         "ImageId__c":"01tf4000002ApR0AAK",
         "PricingSource__c":"GrandTotal",
         "RecordTypeName__c":"Product",
         "IsConfigurable__c":false,
         "productId":"01tf4000002ApR0AAK",
         "Price":"",
         "ImageId":"/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Png&versionId=068f4000002yjYiAAI",
         "planId":"a0sf4000001u0CmAAI",
         "planRateType":"Composite",
         "RateBandTierPriceData":{  
            "Self":{  
               "Price":245,
               "Sequence":"1",
               "Label":"Employee"
            },
            "Self + Spouse":{  
               "Price":590,
               "Sequence":"2",
               "Label":"Employee + Spouse"
            },
            "Self + Child":{  
               "Price":555.5,
               "Sequence":"3",
               "Label":"Employee + Child"
            },
            "Family":{  
               "Price":900.5,
               "Sequence":"5",
               "Label":"Family"
            }
         },
         "childProducts":{  
            ...
         },
         "attributeCategories":{  
            ...
         }         {  
            "displaySequence":-1,
            "CalculatedPriceData":{  
               "Family":1100.5,
               "Self + Child":755.5,
               "Self + Spouse":790,
               "Self":445
            },
            "Id":"01tf4000002ApR8AAK",
            "Name":"Gold PPO 35",
            "Family":"Commercial",
            "ProductCode":"SG-PPO-35",
            "LineOfBusiness__c":"Group Health",
            "MarketSegment__c":"Small Group",
            "Type__c":"Medical",
            "SubType__c":"PPO",
            "IsRecommended__c":false,
            "Tier__c":"Gold",
            "ImageId__c":"01tf4000002ApR8AAK",
            "PricingSource__c":"GrandTotal",
            "RecordTypeName__c":"Product",
            "IsConfigurable__c":true,
            "PricingFormula__c":"Premium",
            "productId":"01tf4000002ApR8AAK",
            "ImageId":"/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Png&versionId=068f4000002yjYjAAI",
            "planId":"a0sf4000001u0ClAAI",
            "planRateType":"Composite",
            "RateBandTierPriceData":{  
               "Self":{  
                  "Price":445,
                  "Sequence":"1",
                  "Label":"Employee"
               },
               "Self + Spouse":{  
                  "Price":790,
                  "Sequence":"2",
                  "Label":"Employee + Spouse"
               },
               "Self + Child":{  
                  "Price":755.5,
                  "Sequence":"3",
                  "Label":"Employee + Child"
               },
               "Family":{  
                  "Price":1100.5,
                  "Sequence":"5",
                  "Label":"Family"
               }
            },
            "childProducts":{  
               ...
            },
            "attributeCategories":{  
               ...
            }
         },
         {  
            "displaySequence":-1,
            "CalculatedPriceData":{  
               "Family":1000.5,
               "Self + Child":655.5,
               "Self + Spouse":690,
               "Self":345
            },
            "Id":"01tf4000002ApQXAA0",
            "Name":"Silver HMO 500",
            "Family":"Commercial",
            "ProductCode":"SG-HMO-500",
            "LineOfBusiness__c":"Group Health",
            "MarketSegment__c":"Small Group",
            "Type__c":"Medical",
            "SubType__c":"HMO",
            "IsRecommended__c":false,
            "Tier__c":"Silver",
            "ImageId__c":"01tf4000002ApQXAA0",
            "PricingSource__c":"GrandTotal",
            "RecordTypeName__c":"Product",
            "IsConfigurable__c":false,
            "productId":"01tf4000002ApQXAA0",
            "Price":"",
            "ImageId":"/sfc/servlet.shepherd/version/renditionDownload?rendition=ORIGINAL_Png&versionId=068f4000002yjYkAAI",
            "planId":"a0sf4000001u0CkAAI",
            "planRateType":"Composite",
            "RateBandTierPriceData":{  
               "Self":{  
                  "Price":345,
                  "Sequence":"1",
                  "Label":"Employee"
               },
               "Self + Spouse":{  
                  "Price":690,
                  "Sequence":"2",
                  "Label":"Employee + Spouse"
               },
               "Self + Child":{  
                  "Price":655.5,
                  "Sequence":"3",
                  "Label":"Employee + Child"
               },
               "Family":{  
                  "Price":1000.5,
                  "Sequence":"5",
                  "Label":"Family"
               }
            },
            "attributeCategories":{  
               ...
            }
         ]
      }
 
正在加载
Salesforce Help | Article