Você está aqui:
InsProductService:getRatedGroupProducts
Esse serviço é usado apenas com produtos de grupo pequeno que usam um censo. O serviço permite que os produtos sejam mantidos com o serviço de produto.
Há algumas maneiras diferentes de usar esse serviço, dependendo de como você usa as opções accountId, censusId e userInput. Aqui estão alguns conceitos importantes que você precisará ter em mente:
-
Você pode usar accountId ou censusId ou ambos para capturar um censo;
-
Se você usar um accountId e nenhum censusId for especificado, será usado o censo do sistema, em que o status é Ativo e o tipo de censo é Grupo;
-
Se você usar um censusId, ele substituirá qualquer censo associado ao accountId;
-
userInputs do mapa de entrada serão obtidos, mas, se não houver userInputs no mapa de entrada, o serviço os gerará de membros do censo;
-
No entanto, você pode usar userInputs do serviço getRatedProducts, se necessário.
O getRatedProducts contém as entradas necessárias para o procedimento de classificação, conforme mapeado nos atributos do produto, incluindo suas especificações de cobertura associadas; especificações de itens segurados; especificações de segurados; e especificações de fatos de classificação.
Como funciona
-
O serviço recebe o censo ativo do Grupo, fornecido por meio de
censusId. Ou você pode passar o serviço umaccountIde o serviço usa oaccountIdpara obter um censo do tipo Sistema.Como alternativa, ele pode tomar
userInputsse não houver censusId ou accountId fornecido.Se você fornecer
userInputsecensusIdouaccountId, o serviço mesclará ouserInputscom osuserInputsgerados do censo de grupo se a opção remotamergeUserInputsestiver definida como true (padrão = false). -
Obtém o tipo Classificação da conta e aceita o Tipo de produto como um filtro de entrada.
-
Chama a
getRatedProductpara preços e retorna planos. O número de planos retornados por página é baseado na opção depageSize(descrito abaixo). -
Obtém
employerContributiondo censo e usa o preço dogetRatedProductpara calcular a contribuição do empregador para cada produto. -
Coloca um nó na raiz JSON para
EmployerContribution.
Opções remotas
Todas as opções remotas usadas no serviço getRatedProducts também podem ser usadas aqui.
Opção |
Descrição |
|---|---|
|
Opcional. ID da conta. Deve usar este ou censusId. |
|
Opcional. ID do censo. Deve usar este ou accountId. |
|
Médico, Dental, Visual ou Vida. Filtros acima inseridos por Product.Type, GroupClass.Type, GroupClassContribution.ProductCategory |
|
Booleano. Se verdadeiro, o
|
|
Booleano. Se verdadeiro, |
|
Defina essa opção como true apenas se você também definir |
|
Se |
|
Valor de string, seja Em geral, se o tamanho do censo for 20 ou inferior, use Idade; se maior, use Composto. Passar para o Procedimento de Integração e acessado por meio de |
|
Número de planos a serem carregados por página do OmniScript. Importante
É altamente recomendado definir esse valor como 9 para evitar qualquer problema de carregamento. |
Defina como |
|
|
Padrão = Mescla o Consulte JSON de entrada, abaixo, para obter mais informações. |
JSON de entrada
Esse serviço não usa um JSON de entrada.
Opcionalmente, você pode fornecer nós de userInputs aqui, por exemplo, se estiver usando a opção de controle remoto mergeUserInputs. Nesse caso, uma chave de instância exclusiva deve ser definida no userInput e no registro do membro do censo (deve ser a mesma chave) para que o serviço possa combinar cada userInput com cada registro do membro do censo. (É uma boa ideia usar o ID do membro do censo como a chave de instância.)
"userInputs": [
{
"SG-Census-RF.SG_CM_Calculate": "true",
"SG-Census-RF.SG_CM_Age": 48,
"SG-Census-RF.Id": "a57g00000009i0wAAA",
"SG-Census-RF.SG_CM_Zip": "48005",
"SG-Census-RF.instanceKey": "a57g00000009i0wAAA"
},
{
"SG-Census-RF.SG_CM_Calculate": "true",
"SG-Census-RF.SG_CM_Age": 32,
"SG-Census-RF.Id": "a57g00000009i0rAAA",
"SG-Census-RF.SG_CM_Zip": "48005",
"SG-Census-RF.instanceKey": "a57g00000009i0rAAA"
}
]
}Você também deve preencher o CensusMember.AttributeSelectedValue__c no campo do membro do censo com um JSON semelhante a este, com a mesma chave de instância:
{
"SG_empOnlyCount": "",
"SG_empSpouseCount": "",
"SG_empChildCount": "",
"SG_empFamilyCount": "",
"SG_CM_MemberClass": null,
"SG_CM_Age": 48,
"SG_CM_State": null,
"SG_CM_Gender": null,
"SG_CM_Smoker": false,
"SG_CM_IsPrimary": false,
"SG_CM_IsSpouse": false,
"SG_CM_DOB": null,
"SG_CM_Relationship": null,
"SG_CM_Zip": null,
"Id": null,
"SG_CM_MemberType": null,
"SG_CM_Calculate": true,
"instanceKey":”a57g00000009i0wAAA”
}JSON de saída
O serviço retorna employerContributions com base na productId. Os resultados são formatados conforme o objeto JSONResult.
-
Se o tipo de contribuição for Valor, somente o atributo
contributionAmountserá retornado -
Se o tipo de contribuição for Porcentagem,
contributionPercentserá retornado -
Se o preço do produto estiver disponível, o
contributionAmountcalculado será devolvido
{
"employerContributions": {
"01tf4000002U25LAAS": [
{
"contributionAmount": 363.999,
"contributionPercent": 30,
"Member.Id": "a3ef4000000mPIaAAM"
},
{
"contributionAmount": 363.999,
"contributionPercent": 30,
"Member.Id": "a3ef4000000mPIbAAM"
}
],
"01tf4000002U25KAAS": [
{
"contributionAmount": 100,
"Member.Id": "a3ef4000000mPIaAAM"
},
{
"contributionAmount": 100,
"Member.Id": "a3ef4000000mPIbAAM"
}
]
},
"result": {
"totalSize": 2,
"records": [
{
"uiStates": {},
"nameResult": {
"childProducts": {
"totalSize": 2,
"records": [
{
"uiStates": {},
"nameResult": {},
"messages": [],
"fields": {
"pciId": "a2mf4000000lTZiAAM",
"productId": "01tf4000002U25MAAS",
"TotalInsuredFormula__c": null,
"Term__c": "Annual",
"PricingFormula__c": null,
"IsConfigurable__c": false,
"RecordTypeName__c": "RatingFactSpec",
"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": null,
"ProductCode": "RF0",
"Family": null,
"Description": null,
"Name": "censusRatingFact",
"Id": "01tf4000002U25MAAS"
},
"displaySequence": 1,
"actions": {}
},
{
"uiStates": {},
"nameResult": {},
"messages": [],
"fields": {
"pciId": "a2mf4000000lTZjAAM",
"productId": "01tf4000002U25NAAS",
"TotalInsuredFormula__c": null,
"Term__c": "Annual",
"PricingFormula__c": null,
"IsConfigurable__c": false,
"RecordTypeName__c": "RatingFactSpec",
"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": null,
"ProductCode": "RF1",
"Family": null,
"Description": null,
"Name": "censusMemRatingFact",
"Id": "01tf4000002U25NAAS"
},
"displaySequence": 2,
"actions": {}
}
],
"name": null,
"messages": [],
"description": null,
"data": {
"totalSize": null,
"messages": [],
"dataMap": {},
"actions": {}
},
"actions": {}
}
},
"messages": [],
"fields": {
"Price": "",
"productId": "01tf4000002U25KAAS",
"TotalInsuredFormula__c": null,
"Term__c": null,
"PricingFormula__c": null,
"IsConfigurable__c": false,
"RecordTypeName__c": "Product",
"PricingSource__c": "AggOutput",
"ImageId__c": null,
"Tier__c": null,
"IsRecommended__c": false,
"RateBandId__c": null,
"SubType__c": null,
"Type__c": "Medical",
"MarketSegment__c": null,
"LineOfBusiness__c": null,
"ProductCode": "rootProd",
"Family": null,
"Description": null,
"Name": "rootProd",
"Id": "01tf4000002U25KAAS",
"RawPriceData": [
{
"calculationResults": [
{
"ProcedureOutput": 1000,
"TheMatrix__Premium": "100",
"TheMatrix__PremiumRBSelf": "90",
"TheMatrix__PremiumRBSpouse": "110",
"ID": "0"
},
{
"ProcedureOutput": 1500,
"TheMatrix__Premium": "150",
"TheMatrix__PremiumRBSelf": "140",
"TheMatrix__PremiumRBSpouse": "160",
"ID": "1"
},
{
"ProcedureOutput": 2000,
"TheMatrix__Premium": "200",
"TheMatrix__PremiumRBSelf": "190",
"TheMatrix__PremiumRBSpouse": "210",
"ID": "2"
},
{
"ProcedureOutput": 1300,
"TheMatrix__Premium": "130",
"TheMatrix__PremiumRBSelf": "120",
"TheMatrix__PremiumRBSpouse": "240",
"ID": "3"
},
{
"ProcedureOutput": 2000,
"TheMatrix__Premium": "200",
"TheMatrix__PremiumRBSelf": "190",
"TheMatrix__PremiumRBSpouse": "210",
"ID": "4"
},
{
"ProcedureOutput": 1300,
"TheMatrix__Premium": "130",
"TheMatrix__PremiumRBSelf": "120",
"TheMatrix__PremiumRBSpouse": "240",
"ID": "5"
}
],
"aggregationResults": null
}
],
"CalculatedPriceData": {}
},
"displaySequence": -1,
"actions": {}
},
{
"uiStates": {},
"nameResult": {
"childProducts": {
"totalSize": 2,
"records": [
{
"uiStates": {},
"nameResult": {},
"messages": [],
"fields": {
"pciId": "a2mf4000000lTZkAAM",
"productId": "01tf4000002U25MAAS",
"TotalInsuredFormula__c": null,
"Term__c": "Annual",
"PricingFormula__c": null,
"IsConfigurable__c": false,
"RecordTypeName__c": "RatingFactSpec",
"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": null,
"ProductCode": "RF0",
"Family": null,
"Description": null,
"Name": "censusRatingFact",
"Id": "01tf4000002U25MAAS"
},
"displaySequence": 1,
"actions": {}
},
{
"uiStates": {},
"nameResult": {},
"messages": [],
"fields": {
"pciId": "a2mf4000000lTZlAAM",
"productId": "01tf4000002U25NAAS",
"TotalInsuredFormula__c": null,
"Term__c": "Annual",
"PricingFormula__c": null,
"IsConfigurable__c": false,
"RecordTypeName__c": "RatingFactSpec",
"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": null,
"ProductCode": "RF1",
"Family": null,
"Description": null,
"Name": "censusMemRatingFact",
"Id": "01tf4000002U25NAAS"
},
"displaySequence": 2,
"actions": {}
}
],
"name": null,
"messages": [],
"description": null,
"data": {
"totalSize": null,
"messages": [],
"dataMap": {},
"actions": {}
},
"actions": {}
}
},
"messages": [],
"fields": {
"Price": 1213.33,
"productId": "01tf4000002U25LAAS",
"TotalInsuredFormula__c": null,
"Term__c": null,
"PricingFormula__c": null,
"IsConfigurable__c": false,
"RecordTypeName__c": "Product",
"PricingSource__c": "AggOutput",
"ImageId__c": null,
"Tier__c": null,
"IsRecommended__c": false,
"RateBandId__c": "a4Gf4000000kocZEAQ",
"SubType__c": null,
"Type__c": "Dental",
"MarketSegment__c": null,
"LineOfBusiness__c": null,
"ProductCode": "rootProd2",
"Family": null,
"Description": null,
"Name": "rootProd2",
"Id": "01tf4000002U25LAAS",
"RawPriceData": [
{
"calculationResults": [
{
"ProcedureOutput": 800,
"TheMatrix__Premium": "100",
"TheMatrix__PremiumRBSelf": "90",
"TheMatrix__PremiumRBSpouse": "110",
"ID": "0"
},
{
"ProcedureOutput": 1200,
"TheMatrix__Premium": "150",
"TheMatrix__PremiumRBSelf": "140",
"TheMatrix__PremiumRBSpouse": "160",
"ID": "1"
},
{
"ProcedureOutput": 1600,
"TheMatrix__Premium": "200",
"TheMatrix__PremiumRBSelf": "190",
"TheMatrix__PremiumRBSpouse": "210",
"ID": "2"
},
{
"ProcedureOutput": 1040,
"TheMatrix__Premium": "130",
"TheMatrix__PremiumRBSelf": "120",
"TheMatrix__PremiumRBSpouse": "240",
"ID": "3"
},
{
"ProcedureOutput": 1600,
"TheMatrix__Premium": "200",
"TheMatrix__PremiumRBSelf": "190",
"TheMatrix__PremiumRBSpouse": "210",
"ID": "4"
},
{
"ProcedureOutput": 1040,
"TheMatrix__Premium": "130",
"TheMatrix__PremiumRBSelf": "120",
"TheMatrix__PremiumRBSpouse": "240",
"ID": "5"
}
],
"aggregationResults": {
"AggOutput": 1213.33
}
}
],
"CalculatedPriceData": {
"AggOutput": 1213.33
}
},
"displaySequence": -1,
"actions": {}
}
],
"name": null,
"messages": [],
"description": null,
"data": {
"totalSize": null,
"messages": [],
"dataMap": {},
"actions": {}
},
"actions": {}
}
}
