Loading
保险
InsCensusService:updateMembersWithPlans

InsCensusService:updateMembersWithPlans

使用此服务,以使用主要成员、他们的受抚养人和他们预先登记的计划填充人口普查。

重要
重要 从 Winter '23 开始,我们启用了 InsCensusServiceStd:updateMembersWithPlans 服务,以便与 Salesforce Standard Data Model for Financial Services Cloud 和 Health Cloud 一起使用。现有客户可以继续使用此服务,但保险受管软件包不会提供进一步增强。

类:InsCensusService

方法:updateMembersWithPlans

工作原理

  • 该服务调用 ⁇ updateMembers ⁇ 来保存关于成员的数据,解析 JSON 对象中的成员,并为每个成员添加 ID 和isNewMember。

  • 然后,服务调用 addPlanSelections ⁇ 保存成员的预注册计划。

  • 如果 isNewMember ⁇ 设置为真,addPlanSelections 将删除在 ⁇ GroupCensusMemberPlan__c 中没有条目的任何新创建的成员,如果 onlySaveMembersWithValidProducts ⁇ parameter 设置为真。

远程选项

选项

说明

censusId 

必填

要上载的成员所属的或将所属的人口普查 ID。

用于验证 contractId 是否属于客户/人口普查。

contractId 

必填

客户当前合同的 ID。

用于验证每个成员的计划是合同的一部分。

onlySaveMembersWithValidProducts

布尔值

如果为真,则删除在 ⁇ GroupCensusMemberPlan__c中没有条目的新成员。

duplicateKeys

字符串化列表

GroupCensusMember__c 的 fieldAPI 名称列表

用于确定哪些成员已经存在于表中,在这种情况下,执行更新而不是插入。

输入 JSON

以下是输入 JSON 的格式:

{
   "censusId":"a4D4P000000hbjSUAQ",
   "contractId":"a4D4P000000yujQER",
   "onlySaveMembersWithValidProducts":true,
   "census":{
      "headers":[
         {
            "name":"vlocity_ins__FirstName__c"
         },
         {
            "name":"vlocity_ins__LastName__c"
         },
         {
            "name":"vlocity_ins__IsPrimaryMember__c"
         },
         {
            "name":"vlocity_ins__IsSpouse__c"
         },
         {
            "name":"vlocity_ins__MemberIdentifier__c"
         },
         {
            "name":"vlocity_ins__PrimaryMemberIdentifier__c"
         },
         {
            "name":"Id"
         },
         {
            "name":"vlocity_ins__ContractLineId__c"
         },
         {
            "name":"vlocity_ins__IsOptOut__c"
         },
         {
            "name":"vlocity_ins__OptOutTypes__c"
         }
      ],
      "members":[
         {
            "vlocity_ins__FirstName__c":"Maurice",
            "vlocity_ins__LastName__c":"Johnson",
            "vlocity_ins__IsPrimaryMember__c":true,
            "vlocity_ins__IsSpouse__c":false,
            "vlocity_ins__MemberIdentifier__c":"Maurice",
            "vlocity_ins__PrimaryMemberIdentifier__c":null,
            "vlocity_ins__ContractLineId__c":"a4D4P000000hbjSUAQ;a4D4P000000hbjSUAQ",
            "vlocity_ins__IsOptOut__c" : false,
            "vlocity_ins__OptOutTypes__c" :null
         },
         {
            "vlocity_ins__FirstName__c":"Lizzy",
            "vlocity_ins__LastName__c":"Johnson",
            "vlocity_ins__IsPrimaryMember__c":false,
            "vlocity_ins__IsSpouse__c":false,
            "vlocity_ins__MemberIdentifier__c":"Lizzy",
            "vlocity_ins__PrimaryMemberIdentifier__c":"Maurice",
            "vlocity_ins__ContractLineId__c":"a4D4P000000hbjSUAQ",
            "vlocity_ins__IsOptOut__c" :true,
            "vlocity_ins__OptOutTypes__c" :null
         },
         {
            "vlocity_ins__FirstName__c":"Jamie",
            "vlocity_ins__LastName__c":"Johnson",
            "vlocity_ins__IsPrimaryMember__c":false,
            "vlocity_ins__IsSpouse__c":true,
            "vlocity_ins__MemberIdentifier__c":"Jamie",
            "vlocity_ins__PrimaryMemberIdentifier__c":"Maurice",
            "vlocity_ins__ContractLineId__c":"a4D4P000000hbjSUAQ",
            "vlocity_ins__IsOptOut__c" : false,
            "vlocity_ins__OptOutTypes__c" :"Medical"
         },
         {
            "vlocity_ins__FirstName__c":"Bella",
            "vlocity_ins__LastName__c":"James",
            "vlocity_ins__IsPrimaryMember__c":true,
            "vlocity_ins__IsSpouse__c":false,
            "vlocity_ins__MemberIdentifier__c":"Bella",
            "vlocity_ins__PrimaryMemberIdentifier__c":null,
            "vlocity_ins__ContractLineId__c":null,
            "vlocity_ins__IsOptOut__c" :true,
            "vlocity_ins__OptOutTypes__c" :null
         }
      ]
   },
   "duplicateKeys" : [
      "vlocity_ins__FirstName__c",
      "vlocity_ins__LastName__c"
   ]
}

输出 JSON

以下是输出 JSON 示例:

{  
   "errors":[  
      {  
         "error":"ContractLineItem__c value is not valid:8004P000000zJKjQAM; Medical",
         "vlocity_ins__FirstName__c":"Maurice",
         "vlocity_ins__LastName__c":"Johnson",
         "vlocity_ins__IsPrimaryMember__c":true,
         "vlocity_ins__IsSpouse__c":false,
         "vlocity_ins__MemberIdentifier__c":"Maurice",
         "vlocity_ins__PrimaryMemberIdentifier__c":null
      }
   ],
   "censusMemberIds":[  
      "a4C4P000000ed6dUAA",
      "a4C4P000000ed6eUAA",
      "a4C4P000000ed6fUAA"
   ],
   "memberPlanIds":[  
      "a4B4P000006jKsMUAU",
      "a4B4P000006jKsNUAU",
      "a4B4P000006jKsOUAU",
      "a4B4P000006jKsPUAU"
   ]
}
 
正在加载
Salesforce Help | Article