Newer Version Available

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

Event Enrichment Considerations

Keep in mind these considerations when using enriched change events.

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

No Apex Trigger Support
Event enrichment isn’t available in Apex change event triggers.
Latest Enriched Field Value Returned When Replaying an Event Message
Change event messages are stored in the event bus for a temporary duration. When you retrieve an event from the event bus using a replay option, enriched fields are added to the event message before delivery. As a result, if the enriched fields were updated after the event was stored, the replayed event message contains the latest value and not the original value. The only exception is when the enriched fields are part of the changed fields for the event. In this case, their values reflect the correct changed values.
Duplicate Replay ID for Ungrouped Enriched Event Messages
Salesforce sometimes groups event messages when the same change occurs in multiple records of one object during a transaction. For more information, see the recordIds field in Change Event Header Fields. However, if change event messages are enriched, single event messages are sent because the external ID field values could be different for each record. Because these event messages are first grouped and then ungrouped, they contain duplicate ReplayId values and only one record ID in the recordIds field. You can still replay those events using the ReplayId option in Streaming API (CometD). Also, because change event messages aren’t optimistically grouped before being delivered to subscribers, event allocation usage could be higher.
CampaignMember Change Event
If a CampaignMember is deleted from a campaign, the change event message doesn’t include enriched fields because it’s a hard deletion—the record no longer exists in the database. The system can’t query the enriched field value for that record. However, if a CampaignMember is deleted as part of a cascade delete on the campaign, this deletion is a soft deletion, and the records are in the Recycle Bin. The system can query the soft-deleted record and obtain the enriched fields.
Gap and Overflow Events
Enriched fields aren’t supported for gap or overflow events.