1

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.

1 Answer 1

4

I think it does give the case Id. Check the JSON part

"recordIds": [
            "5003X00002GqR6OQAV"
          ]
2
  • No, that is not the case ID, is the record types the Case has, this is different. Thank you anyway. EDIT: hmm will take a second look a it, maybe it is what you are saying, yes, and I am thinking this is the record type. Will get back to you :), thanks again
    – hosseio
    Sep 7, 2021 at 13:35
  • totally right! apologies, I was completely wrong, super contaminated at this point. Thank you again man
    – hosseio
    Sep 7, 2021 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .