您位於此處:
InsEnrollmentService:getMemberEnrollments
使用此服務來針對成員提取目前的註冊,讓成員可以編輯福利。此服務也會取得一或多個普查成員識別碼,並為成員及其下屬傳回註冊的計畫。
-
保單流程:當
isFsc的值為 true 時觸發。-
當
isFsc為 true 且已填入GroupCensusMember__c.AccountId__c欄位時,系統會觸發「個人帳戶」流程。 -
未填入
GroupCensusMember__c.AccountId__c欄位時,會觸發非個人帳戶流程。
-
-
資產流程:當
IsFsc的值為 false 時觸發。
使用保單記錄時的運作方式
「保單」流程在 isFsc 的值為 true 時適用。服務會執行下列動作:
-
若輸入中未提供任何
effectiveDate,則服務會使用contractId參數來檢取Contract.EnrollmentStartDate__c。 如需詳細資訊,請參閱「遠端選項」區段中的effectiveDate和contractId參數。 -
將原則傳回為
InsurancePolicy記錄。針對「保單」,此服務支援「個人帳戶」流程和解釋為:個人帳戶流程
當普查成員與個人帳戶相關聯時,此流程適用。
-
若
groupAccountId是輸入,則服務會使用 ACR 提取與groupAccountId相關聯之普查成員的personAccountIds。它會傳回所有「保單」,其中nameInsuredId符合這些personAccountIds,且effectiveDate符合輸入中提供的effectiveDate。 -
如果
censusMemberIds是輸入,則服務會提取GroupCensusMember__c記錄。 如需詳細資訊,請參閱「遠端選項」區段中的censusMemberIds參數。 如果已填入普查成員的AccountId__c欄位,則我們會使用這些personAccountIds(GroupCensusMember__c.AccountId__c)。它會傳回所有「保單」,其中nameInsuredId符合personAccountIds,而effectiveDate符合輸入中提供的effectiveDate。
非個人帳戶流程
當普查成員與連絡人相關聯時,此流程適用。
-
此服務使用
accountId來針對普查成員來取得InsurancePolicy物件。這是非個人帳戶流程的必要參數。 -
如果在輸入中提供
censusMemberIds欄位,則服務會提取GroupCensusMember__c記錄。 如果未填入人口普查成員的AccountId__c欄位,則服務會使用GroupCensusMember__c.ContactId__c、accountId和effectiveDate提取成員的原則。系統會根據isFsc參數以及defaultIsFSCOption的自訂設定,以取得的原則類型,如此表格中所述:自訂設定 > 保險組態設定>defaultIsFSCOption
IsFsc 參數
已取得原則
True
NA
InsurancePolicy
False
True
InsurancePolicy
NA
True
InsurancePolicy
-
-
此服務會分別取用
InsurancePolicy或Asset記錄的對象、InsurancePolicyParticipant或AssetPartyRelationship__c。針對 FSC,AssetPartyRelationship__c僅有主要成員的相依性記錄。InsurancePolicyParticipant有主要成員和其下屬的記錄。 -
若
omitChildProducts欄位為false,則服務會提取原則的涵蓋範圍 (AssetCoverage__c) 及其對應的產品中繼資料。 如需詳細資訊,請參閱「遠端選項」區段中的omitChildProducts參數。 -
接著,每個原則都會依主要成員分組。
資產的運作方式
資產流程在 isFsc 值為 false 時適用。針對資產記錄,我們不支援「個人帳戶」。
服務會執行下列動作:
-
若輸入中未提供任何
effectiveDate,則服務會使用contractId參數來檢取Contract.EnrollmentStartDate__c。 如需詳細資訊,請參閱「遠端選項」區段中的effectiveDate和contractId參數。 -
此服務使用
accountId來針對普查成員來取用「資產」物件。這是非 FSC 帳戶流程的必要參數。 -
此服務會使用
censusMemberIds取得GroupCensusMember__c記錄。如需詳細資訊,請參閱「遠端選項」區段中的censusMemberIds參數。 -
若未填入普查成員的
AccountId__c欄位,則服務會使用GroupCensusMember__c.ContactId__c、accountId和effectiveDate欄位來提取成員的原則。所取用的原則類型取決於isFsc參數,以及defaultIsFSCOption的自訂設定,如此表格中所述。自訂設定 > 保險組態設定>defaultIsFSCOption
IsFsc 參數
已取得原則
False
False
資產
NA
False
資產
-
服務會取用對象。若為非 FSC,則其會從
InsurancePolicy或Asset記錄中提取InsurancePolicyParticipant或AssetPartyRelationship__c。-
AssetPartyRelationship__c僅有主要成員的親屬記錄。 -
InsurancePolicyParticipant有主要成員和其下屬的記錄。
-
-
若
omitChildProducts欄位為false,則服務會提取原則的涵蓋範圍 (InsurancePolicyCoverage或AssetCoverage__c) 及其對應的產品中繼資料。 如需詳細資訊,請參閱「遠端選項」區段中的omitChildProducts參數。 -
接著,每個原則都會依主要成員分組。
遠端選項
服務使用 contractId 來從 enrollmentStartDate 取得 effectiveDate,或直接使用 effectiveDate,這在使用兩者時優先於 contractId。
選項 |
描述 |
|---|---|
|
主要普查成員識別碼清單。 |
|
此成員所屬的群組識別碼。 |
|
所要取用保單的普查成員群組識別碼。此參數僅適用於 FSC 流程。 |
|
如果未使用 contractId,則為必要 原則生效日期。 此日期必須一律為保單生效日期的 GMT 日期。 |
|
如果未使用 effectiveDate,則為必要。 可以使用 |
|
若為 true,則服務會提取註冊的選擇性涵蓋範圍。 |
|
若為 false,則服務會提取註冊的涵蓋範圍。 |
|
|
輸出 JSON
以下是輸出 JSON 的格式:
-
輸出 JSON 是普查成員清單,其中包含「名字」、「姓氏」、「普查成員識別碼」和「連絡人識別碼」,以及其註冊。
-
Enrollments節點具有產品詳細資料,如果有相依項目,則具有Dependents節點。其中也包含子系產品和涵蓋範圍詳細資料。 -
Dependents節點包含First Name、Last Name、Id、RelationshipType、ContactId和PartyId。
{
"totalSize": numberOfPrimaryMembersRetrievedWithEnrollments,
"records": [
{
"FirstName": "primaryMemberFirstName",
"LastName": "primaryMemberLastName",
"Id": "primaryMemberGroupCensusMemberId",
"contactId": "primaryMemberContactId",
"enrollments": {
"totalSize": primary member's number of enrollments,
"records": [
{
"policyNumber": "policy number",
"Id": "policy Id",
"productId": "policy's product id",
"accountId": "policy's account id",
"primaryMemberContactId": "primaryMemberContactId",
"productName": "policy's product name",
"Name": "policy's product name",
"EffectiveStart": "policy effective date",
"EffectiveEnd": "policy expiration date",
"Price": 0,
"planId": "policy product's plan id",
"contractId": "contract id",
"ProductCode": "product code",
"RecordTypeName__c": "Product",
"attributeCategories": {},
"Term": "policy term",
"attributeSelectedValues": "{}",
"childProducts": {
"totalSize": numberOfChildProductsOfThePolicyProduct,
"records": [
{
"productId": "productIdOfTheChildProduct",
"productName": "productNameOfTheChildProduct",
"ProductCode": "productCodeOfTheChildProduct",
"Name": "productNameOfTheChildProduct",
"pciId": "productChildItemIdOfTheChildProduct",
"isOptional": ifThisIsAnOptionalCoverage,
"attributeSelectedValues": "{}",
"isSelected": true,
"Id": "coverageId",
"PricingSource": "pricingSource",
"attributeCategories": {}
}
]
},
"dependents": {
"totalSize": primary member's number of dependents,
"records": [
{
"Id": "record id",
"FirstName": "dependentsFirstName",
"LastName": "dependentsLastName",
"relationshipType": "relationshipType",
"partyId": "contact's party id",
"contactId": "dependent's contact Id"
}
]
}
}
]
}
}
]
}以下是輸出 JSON 的範例:
{
"totalSize": 1,
"records": [
{
"FirstName": "Scott",
"LastName": "Matthews",
"Id": "a386F000000yq5LQAQ",
"contactId": "0036F00002Q4wlSQAR",
"enrollments": {
"totalSize": 1,
"records": [
{
"policyNumber": "AA232SDTJ",
"Id": "02i6F000004XE2jQAG",
"productId": "01t6F000007sLsaQAE",
"accountId": "0016F00002GIY4mQAH",
"primaryMemberContactId": "0036F00002Q4wlSQAR",
"productName": "BoMedicalProduct",
"Name": "BoMedicalProduct",
"EffectiveStart": "2018-04-12",
"EffectiveEnd": "2019-02-09",
"Price": 0,
"planId": "a1u6F0000035QYxQAM",
"contractId": "8006F000001GhodQAC",
"ProductCode": "BMP",
"RecordTypeName__c": "Product",
"attributeCategories": {
"totalSize": 1,
"records": [
{
"productAttributes": {
"records": [
{
"userValues": null,
"values": [
{
"disabled": true,
"readonly": true
}
],
"isNotTranslatable": false,
"cloneable": true,
"hidden": false,
"hasRules": false,
"displaySequence": 0,
"label": "TestAttribute_2.2",
"attributeId": "a1R6F00000FNrpDUAT",
"filterable": true,
"disabled": true,
"readonly": true,
"required": false,
"multiselect": false,
"inputType": "number",
"dataType": "currency",
"code": "bfb83baa-662e-674e-9c04-2bad2dc545e1"
}
],
"totalSize": 1
},
"id": "a1Q6F000009rHU0UAM",
"Name": "AlvinProdCattegory2",
"Code__c": "d7539648-3485-0218-802c-c493e727fa67"
}
]
},
"Term": "Custom",
"attributeSelectedValues": "{}",
"childProducts": {
"totalSize": 1,
"records": [
{
"productId": "01t6F00000Akx48QAB",
"productName": "Serious Illness",
"ProductCode": "SERILL",
"Name": "Serious Illness",
"pciId": "a2Q6F000001JiqHUAS",
"isOptional": false,
"attributeSelectedValues": "{}",
"isSelected": true,
"Id": "01t6F00000Akx48QAU",
"PricingSource": "SIPremSelected",
"attributeCategories": {
"totalSize": 1,
"records": [
{
"productAttributes": {
"records": [
{
"userValues": null,
"values": [
{
"disabled": false,
"readonly": false
}
],
"isNotTranslatable": false,
"cloneable": true,
"hidden": false,
"hasRules": false,
"displaySequence": 1,
"label": "SI Amount Override",
"attributeId": "a1R6F00000LE7ESUA1",
"filterable": true,
"disabled": false,
"readonly": false,
"required": false,
"multiselect": false,
"inputType": "number",
"dataType": "currency",
"code": "SIOVER"
},
{
"rules": [
{
"actions": {
"Hide": {
"client": {
"params": {}
},
"remote": {
"params": {}
},
"rest": {
"link": null,
"method": null,
"params": {}
}
}
},
"expression": "%SERILL.SIOVER% > 0",
"ruleType": "Hide"
}
],
"userValues": null,
"values": [
{
"disabled": false,
"readonly": false
}
],
"isNotTranslatable": false,
"cloneable": true,
"hidden": false,
"hasRules": true,
"displaySequence": 9,
"label": "SIB Multiplier",
"attributeId": "a1R6F00000LE7ERUA1",
"filterable": true,
"disabled": false,
"readonly": false,
"required": false,
"multiselect": false,
"inputType": "number",
"dataType": "number",
"code": "SIB"
},
{
"rules": [
{
"actions": {
"Hide": {
"client": {
"params": {}
},
"remote": {
"params": {}
},
"rest": {
"link": null,
"method": null,
"params": {}
}
}
},
"expression": "%SERILL.SIOVER% > 0",
"ruleType": "Hide"
}
],
"userValues": null,
"values": [
{
"disabled": false,
"readonly": false
}
],
"isNotTranslatable": false,
"cloneable": true,
"hidden": false,
"hasRules": true,
"displaySequence": 10,
"label": "SIB Max",
"attributeId": "a1R6F00000LE7EQUA1",
"filterable": true,
"disabled": false,
"readonly": false,
"required": false,
"multiselect": false,
"inputType": "number",
"dataType": "currency",
"code": "SI"
}
],
"totalSize": 3
},
"id": "a1Q6F00000ATYVIUA5",
"Name": "Benefit Calculation",
"Code__c": "11c2dcbf-500e-1180-4581-ff5000cb0ca6",
"displaySequence": 12
}
]
}
}
]
},
"dependents": {
"totalSize": 2,
"records": [
{
"Id": "a0o6F00000WsgPtQAJ",
"FirstName": "Joan",
"LastName": "Robbins",
"relationshipType": "Child",
"partyId": "a376F000008BJIvQAJ",
"contactId": "a376F000008BJIvQAO"
},
{
"partyId": "a0o6F00000Wsh8QQAF",
"Id": "a0o6F00000Wsh8QQAR",
"First Name": "Max",
"Last Name": "Robbins",
"relationshipType": "Spouse",
"contactId": "a376F000008BJIwQAO"
}
]
}
}
]
}
}
]
}