Newer Version Available
Enrich Change Events When Subscribed with CometD (Pilot)
Event enrichment is supported in subscribers that use CometD, such as Streaming API clients or EMP Connector. Non-empty fields selected for enrichment are included for all types of operations (create, update, delete, and undelete) for all enabled Change Data Capture entities. If the fields have an empty value, they're not included in the event messages.
You can configure event enrichment on the standard ChangeEvents channel or a custom channel. Entity channels, such as /data/AccountChangeEvent, don’t support event enrichment. To receive the enriched event messages, subscribe to the same channel that you configured for enrichment. Subscribing to the entity channel directly, such as /data/AccountChangeEvent, doesn't return enriched fields even if the entity is part of a channel configured for enrichment. Select fields to enrich your change event messages using the PlatformEventChannelMember object in Tooling API or Metadata API.
As part of the fields that a change event object contains, the following field types are supported for enriched fields.
- Auto Number
- Checkbox
- Date, Date/Time, Time
- External Lookup Relationship
- Hierarchical Relationship on User
- Lookup Relationship
- Number
- Text
- Phone (and Fax)
- Picklist (not Multi-Select)
- URL
Compound fields, such as Address and geolocation fields or the Name field on Lead and Contact, aren’t supported.
You can select up to 10 fields for a channel member across all channels. Only unique fields are counted across all channels for the same member, so the same field is counted only once. For example, AccountChangeEvent is a member of two channels. It contains five enriched fields on the ChangeEvents channel and four fields on a custom channel, two of which are also on the ChangeEvents channel. The total of enriched fields counted toward the maximum is seven fields.