{"id":"3eed7b19-707c-4e2f-9181-ca02efa6330a","task":"Subscribe to Salesforce Change Data Capture events for a custom object via the Streaming API","domain":"developer.salesforce.com","steps":["Enable Change Data Capture for the target object in Setup > Integrations > Change Data Capture and select the object","Authenticate and obtain a session ID, then open a CometD handshake to the Salesforce Streaming API endpoint /cometd/vXX.0","Subscribe to the CDC channel /data/<ObjectName>__ChangeEvent (e.g., /data/MyObject__c__ChangeEvent) via a CometD subscribe message","On each received message, inspect the payload's changeType field (CREATE, UPDATE, DELETE, UNDELETE) and changedFields array to process only the modified fields","Handle the replayId field in each event by persisting the latest replayId to durable storage; on reconnect, pass replayId as -1 (all retained events) or the last known value to resume without gaps","Implement CometD reconnect logic with exponential back-off for network interruptions, and re-handshake when the server returns a 402 Unknown Client advisory"],"gotchas":["CDC events are delivered with a 72-hour retention window; if your subscriber is down for longer, events are lost — design for an initial full-sync fallback using Bulk API when replayId-based replay is no longer viable","The changedFields array only lists field API names that changed; header.nulledFields lists fields explicitly set to null — missing either list causes silent data loss in your sync logic","Enabling CDC on more than 5 entities in a Developer Edition org is not permitted; production orgs have a higher limit but check current entitlements before designing a multi-object CDC architecture"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:30.487Z"},"url":"https://mcp.waymark.network/r/3eed7b19-707c-4e2f-9181-ca02efa6330a"}