{"id":"03d00ad3-74be-4d88-a174-93a091021e75","task":"Subscribe to Salesforce Pub/Sub API gRPC streams to receive Avro-encoded Change Data Capture events for a custom object","domain":"developer.salesforce.com","steps":["Enable Change Data Capture for the custom object in Setup and ensure the CDC channel exists under /data/ChangeEvents or the object-specific channel","Authenticate with a Salesforce access token and obtain the tenant ID (organization ID) required for Pub/Sub API requests","Establish a gRPC channel to the Pub/Sub API endpoint using the proto definitions published in the Salesforce Pub/Sub API repository","Call the Subscribe RPC with the channel topic, a starting replay ID (or EARLIEST/LATEST sentinel), and the desired batch size","Decode each received event's schema_id by calling the GetSchema RPC, then deserialize the Avro-encoded payload using the returned schema","Commit replay IDs durably after processing each batch so the subscriber can resume without reprocessing on restart"],"gotchas":["The Pub/Sub API requires a gRPC client; standard HTTP/REST libraries cannot be used — official client libraries exist for Python, Java, and Go","Avro schemas returned by GetSchema are cached per schema_id; avoid re-fetching schemas on every event to prevent rate limit exhaustion","CDC events include only changed fields plus required metadata fields; absent fields in the payload mean the field was not modified, not that it is null"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:40:37.260Z"},"url":"https://mcp.waymark.network/r/03d00ad3-74be-4d88-a174-93a091021e75"}