Loading
保險
InsCensusService:updateMembers

InsCensusService:updateMembers

使用此服務可將普查中的成員更新為輸入 JSON 中的值。此服務的來賓使用者存取權已啟用。

重要
重要 自 Winter '23 起,我們已啟用 InsCensusServiceStd:updateMembers 服務以使用 Financial Services Cloud 和 Health Cloud 的 Salesforce 標準資料模型。現有客戶可以繼續使用此服務,但保險受管理封裝中不會提供進一步的增強功能。

類別:InsCensusService

方法:updateMembers

運作方式

此服務會從輸入 JSON 取用成員,並使用新資料更新普查 (根據指定的 censusId)。

備註
備註

如果成員清單包含主要成員和下屬,則輸入必須有所有成員的識別碼 (vlocity_ins__MemberIdentifier__c)。所有值應是唯一的。

遠端選項

選項

描述

censusId

必要。

要更新成員的普查識別碼。

census

必要。

輸入 JSON,其中包含要更新的成員詳細資料。

輸入 JSON

輸入 JSON 包含 headers (列出要更新的欄位),以及 members (列出成員及其對應的 field-value 配對,包括 fieldId)。

{
    "headers": [
        {
            "type": "STRING",
            "label": "Last Name",
            "fieldId": "",
            "name": "vlocity_ins__LastName__c"
        },
        {
            "type": "STRING",
            "label": "First Name",
            "fieldId": "",
            "name": "vlocity_ins__FirstName__c"
        },
        {
            "type": "DOUBLE",
            "label": "FTE",
            "fieldId": "",
            "name": "vlocity_ins__FTE__c"
        },
        {
            "type": "PICKLIST",
            "label": "Gender",
            "fieldId": "",
            "name": "vlocity_ins__Gender__c"
        },
        {
            "type": "DATE",
            "label": "Birthday",
            "fieldId": "",
            "name": "vlocity_ins__Birthdate__c"
        },
        {
            "type": "BOOLEAN",
            "label": "Is Spouse",
            "fieldId": "",
            "name": "vlocity_ins__IsSpouse__c"
        },
        {
            "type": "BOOLEAN",
            "label": "Primary",
            "fieldId": "",
            "name": "vlocity_ins__IsPrimaryMember__c"
        },
        {
            "type": "REFERENCE",
            "label": "Group Class",
            "fieldId": "",
            "name": "vlocity_ins__GroupClassId__c"
        },
        {
            "type": "STRING",
            "label": "Primary Member Identifier",
            "fieldId": "",
            "name": "vlocity_ins__PrimaryMemberIdentifier__c"
        },
        {
            "type": "STRING",
            "label": "Member Identifier",
            "fieldId": "",
            "name": "vlocity_ins__MemberIdentifier__c"
        },
        {
            "type": "EMAIL",
            "label": "Email",
            "fieldId": "",
            "name": "vlocity_ins__Email__c"
        }
    ],
    "members": [
        {
            "vlocity_ins__LastName__c": "Robbins",
            "vlocity_ins__FirstName__c": "Timmy",
            "vlocity_ins__FTE__c": 1,
            "vlocity_ins__Gender__c": "Male",
            "vlocity_ins__Birthdate__c": "1985-12-13",
            "vlocity_ins__IsSpouse__c": true,
            "vlocity_ins__IsPrimaryMember__c": true,
            "vlocity_ins__GroupClassId__c": "a3yf4000000LdtrAAC",
            "vlocity_ins__MemberIdentifier__c": "1",
	             "vlocity_ins__PrimaryMemberIdentifier__c": null,
	             "vlocity_ins__Email__c": "test@vlocity.com"
        },
        {
            "vlocity_ins__LastName__c": "Robbins",
            "vlocity_ins__FirstName__c": "Jason",
            "vlocity_ins__FTE__c": 1,
            "vlocity_ins__Gender__c": "Male",
            "vlocity_ins__Birthdate__c": "1985-10-13",
            "vlocity_ins__IsSpouse__c": true,
            "vlocity_ins__IsPrimaryMember__c": true,
            "vlocity_ins__GroupClassId__c": "a3yf4000000LdtrAAC",
            "vlocity_ins__MemberIdentifier__c": "2",
	             "vlocity_ins__PrimaryMemberIdentifier__c": null,
	             "vlocity_ins__Email__c": "test1@vlocity.com"
        }
    ]
}

輸出 JSON

服務不會傳回輸出 JSON。如果有任何項目有錯誤,則這些項目會列在輸出中。

{  
   "errors":[  
      {  
	      "error":"Birthdate is invalid",
            "vlocity_ins__LastName__c": "Robbins",
            "vlocity_ins__FirstName__c": "Jason",
            "vlocity_ins__FTE__c": 1,
            "vlocity_ins__Gender__c": "Male",
            "vlocity_ins__Birthdate__c": "1985-10-13",
            "vlocity_ins__IsSpouse__c": true,
            "vlocity_ins__IsPrimaryMember__c": true,
            "vlocity_ins__GroupClassId__c": "a3yf4000000LdtrAAC",
            "vlocity_ins__MemberIdentifier__c": "2",
	             "vlocity_ins__PrimaryMemberIdentifier__c": null,
	             "vlocity_ins__Email__c": "test1@vlocity.com"
        }
   ],
   "censusMemberIds":[  
      "a4C4P000000ed6dUAA"
   ]
}
 
正在載入
Salesforce Help | Article