I am using CDC to get Cases on creation by subscribing to data/CaseEventChannel
channel. But I see I am not receiving the case ID, is this wrong? Is there a way to have this? I need it for updating the Case later from this external system. I do have the Case number, but I don't think this is good enough.
This is an example of what I am receiving:
[
{
"data": {
"schema": "gUPVaV9KrBASxbNnPXsjuw",
"payload": {
"Origin": "Phone",
"LastModifiedDate": "2021-09-07T13:10:46.000Z",
"Description": "a test description",
"IsClosed": false,
"OwnerId": "0053X00000AIAjZQAX",
"CreatedById": "0053X00000AIAjZQAX",
"RecordTypeId": "0123X000000pJSzQAM",
"CaseNumber": "00001151",
"Status": "New",
"Priority": "Medium",
"Type": "Bug",
"IsEscalated": false,
"ChangeEventHeader": {
"commitNumber": 11154253442537,
"commitUser": "0053X00000AIAjZQAX",
"sequenceNumber": 1,
"entityName": "Case",
"changeType": "CREATE",
"changedFields": [],
"changeOrigin": "com/salesforce/api/soap/52.0;client=SfdcInternalAPI/",
"transactionKey": "0002f81b-5aa1-6601-0c12-3b2ae8430b94",
"commitTimestamp": 1631020246000,
"recordIds": [
"5003X00002GqR6OQAV"
]
},
"CreatedDate": "2021-09-07T13:10:46.000Z",
"LastModifiedById": "0053X00000AIAjZQAX"
},
"event": {
"replayId": 7521785
}
},
"channel": "/data/CaseChangeEvent"
},
{
"clientId": "*OMITTED*",
"channel": "/meta/connect",
"successful": true
}
]
When I am going to the API (to services/data/v51.0/query/?q=SELECT...
) I do have the Case ID.