Newer Version Available

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

Enrich Change Events When Subscribed with CometD (Pilot)

Change event messages include values for new and changed fields, but sometimes unchanged field values are needed for processing or replicating data. For example, a replication app needs an external ID field to match the record in an external system. You can select which fields to always include in change event messages when those fields are non-empty.

We provide Change Data Capture Enrichment to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Pilot programs are subject to change, and we can’t guarantee acceptance. Change Data Capture Enrichment isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for Change Data Capture Enrichment in the Trailblazer Community.

Note

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
  • Email
  • 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.