updateMembersWithPlans(membersWithPlansInputRepresentation, censusId)

Update a family of group census members and their insurance plans in a group census in a single request.

68.0

No

public static ConnectApi.MembersWithPlansRepresentation updateMembersWithPlans(ConnectApi.MembersWithPlansInputRepresentation membersWithPlansInputRepresentation, String censusId)

membersWithPlansInputRepresentation

censusId

  • Type: String
  • ID of the group census that the members belong to.

Type: ConnectApi.MembersWithPlansRepresentation

Use this method to update a family of group census members, along with the insurance plans for each member, in a single call. Specify the group census in censusId and the members in the members property of the input representation.

Each member must specify the id of an existing GroupCensusMember record. Specify plan changes in addedPlans to add plans, in upsertedPlans to add or update plans, and in deletedPlans to remove plans by GroupCensusMemberPlan ID. The groupCensusMemberPlans property applies only when you add members with addMembersWithPlans(membersWithPlansInputRepresentation, censusId).

For each plan that you add or update, specify either contractGroupPlanId for a plan on the census’s contract, or productCode and rootProductCode for an off-contract coverage.

Check the isSuccess property of the response to determine whether the operation succeeded. Request-level errors are in the top-level errors property, which is empty when isSuccess is true. Member-specific errors are in the errors property of each item in members.

Here’s an example of how to update a group census member and the member’s insurance plans from Apex code. Identify each member by its id property, and specify plan changes in addedPlans, upsertedPlans, and deletedPlans rather than in groupCensusMemberPlans.