When working with CDC events in Salesforce if I have a trigger like this:

trigger OpportunityChangeTrigger on OpportunityChangeEvent (after insert) {
    for (OpportunityChangeEvent event : Trigger.New) {
        EventBus.ChangeEventHeader header = event.ChangeEventHeader;
        System.debug('### OpportunityChangeTrigger \n' + JSON.serialize(event));

My JSON looks like the one below:

What or why I have fields in there outside the ChangeEventHeader, I mean in my case I have fields outside the tracking history of the object, so I am confused, with which fields I can rely onabort, also, is brinign some formula fields that from what I read are not supported, hence the value in there are wrong, why they are embeded in the event?

"attributes": {
    "type": "OpportunityChangeEvent",
    "url": "/services/data/v58.0/sobjects/OpportunityChangeEvent/5102085"
"account_confirmed__c": false,
"ChangeEventHeader": {
    "changeOrigin": "",
    "changeType": "UPDATE",
    "changedFields": [
    "commitNumber": 11077458771673,
    "commitTimestamp": 1689035962000,
    "commitUser": "xxxxxxx",
    "diffFields": [],
    "entityName": "Opportunity",
    "nulledFields": [],
    "recordIds": [
    "sequenceNumber": 1,
    "transactionKey": "0000381d-e366-64d5-eb52-xxxxxx"
"Commission_GST_Referrer_Account__c": false,
"Referrer_Account_Verified__c": false,
"Submit_Consents__c": false,
"IsPrivate": false


You must log in to answer this question.

Browse other questions tagged .