Newer Version Available

This content describes an older version of this product. View Latest

Example: Delivered Enriched Event Messages

Check out example event messages that contain enriched fields for update and delete operations.

As a beta feature, Change Data Capture Enrichment is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for Change Data Capture Enrichment in the Trailblazer Community. For information on enabling this feature in your org, contact Salesforce.

Note

This change event for an account update includes two enriched fields, Industry and the External_Account_ID__c custom field. The changedFields field indicates which fields changed. In this example, only the Fax field and the LastModifiedDate system field changed.

1{
2  "schema": "I8b-dYxvxs5wOtCBr4qsew",
3  "payload": {
4    "Industry": "Biotechnology",
5    "LastModifiedDate": "2019-07-29T19:20:38.000Z",
6    "External_Account_ID__c": "1ABC",
7    "ChangeEventHeader": {
8      "commitNumber": 74487681550,
9      "commitUser": "005RM000001hv4SYAQ",
10      "sequenceNumber": 1,
11      "entityName": "Account",
12      "changeType": "UPDATE",
13      "changedFields": [
14        "Fax",
15        "LastModifiedDate"
16      ],
17      "changeOrigin": "com/salesforce/api/soap/47.0;client=SfdcInternalAPI/",
18      "transactionKey": "0005e192-9e62-2554-3880-3c3718bd6308",
19      "commitTimestamp": 1564428039000,
20      "recordIds": [
21        "001RM000004UF9sYAG"
22      ]
23    },
24    "Fax": "4155551212"
25  },
26  "event": {
27    "replayId": 12
28  }
29}

A change event message for a delete operation includes the non-empty enriched fields, Industry and External_Account_ID__c, but no other record fields.

1{
2  "schema": "I8b-dYxvxs5wOtCBr4qsew",
3  "payload": {
4    "Industry": "Biotechnology",
5    "External_Account_ID__c": "1ABC",
6    "ChangeEventHeader": {
7      "commitNumber": 74488073004,
8      "commitUser": "005RM000001hv4SYAQ",
9      "sequenceNumber": 1,
10      "entityName": "Account",
11      "changeType": "DELETE",
12      "changedFields": [],
13      "changeOrigin": "com/salesforce/api/soap/47.0;client=SfdcInternalAPI/",
14      "transactionKey": "0005e1af-70bd-cce1-59c2-00f45864bbfb",
15      "commitTimestamp": 1564428196000,
16      "recordIds": [
17        "001RM000004UF9sYAG"
18      ]
19    }
20  },
21  "event": {
22    "replayId": 13
23  }
24}