Compose Streams of Change Data Capture Notifications with Custom Channels
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.