Change Data Capture Developer Guide
Summer '25 (API version 64.0)
Spring '25 (API version 63.0)
Winter '25 (API version 62.0)
Summer '24 (API version 61.0)
Spring '24 (API version 60.0)
Winter '24 (API version 59.0)
Summer '23 (API version 58.0)
Spring '23 (API version 57.0)
Winter '23 (API version 56.0)
Summer '22 (API version 55.0)
Spring '22 (API version 54.0)
Winter '22 (API version 53.0)
Summer '21 (API version 52.0)
Spring '21 (API version 51.0)
Winter '21 (API version 50.0)
Summer '20 (API version 49.0)
Spring '20 (API version 48.0)
Winter '20 (API version 47.0)
Summer '19 (API version 46.0)
Spring '19 (API version 45.0)
Winter '19 (API version 44.0)
No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Merged Change Events
Change Event Storage and Delivery
Subscription Channels
Compose Streams of Change Data Capture Notifications with Custom Channels
Example Diagrams for Channels and Channel Members
Transaction-Based Replication Steps
Subscribe with Pub/Sub API
Get Compound Fields in Change Events
Monitor Change Event Publishing and Delivery Usage
Subscribe to Change Events
Learn about subscribing to change events including subscription channels, subscription
methods, and required permissions.
-
Change Event Storage and Delivery
Change events are stored temporarily and subscribers can retrieve them during the retention window. The order of events delivered is based on the order of the corresponding committed transactions. Users with the proper permissions can receive events on a channel. -
Subscription Channels
A subscription channel is a stream of change events that correspond to one or more entities. You can subscribe to a channel to receive change event notifications for record create, update, delete, and undelete operations. Change Data Capture provides predefined standard channels and you can create your own custom channels. Use the subscription channel that corresponds to the change events you want to receive. The channel name is case-sensitive. -
Compose Streams of Change Data Capture Notifications with Custom Channels
Create a custom channel if you have multiple subscribers and each subscriber receives change events from a different set of entities. Also, use a custom channel with event enrichment to isolate sending enriched fields in change events on a specific channel. Custom channels group and isolate change events for each subscriber so subscribers receive only the types of events they need. -
Example Diagrams for Channels and Channel Members
Discover the relationship between channels and channel members with the Entity Relationship Diagram (ERD). Also, understand the benefits of using custom channels through the example diagrams. -
Transaction-Based Replication Steps
To maintain an accurate replica of your Salesforce org’s data in another system, subscribe using a transaction-based approach. -
Subscribe with Pub/Sub API
Use Pub/Sub API to subscribe to event messages in an external client to integrate your systems. Simplify your development by using one API to publish, subscribe, and retrieve the event schema. Based on gRPC and HTTP/2, Pub/Sub API enables efficient delivery of binary event messages in the Apache Avro format. You can control the volume of event messages received per Subscribe call based on event processing speed in the client. -
Get Compound Fields in Change Events
Compound fields, such as lead or contact Name, Address, and Geolocation fields, are represented as nested field structures in the event message. In record updates, the changedFields header field lists each updated component field using this format: CompoundField.ComponentField. The updated component field is included in the event message in a nested field structure. -
Enrich Change Events with Extra Fields
Change event messages include values for new and changed fields, but sometimes unchanged field values are needed for processing or replicating data. For example, use enrichment when your app needs an external ID field for matching records in an external system. Or always include a field that provides important information about the changed record. You can select any field whose type is supported. -
Filter Your Stream of Change Events with Channels
Receive only the change event messages that match a predefined filter on a channel in subscribers. With fewer events delivered to subscribers, event processing is optimized. Also, subscribers make more efficient use of the event delivery allocation. This feature supports Pub/Sub API, CometD (Streaming API), and event relays but not Apex triggers. -
Subscribe with Apex Triggers
With Apex triggers, you can capture and process change events on the Lightning Platform. Change event triggers run asynchronously after the database transaction is completed. Perform resource-intensive business logic asynchronously in the change event trigger, and implement transaction-based logic in the Apex object trigger. By decoupling the processing of changes, change event triggers can help reduce transaction processing time.