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.

For example, if a subscriber uses real-time information about sales objects such as Account, Contact, or Order, you can create a custom channel with these objects. When you subscribe to the custom channel, you receive change events only for these objects. Your subscriber doesn’t receive change events of entities selected in another channel.

You can create a custom channel with Metadata API or Tooling API. When you create a custom channel, the objects are selected for notifications when you add a PlatformEventChannelMember. Custom channels can’t be created or viewed in the user interface on the Change Data Capture page. Use Metadata API to deploy or retrieve channel metadata in your org with a supported tool. Use Tooling API to create channels using REST and query channel metadata with SOQL.

Also, you can package channels to distribute with your apps.

In Metadata API, use the PlatformEventChannel metadata type to create a custom channel and the PlatformEventChannelMember type to add the selected event entities. For more information, see PlatformEventChannel and PlatformEventChannelMember in the Metadata API Developer Guide.

In Tooling API, use the PlatformEventChannel object to create a custom channel and PlatformEventChannelMember to add the selected event entities. For more information, see PlatformEventChannel and PlatformEventChannelMember in the Tooling API.