Newer Version Available
Get Compound Fields in Change Events
Compound fields, such as lead or contact Name, Address, and Geolocation fields, are
represented as nested field structures in the event message. In record updates, the
changedFields header field lists each updated component field using this
format: CompoundField.ComponentField.
The updated component field is included in the event message in a nested field
structure.
Compound Field in a New Record
Example
This example shows a change event received after an account is created with a BillingAddress compound field. The BillingAddress field contains its component fields as nested fields.
1{
2 "schema": "Jx8Hz9ElkIUaBf-heF1ShA",
3 "payload": {
4 "BillingAddress": {
5 "State": "CA",
6 "Street": "415 Mission Street",
7 "PostalCode": "94105",
8 "Country": "United States",
9 "City": "San Francisco"
10 },
11 "LastModifiedDate": "2022-06-10T22:42:34.000Z",
12 "OwnerId": "005T1000000HjlbIAC",
13 "CreatedById": "005T1000000HjlbIAC",
14 "ChangeEventHeader": {
15 "commitNumber": 72227828942,
16 "commitUser": "005T1000000HjlbIAC",
17 "sequenceNumber": 1,
18 "entityName": "Account",
19 "changeType": "CREATE",
20 "changedFields": [],
21 "changeOrigin": "com/salesforce/api/soap/55.0;client=SfdcInternalAPI/",
22 "transactionKey": "000001d3-3d55-688b-98ea-39d0a21240f4",
23 "commitTimestamp": 1654900954000,
24 "recordIds": [
25 "001T1000001nI4jIAE"
26 ]
27 },
28 "CreatedDate": "2022-06-10T22:42:34.000Z",
29 "Website": "www.salesforce.com",
30 "LastModifiedById": "005T1000000HjlbIAC",
31 "Name": "Acme"
32 },
33 "event": {
34 "replayId": 1398411
35 }
36}Compound Field in an Updated Record
Example
This example shows a change event received after updating the Street component field of BillingAddress. The Street field is nested under BillingAddress. In the changedFields header field, the updated Street field is listed as BillingAddress.Street.
1{
2 "schema": "Jx8Hz9ElkIUaBf-heF1ShA",
3 "payload": {
4 "BillingAddress": {
5 "Street": "415 Mission Street Suite B"
6 },
7 "LastModifiedDate": "2022-06-10T22:45:32.000Z",
8 "ChangeEventHeader": {
9 "commitNumber": 72227842577,
10 "commitUser": "005T1000000HjlbIAC",
11 "sequenceNumber": 1,
12 "entityName": "Account",
13 "changeType": "UPDATE",
14 "changedFields": [
15 "LastModifiedDate",
16 "BillingAddress.Street"
17 ],
18 "changeOrigin": "com/salesforce/api/soap/55.0;client=SfdcInternalAPI/",
19 "transactionKey": "00000320-1907-fd69-108a-e59563ea5398",
20 "commitTimestamp": 1654901132000,
21 "recordIds": [
22 "001T1000001nI4jIAE"
23 ]
24 }
25 },
26 "event": {
27 "replayId": 1398413
28 }
29}