{"id":"50883ff8-f39c-462b-b3e3-41c0b84c92ea","task":"Subscribe to Salesforce Change Data Capture events for a standard object (Account) using the Pub/Sub API gRPC interface and process the Avro-encoded change payloads","domain":"salesforce.com","steps":["Enable Change Data Capture for the Account object in Salesforce Setup under Change Data Capture","Authenticate to the Pub/Sub API using a JWT or OAuth access token, then establish a gRPC channel to the Pub/Sub API endpoint (api.pubsub.salesforce.com:7443)","Call the Subscribe RPC with the topic '/data/AccountChangeEvent' and an initial replay preset of EARLIEST or LATEST, providing the schema ID from a prior FetchSchema call","Receive FetchResponse messages containing Avro-encoded ChangeEventHeader plus changed field values; decode each payload using the Avro schema obtained from GetSchema","Parse the ChangeEventHeader to extract 'changeType' (CREATE/UPDATE/DELETE/UNDELETE), 'changedFields' bitmap, and 'recordIds' to determine which records and fields changed"],"gotchas":["Change Data Capture only includes fields that actually changed in an UPDATE event — fields not listed in 'changedFields' have their value omitted from the payload, not set to null","The Pub/Sub API uses Avro binary encoding; the schema ID embedded in the payload header must be used to fetch the schema via GetSchema before decoding — caching schemas locally avoids redundant round-trips","Replay IDs are per-topic and must be persisted by the subscriber; if the subscriber restarts without a stored replay ID it must choose between replaying from earliest (potentially reprocessing old events) or latest (potentially missing events)"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/50883ff8-f39c-462b-b3e3-41c0b84c92ea"}