您位於此處:
InsEnrollmentServiceStd:getRatedGroupProducts
使用此服務可計算價格,以選擇具有家庭涵蓋範圍的根計畫。此服務也會在註冊前為保單提供員工和雇主的貢獻,並支援新進成員的比例分配。
類別:InsEnrollmentServiceStd
方法:getRatedGroupProducts
運作方式
- 服務會先驗證輸入資料,以確認:
提供
flowName。提供的flowName及其版本有效且已啟用。存在
memberPlans節點,且會為節點提供有效的censusMemberId。提供的
contractId或rootPlanId有效,或如果提供的rootPlanId的contractGroupPlan與提供的contractId相關聯。每個
censusMemberId僅指定一個memberPlans節點。在memberPlans節點中指定至少一個主要成員,而在memberPlans節點中僅指定一個主要成員。指定的成員屬於家庭和提供的
censusId。指定的
rootPlanId屬於提供的contractId。指定的
planIds有效。確認當
isSaveMemberPremium輸入參數設定為true時,運算式集已設定為將成員層級保費金額設定為memberPremium欄位。
-
如果輸入資料有效,則服務會呼叫輸入中提供為
flowName參數的等級流程。 -
等級流程會建立
InsuranceRatingInput、執行等級流程,然後將等級輸出儲存在InsuranceRatingOutput中。 -
服務會在套用雇主和員工貢獻後傳回等級輸出 (即價格)。如果
IsProrated標記設定為true,則服務也會套用比例分配。 -
服務會在任何驗證或評分流程執行錯誤時傳回包含錯誤詳細資料的錯誤。
遠端選項
| 選項 | 描述 |
|---|---|
flowName
|
必要 用於個人註冊的等級流程名稱 |
censusId
|
必要 群組普查的識別碼,其中包含需要註冊的家庭所有普查成員 |
contractId
|
必要 成員所屬契約的識別碼,以及成員註冊的計畫。 |
rootPlanId
|
必要 要求註冊產品的根契約群組計畫識別碼 |
isProrated
|
選擇性。 如果為 |
isSaveMemberPremium
|
選擇性 表示是否必須計算成員層級保費金額並傳回成員節點中的輸出。預設為 備註 您必須設定運算式集以在 memberPremium 欄位中填入成員層級保費金額,然後選取「包含在輸出中」核取方塊。 |
memberPlans
|
必要 家庭成員清單及其選擇的選擇性涵蓋範圍 |
userInputs
|
選擇性 等級程序用來取得產品價格的輸入資料集 |
additionalInputs
|
選擇性 用於產品評分之其他輸入的序列化金鑰值對應 |
inputKeysList
|
選擇性 用來包含在個別評分結果中之等級輸入的輸入索引鍵逗號分隔清單 |
輸入 JSON
以下是範例輸入 JSON:
{
"flowName": "Rating_Flow",
"contractId": "800RN000000jyCRYAY",
"censusId": "0r6RN0000006HOJYA2",
"rootPlanId": "0rgRN0000000320YAA",
"memberPlans": [
{
"censusMemberId": "0r6RN0000006HNkYAM",
"planIds": [
"0rgRN0000000320YAA",
"0rgRN000000031xYAA"
]
},
{
"censusMemberId": "0r6RN0000006HNuYAM",
"planIds": [
"0rgRN0000000320YAA",
"0rgRN000000031xYAA"
]
},
{
"censusMemberId": "0r6RN0000006HNuYAM"
}
]
}輸出 JSON
以下是範例輸出 JSON:
{
"rootPlanId": "0rgRN0000000320YAA",
"standardPremium": 1000,
"termPremium": 750,
"employerContribution": 550,
"employeeContribution": 450,
"members": [
{
"censusMemberId": "0r6RN0000006HNkYAM",
"termPremium": 550,
"standardPremium": 600,
"employerContribution": 350,
"employeeContribution": 200,
"contributionType": "amount"
},
{
"censusMemberId": "0r6RN0000006HNuYAM",
"termPremium": 450,
"standardPremium": 400,
"employerContribution": 200,
"employeeContribution": 250,
"contributionType": "amount"
}
]
}
以下是錯誤的範例輸出 JSON:
{
"errors": [
{
"error": "Specify a member that belongs to this family.",
"planIds": ["0rgRN0000000320YAA", "0rgRN000000031xYAA"],
"censusMemberId": "0r6RN0000006HOJYA2"
}
]
}