PlatformEventChannelMember
Represents an entity selected for Change Data Capture notifications on a standard or custom channel, or a platform event selected on a custom channel.
This type extends Metadata and inherits its fields.
PlatformEventChannelMember components have the suffix .platformEventChannelMember and are stored in the platformEventChannelMembers folder.
Introduced in API version 47.0.
You must have the Customize Application permission to deploy and retrieve this type.
- Type: EnrichedField[]
- Required: No
- Introduced: API version 51.0
- Description: One or more fields selected for Change Data Capture Enrichment. A non-empty enriched field is added to an update or delete change event even when not changed. For more information, see Enrich Change Events with Extra Fields When Subscribed with CometD in the Change Data Capture Developer Guide.
- Type: string
- Required: Yes
- Description: Required. The name of a channel. For the standard channel, the name is
ChangeEvents. For a custom channel, the name is in this format:MyChannel__chn.
-
Type: string
-
Required: No
-
Introduced: API version 56.0
-
Description: An expression that is used to filter the stream of events and deliver only the events that match specific criteria. The filter expression can contain one or more field-value expressions. The filter expression format is based on SOQL and supports a subset of SOQL operators and field types.
For example, this filter expression delivers only events that contain the City__c field with a value of ‘San Francisco’.
City__c = 'San Francisco'For more information, see Filter Your Stream of Platform Events with Custom Channels in the Platform Events Developer Guide and Filter Your Stream of Change Events with Channels in the Change Data Capture Developer Guide.
- Type: string
- Required: Yes
- Description: Required. The change event name of an entity selected for Change Data Capture notifications. For example, for the Account standard object, the name is
AccountChangeEvent, or for a custom object MyObject__c, the name isMyObject__ChangeEvent.
A field selected on PlatformEventChannelMember for Change Data Capture Enrichment. A non-empty enriched field is added to an update or delete change event even when not changed.
- Type: string
- Required: Yes
- Description: The name of a field selected to enrich change events with.
This PlatformEventChannelMember component represents the selection of the Lead change event as part of the Change Data Capture selections (the standard ChangeEvents channel).
The file name of the example component is ChangeEvents_LeadChangeEvent.platformEventChannelMember. The file name, without the extension, corresponds to the component full name (ChangeEvents_LeadChangeEvent).
If the channel has more than one selected entity, each entity is represented separately by a PlatformEventChannelMember component. For example, this component is a second member of the standard ChangeEvents channel and represents the Contact change event.
This example is a selected entity on the SalesEvents__chn custom channel.
This example shows one enriched field, Phone, for a selected entity on the SalesEvents__chn custom channel. Enriched fields are supported in API version 51.0 and later.
This example shows a filter expression for a ContactChangeEvent selected entity on the SalesEvents__chn custom channel.
The createMetadata() and deleteMetadata() calls aren’t supported with the PlatformEventChannelMember metadata type.
To delete a channel member from a channel, deploy destructiveChanges.xml for this type and specify the full name of the member.
Two consecutive underscores in full names designate either a component name suffix or a namespace prefix. In all other cases, two consecutive underscores aren’t supported in full names. If your channel member name contains a custom channel name to make it unique, ensure to replace the double underscores in the name with one underscore. For example, the member name would be SalesEvents_chn_AccountChangeEvent and not SalesEvents__chn_AccountChangeEvent.
This manifest file references the example definitions on the ChangeEvents standard channel. It lists each member in the <members> field of PlatformEventChannelMember. The <members> field contains the channel member full name in this format: ChannelName_EventName.
This manifest file references members of the SalesEvents__chn custom channel.
To retrieve a custom channel and channel members, you can reference them in the same package.xml file, as this example shows.
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.