Newer Version Available

This content describes an older version of this product. View Latest

Compose Streams of Change Data Capture Notifications with Custom Channels

Subscribe to a custom channel to receive a stream of the types of events that your app consumes. For example, if you have an app that uses real-time information about sales objects (for example, Account, Contact, and Order), create a custom channel with these objects. When you subscribe to the custom channel, you receive notifications only for these objects.

You can create a custom channel with Metadata API or Tooling API. 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.