---
schema_version: "1"
id: cc15fbfcb4d94595c6ef8cfb5db1e27542ecafc3e571b4c853856c35bf6ed45d
title: Create Contacts and Users from Group Census Members Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/actions_obj_create_contacts_users_from_group_census.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_create_contacts_users_from_group_census.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5c6fd2833fb1f16551e9339971426c49b66f9a4dec7b0e4d8c46adb6ea57010b
description: Create contacts and portal users for group census or group census members.
---
# Create Contacts and Users from Group Census Members Action

Create contacts and portal users for group census or group census members.

This action supports bulk processing, custom field mapping, and duplicate record detection. It converts insurance group census members to Salesforce Contacs, enables member self-service through portal users, supports B2C enrollment workflows, and maintains relationship data for benefits administration and household grouping.

This action is available in API version 65.0 and later.

## Special Access Rules

The org must have Digital Insurance Group Benefits enabled. To use this action, you need Census Management user access.

## Supported REST HTTP Methods

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

Where XX.X is the latest API version.

**Formats**: JSON

**HTTP Methods**: POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| contactFieldsMapping | Apex-defined | Map of Group Census Member Object fields to Contact fields. |
| createPortalUsers | boolean | Indicates whether the portal users must be created ( true ) or not ( false ). |
| emailEncodingKey | string | Required if createPortalUsers is set to true . Email encoding key to use to create the user records. For example, ISO-8859-1 or UTF-8. |
| groupCensusId | string | Required if groupCensusMembers isn't specified. ID of the group census to create contacts and portal users for the associated group census members. |
| groupCensusMembers | sobject | Required if groupCensusId isn't specified. Group census member records to create contacts and portal users for. |
| localeSidKey | string | Required if createPortalUsers is set to true . Locale for the user, which affects the format of dates, times, and numbers. |
| languageLocaleKey | string | Required if createPortalUsers is set to true . Language to use to create the user records. For example, fr for French or zh\_Cw for Chinese (Traditional). |
| matchingKeysList | string | Comma-separated list of contact object fields to detect duplicate contact records. |
| profileId | string | Required if createPortalUsers is set to true . ID of the profile to create the user records for. |
| timeZoneSidKey | string | Required if createPortalUsers is set to true . Time zone for the user, such as America or Los\_Angeles. |

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| createContactsOutputRep | Apex-defined | An apex ind\_ins\_grpben\_\_ContactsAndUsersCreationOutput record that contains the details of the results. |

## Example

Sample Request

{
  "inputs": \[
    {
      "groupCensusMembers": \[
        {
          "Id": "0r6xx00000001tuAAA"
        },
        {
          "Id": "0r6xx00000001tvAAA"
        }
      \],
      "matchingKeysList": \[
        "Email",
        "LastName"
      \],
      "contactFieldsMapping": \[
        {
          "key": "FirstName\_\_c",
          "value": "FirstName"
        },
        {
          "key": "Email\_\_c",
          "value": "Email"
        }
      \],
      "createPortalUsers": true,
      "profileId": "00exx000000n0ywAAA",
      "timeZoneSidKey": "America/New\_York",
      "localeSidKey": "en\_US",
      "emailEncodingKey": "UTF-8",
      "languageLocaleKey": "en\_US"
    }
  \]
}

Sample Response

{
  "outputs": \[
    {
      "createContactsOutputRep": {
        "memberContactDetails": \[
          {
            "groupCensusMemberId": "0r6xx00000001tuAAA",
            "contactId": "003xx000004WhsgAAC",
            "userId": "005xx000001X8vwAAC"
          }
        \],
        "errors": \[
          {
            "code": "SF-0004-0058",
            "message": "Contact already exists for member",
            "additionalInfo": \[
              {
                "key": "memberId",
                "value": "0r6xx00000001tvAAA"
              }
            \]
          }
        \]
      },
      "isSuccess": true
    }
  \]
}