Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Subscription Channels
You can subscribe to channels by supplying the channel endpoint. For example, to subscribe to events for all selected entities, subscribe to /data/ChangeEvents. Apex triggers can't subscribe to channels but can subscribe to a single event only. For example, you can create an Apex trigger on AccountChangeEvent to subscribe to only Account change events.
Standard Channels
The ChangeEvents standard channel contains change events from one or more selected entities in a single stream that you can subscribe to. If you expect change events from more than one entity, use the ChangeEvents standard channel. To receive change events on the ChangeEvents channel, select the entities for Change Data Capture. For more information, see Select Objects for Change Notifications in the User Interface and Select Objects for Change Notifications with Metadata API and Tooling API. Then subscribe to the appropriate channel.
If you expect change events for only a single entity, use single-entity channels. With single-entity channels, you can subscribe to change events from only one custom object or standard object. Select the entity for notifications on the Change Data Capture page in Setup or in a custom channel.
Standard Channel for All Selected Entities
1/data/ChangeEventsSingle-Entity Channel for a Standard Object
1/data/<Standard_Object_Name>ChangeEventFor example, the channel to subscribe to change events for Account records is:
1/data/AccountChangeEventSingle-Entity Channel for a Custom Object
1/data/<Custom_Object_Name>__ChangeEventFor example, the channel to subscribe to change events for Employee__c custom object records is:
1/data/Employee__ChangeEventCustom 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. Entities are automatically selected for change event notifications when you create a custom channel that includes them. A custom channel has the following format.
1/data/YourChannelName__chnFor example, if your channel name is SalesEvents, the subscription channel is:
1/data/SalesEvents__chn