---
schema_version: "1"
id: 1c12c1f80746c55b53baf2a58856405480ce1060738e1171c27f1b182e5767ac
title: Save Group Census Member Plans Data Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/actions_obj_save_group_census_members_plans_data.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_save_group_census_members_plans_data.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 25637d579936773470a83d7172905e2f87fc55050164b93fd604dcf52477c0e0
description: Validate and save group census member plans for the new members. Update the group census member plans for existing members.
---
# Save Group Census Member Plans Data Action

Validate and save group census member plans for the new members. Update the group census member plans for existing members.

This action processes member enrollment information, validates plan assignments, and handles primary and dependent member relationships. It manages plan updates, including plan additions and deletions, and supports bulk processing of member plans with comprehensive error handling and logging.

This action is available in API version 66.0 and later.

## Special Access Rules

To use this invocable action, you must have Digital Insurance Group Benefits Census Management user access

## Supported REST HTTP Methods

**URI**: /services/data/vXX.X/actions/standard/saveGrpCensusMbrPlansData

Where XX.X is the latest API version.

**Formats**: JSON, XML

**HTTP Methods**: POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| asyncBulkRequestItemId | string | Required. ID of the asynchronous bulk request item to use for tracking and error logging. |
| groupCensusId | string | Required. ID of the group census record. |
| groupCensusMemberPlans | sobject | Required. List of group census member plan records to save. |
| groupCensusMembers | sobject | Required. List of group census member records to process. |
| shouldLogErrors | boolean | Required. Indicates whether errors that occur while saving group census member plans are recorded in a content document ( true ) or not ( false ). |

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| errorsData | Apex-defined | Error details for the failed records. |
| groupCensusMemberPlans | sobject | Details of group census member plan records that are successfully saved. |

## Example

**POST**

This sample request is for the Save Group Census Member Plans Data action.

{
  "inputs": \[
    {
      "groupCensusMembers": \[
        {
          "Id": "a1B000000000001",
          "MemberRefId": "M001",
          "PrimaryGroupCensusMemberId": null,
          "GroupCensusId": "a3B000000000001",
          "MemberKey": "EMP001",
          "AssociationWithPrimaryMbr": "Self"
        },
        {
          "Id": "a1B000000000002",
          "MemberRefId": "M002",
          "PrimaryGroupCensusMemberId": "a1B000000000001",
          "GroupCensusId": "a3B000000000001",
          "MemberKey": "DEP001",
          "AssociationWithPrimaryMbr": "Spouse"
        }
      \],
      "groupCensusMembersPlans": \[
        {
          "ContractGroupPlanId": "p1B000000000001",
          "PlanName": "Health Plan A",
          "PlanType": "Medical",
          "GroupCensusMember": "a1B000000000001",
          "MemberRefId": "M001"
        },
        {
          "ContractGroupPlanId": "p1B000000000002",
          "PlanName": "Dental Plan B",
          "PlanType": "Dental",
          "GroupCensusMember": "a1B000000000001",
          "MemberRefId": "M001"
        },
        {
          "ContractGroupPlanId": "p1B000000000001",
          "PlanName": "Health Plan A",
          "PlanType": "Medical",
          "GroupCensusMember": "a1B000000000002",
          "MemberRefId": "M002"
        }
      \],
      "shouldLogErrors": true,
      "asyncBulkRequestItemId": "a2B000000000001",
      "groupCensusId": "a3B000000000001"
    }
  \]
}

This sample response is for the Save Group Census Member Plans Data action.

{
  "outputs": \[
    {
      "savedGroupCensusMembersPlans": \[
        {
          "Id": "a4B000000000001",
          "Name": "Plan-001",
          "GroupCensusMemberId": "a1B000000000001",
          "ContractGroupPlanId": "p1B000000000001",
          "CreatedDate": "2025-01-27T10:30:00.000Z",
          "CreatedById": "005000000000001"
        },
        {
          "Id": "a4B000000000002",
          "Name": "Plan-002",
          "GroupCensusMemberId": "a1B000000000001",
          "ContractGroupPlanId": "p1B000000000002",
          "CreatedDate": "2025-01-27T10:30:00.000Z",
          "CreatedById": "005000000000001"
        },
        {
          "Id": "a4B000000000003",
          "Name": "Plan-003",
          "GroupCensusMemberId": "a1B000000000002",
          "ContractGroupPlanId": "p1B000000000001",
          "CreatedDate": "2025-01-27T10:30:00.000Z",
          "CreatedById": "005000000000001"
        }
      \],
      "errors": \[
        {
          "errorMessage": "Invalid plan assignment for member M003",
          "recordId": "M003",
          "errorType": "VALIDATION\_ERROR",
          "fieldName": "ContractGroupPlanId"
        }
      \],
      "isSuccess": true
    }
  \]
}