Create Person Accounts and Users from Group Census Members Action

Create person accounts and portal users for group census or group census members. This action supports bulk processing, custom field mapping, and duplicate detection.

This action supports bulk processing, custom field mapping, and duplicate record detection. It converts insurance group census members to Salesforce Person Accounts, 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 Person Accounts and 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/createAcctUsrFrGrpCens

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 

InputTypeDescription
accountFieldsMappingApex-definedMap of Group Census Member Object fields to Account fields.
createPortalUsersbooleanIndicates whether portal users must be created ( true ) or not ( false ).
emailEncodingKeystringRequired if createPortalUsers is set to true . Email encoding key to use to create the user records. For example, ISO-8859-1 or UTF-8.
groupCensusIdstringRequired if a list of groupCensusMembers isn’t specified. ID of the group census to create person accounts and portal users for the associated group census members.
groupCensusMemberssobjectRequired if groupCensusId isn’t specified. Group census member records to create person accounts and portal users.
languageLocaleKeystringRequired 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).
localeSidKeystringRequired if createPortalUsers is set to true . Locale for the user, which affects the format of dates, times, and numbers.
matchingKeysListstringComma-separated list of account object fields to detect duplicate account records.
profileIdstringRequired if createPortalUsers is set to true . ID of the profile to create the user records for.
recordTypeNamestringAPI name of the record type to create the person accounts for.
timeZoneSidKeystringRequired if createPortalUsers is set to true . Time zone for the user, such as America or Los_Angeles.

Outputs 

OutputTypeDescription
createAccountsOutputRepApex-definedAn Apex ind_ins_grpben__AccountsAndUsersCreationOutput record that contains the details of the results.

Example 

Sample Request

1{
2  "inputs": [
3    {
4      "groupCensusId": "0rfxx000000006dAAA",
5      "recordTypeName": "IndividualMember",
6      "matchingKeysList": ["PersonEmail", "LastName", "PersonBirthdate"],
7      "accountFieldsMapping": [
8        { "key": "FirstName__c", "value": "FirstName" },
9        { "key": "LastName__c", "value": "LastName" },
10        { "key": "Email__c", "value": "PersonEmail" },
11        { "key": "Birthdate__c", "value": "PersonBirthdate" }
12      ],
13      "createPortalUsers": true,
14      "profileId": "00exx000000n0ywAAA",
15      "timeZoneSidKey": "America/New_York",
16      "localeSidKey": "en_US",
17      "emailEncodingKey": "UTF-8",
18      "languageLocaleKey": "en_US"
19    }
20  ]
21}

Sample Response

1{
2  "outputs": [
3    {
4      "AccountsAndUsersCreationOutput": {
5        "groupCensusId": "0rfxx000000006dAAA",
6        "memberAccountDetails": [
7          {
8            "groupCensusMemberId": "0r6xx00000001tqAAA",
9            "accountId": "001xx000003Ga7KAAS",
10            "userId": "005xx000001X8vwAAC"
11          }
12        ],
13        "errors": [
14          {
15            "code": "SF-0004-0054",
16            "message": "Person Account already exists for member",
17            "additionalInfo": [
18              {
19                "key": "memberId",
20                "value": "0r6xx00000001u4AAA"
21              }
22            ]
23          }
24        ]
25      },
26      "isSuccess": true
27    }
28  ]
29}