Get Group Census Members Action

Get the group census member records from the content document in the specified asynchronous bulk request item record.

The action processes bulk member data that are uploaded through census management workflows, validates the data, identifies duplicate records, and returns structured member records for saving or further processing. It returns all transformed member records along with detailed error information for any records that fail validation.

This action is available in API version 66.0 and later.

Supported REST HTTP Methods

URI
/services/data/v67.0/actions/standard/getGroupCensusMembers
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearertoken

Inputs

Input Details
asyncBulkRequestItem
Type

sobject

Description
Required.
Asynchronous bulk request item record that contains the metadata of the CSV file. This property must include the AdditionalInformation field with serialized JSON that contains these details.
  • contentDocumentId—ID of the content document
  • contentDocumentVersion—Version number of the content document
  • csvColumnMapping—Mapping of CSV columns to target field names
  • duplicateDetectionFields—List of fields that are used to detect duplicates
  • groupCensusId—ID of the parent group census
  • csvHeader—Header row from the CSV file
  • startRowNumber—First CSV row to process
  • endRowNumber—Last CSV row to process
  • duplicateRowNumbersList—List of row numbers identified as duplicates

Outputs

Output Details
duplicateDetectionKeysList
Type

string

Description
Comma-separated list of group census member fields that are used to identify unique group census member records. It's shown if duplicate detection fields are configured in the request.
errorsData
Type

Apex-defined

Description
Errors for the records that failed validation or parsing. Each error includes the row number, error code, error message, and field-level details.
groupCensusId
Type

string

Description
ID of the group census record that's associated with the group census member records that the action returned.
groupCensusMembers
Type

sobject

Description
Group census member records that the action returns. Each record contains mapped field values from CSV columns. Records with errors include an error field with the error message. Maximum number of records that are returned is 2000.

Example

POST

This sample request is for the Get Group Census Members action.

1{
2  "inputs": [
3    {
4      "AdditionalInformation": "{employeeBulkRequestInfo:{groupCensusId:0rfSG0000000vclYAA,contentDocumentName:Archit50Records With groupClass - Archit50Records With groupClass (1),contentDocumentId:069SG000004lwPdYAI,contentDocumentVersion:068SG000004PIp3YAG,duplicateDetectionFields:[Gender,FirstName,Lastname,AssociationWithPrimaryMbr,GroupCensusId],batchSize:null,csvColumnMapping:{First Name:FirstName,Last Name:Lastname,Gender:Gender,Birthdate:Birthdate,SmokerStatus:SmokerStatus,Relationship:AssociationWithPrimaryMbr,Group Class:GroupClassName},executeRules:false},startRowNumber:1,endRowNumber:27,startByteOffset:83,endByteOffset:1717,csvHeader:First Name,Last Name,Gender,Birthdate,Relationship,SmokerStatus,Group Class,Errors,duplicateRowNumbersList:[],shouldExecuteConfigurationRule:false}",
5      "Id": "18cSG0000003DgfYAE"
6    }
7  ]
8}

This sample response is for the Get Group Census Members action.

1[
2  {
3    "actionName": "getGroupCensusMembers",
4    "errors": null,
5    "isSuccess": true,
6    "outputValues": {
7      "duplicateDetectionKeysList": [],
8      "groupCensusId": "0rfSG0000000zY9YAI",
9      "groupCensusMembers": [
10        {
11          "Email": "ross.farley_0001@insgroup.co.in",
12          "AssociationWithPrimaryMbr": "Self",
13          "FirstName": "Ross",
14          "Lastname": "Farley",
15          "Country": "Health Comprehensive|Chronic Disease",
16          "Gender": "Male",
17          "Birthdate": "08/07/1981"
18        },
19        {
20          "Email": "teagan.wallace_0001@gmail.com",
21          "AssociationWithPrimaryMbr": "Spouse",
22          "FirstName": "Teagan",
23          "Lastname": "Wallace",
24          "Country": "Health Comprehensive|Critical Illness & Surgery",
25          "Gender": "Female",
26          "Birthdate": "08/07/1986"
27        }
28      ]
29    }
30  }
31]