Loading
保險
InsProductService:getRatedGroupProducts

InsProductService:getRatedGroupProducts

此服務僅用於使用普查的小型群組產品。此服務允許將產品與產品服務一起保留。

類別:InsProductService

方法:getRatedGroupProducts

根據您使用 accountId、censusId 和 userInput 選項的方式,您可以使用此服務幾種不同的方式。以下是您需要記住的一些重要概念:

  • 您可以使用 accountId 或 censusId 或兩者來提取普查;

  • 如果您使用 accountId 且未指定 censusId,則會使用系統普查,其中狀態為「啟用」且普查類型為 Group;

  • 如果您使用 censusId,則其會覆寫與 accountId 相關聯的任何普查;

  • userInputs from input map will be taken,但如果輸入地圖中沒有 userInputs,則服務會從普查成員產生 userInputs;

  • 不過,您可以視需要使用 getRatedProducts 服務中的 userInputs。

備註
備註

getRatedProducts 包含等級程序所需的輸入,如產品屬性中對應,包括其相關的涵蓋範圍規格、保險項目規格、受保方規格和等級實情規格。

運作方式

  1. 服務會取得透過 censusId 提供的已啟用群組普查。或者您可以傳遞服務的 accountId,且服務會使用 accountId 取得「系統」類型的普查。

    或者,如果未提供 censusId 或 accountId,則可能需要 userInputs。

    如果您同時提供 userInputs 和 censusId 或 accountId,如果遠端選項 mergeUserInputs 設定為 true (預設 = false),則服務會將 userInputs 與從群組普查產生的 userInputs 合併。

  2. 取得帳戶的「等級」類型,並接受「產品類型」作為輸入篩選條件。

  3. 呼叫 getRatedProduct 以取得定價,然後傳回計畫。每頁傳回的計畫數目以 pageSize 選項為依據 (如下所述)。

  4. 從普查中提取 employerContribution,然後使用來自 getRatedProduct 的價格來計算每個產品的雇主貢獻。

  5. 將節點放在 JSON 根中以供 EmployerContribution 使用。

遠端選項

備註
備註

您也可以在此使用 getRatedProducts 服務中使用的所有遠端選項。

選項

描述

accountId

選擇性。

帳戶識別碼。必須使用 this 或 censusId。

censusId

選擇性。

普查識別碼。必須使用 this 或 accountId。

productCategory

醫療、牙科、視力或生命。

依 Product.Type、GroupClass.Type、

GroupClassContribution.ProductCategory

includeContributionInUserInput

布林值。

如果為 true,則產生的 userInputs 會根據 accountId 或 censusId 包含每個成員的雇主貢獻,且會新增下列範例屬性:

  • Dental.contributionAmount

  • Medical.contributionPercent

excludeContributionInOutput

布林值。

如果為 true,則不會在 outputJSON 中傳回 employerContributions

omitChildren

true 或 false

只有在您將 omitRating 設定為 true 時,才將此選項設定為 true。這會傳回沒有定價的產品。

omitRating

true 或 false

如果為 true,則服務會不定價退回產品。

rateType

字串值,無論是 Age 或 Composite。

通常,如果普查大小為 20 或以下,請使用 Age;如果大於,請使用 Composite。

通過整合程序並透過 %options.rateType% 存取

pageSize

每個 OmniScript 頁面要載入的計畫數。

重要
重要

強烈建議將此值設定為 9,以避免任何載入問題。

validateCoverageSelection

true 或 false

如果您需要服務執行的驗證規則,則設定為 true。

mergeUserInputs

true 或 false

預設 = false。

將 userInputs 與從「群組普查」中產生的 userInputs 合併 (設定為 true)。

如需詳細資訊,請參閱下方的輸入 JSON。

輸入 JSON

此服務不使用輸入 JSON。

或者,您可以在此提供 userInputs 節點,例如如果您使用的是 mergeUserInputs 遠端選項。在此情況中,必須在 userInput 和普查成員記錄中定義唯一的例項金鑰 (必須是相同的金鑰),服務才能將每個 userInput 與每個普查成員記錄進行比對。(最好使用普查成員識別碼作為例項索引鍵。)

"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"
}
]
}

您也必須使用與以下類似的 JSON 來填入普查成員欄位中的 CensusMember.AttributeSelectedValue__c,並使用相同的例項金鑰:

{
"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

服務會根據 productId 傳回 employerContributions。結果會根據 JSONResult 物件格式化。

  • 如果貢獻類型為「金額」,則只會傳回 contributionAmount 屬性

  • 如果貢獻類型為「百分比」,則會傳回 contributionPercent

  • 如果「產品價格」可用,則會傳回計算的 contributionAmount

{
  "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": {}
  }
}
 
正在載入
Salesforce Help | Article