Loading
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Insurance
InsCensusServiceStd:createContacts

InsCensusServiceStd:createContacts

Use this service to create Contacts for census members.

Class: ​InsCensusServiceStd​​

Method: createContacts

How It Works

  1. The service uses the ​​censusMemberIds​​ to retrieve all related ​GroupCensusMember​​ records that don't have a Contact record associated with them. ​ ​ ​
  2. If the ​​GroupCensusMember​​ has a linked Contact, the service skips it. ​ ​ ​
  3. The service creates the Contact and links it into the ​​GroupCensusMember​​ record.
  4. ​ ​ ​ The service uses the duplicateKeys option to identify duplicates. If there is an existing Contact record with the same values for these fields, the service uses the existing Contact record. When there is no duplicateKeys parameter in the input, the service creates a new Contact record for each census member. ​ ​ ​
  5. For each ​​GroupCensusMember​​ the service checks ​isPortalUser__c​ field. If its value is ​true​​, the service creates a user if it is doesn't exist in the org (based on user email). ​
  6. The service creates the user based on these required parameters: ​emailEncoding​​, ​profileId​​, ​timeZoneSID​​, ​localeSID​​, and ​languageLocale​​.

Inputs

Input

Description

censusMemberIds

Required.

List of group census member Ids to create Contacts.

Remote Options

Option

Description

languageLocale

Required.

The local language of the user.

Example: en_US

localeSID 

Required.

Location SID of the user.

Example: en_US

emailEncoding

Email encoding type.

Example: UTF-8

profileId

Required.

Profile Id of the users to be created

Profile Id is the same as User Id.

For more info, refer to Find the Salesforce ID for a User or profile .

timeZoneSID

Time zone SID of user.

Example: America/New_York

duplicateKeys

Comma-delimited field names to check for duplicate fields.

Example: FirstName, LastName, BirthDate

If not used, the service ignores all duplicate fields.

Input JSON

There is no input JSON required for this service.

Output JSON

The service returns a list of contact Ids of successfully created census members.

Ids of GroupCensusMember records

{      
    "censusMemberIds": [
        "0r6RO0000000430YAA",
        "0r6RO000000042vYAA"
    ],
    "duplicateKeys": "FirstName,LastName"
    "emailEncoding": "UTF-8",
    "timeZoneSID": "America/New York",
    "languageLocale": "en_US",
    "localeSID": "en_US",
    "profileId": "00eRO000000OUVRYA4",
}

Ids of Contact records

{    
    "contactIds": [
        "003RO000002yi8iYAA",
        "003RO000002yi8dYAA"
    ]
}
 
Loading
Salesforce Help | Article