Newer Version Available
Change Event Storage and Delivery
Temporary Storage in the Event Bus
Change events are based on platform events and share some of their characteristics for storage. Change event messages are stored in the event bus for three days. You can retrieve stored event messages from the event bus. Each event message contains the ReplayId field, which identifies the event in the stream and enables replaying the stream after a specific event. For more information, see Message Durability in the Streaming API Developer Guide.
Order of Events
The order of change events stored in the event bus corresponds to the order in which the transactions corresponding to the record changes are committed in Salesforce. If a transaction includes multiple changes, like a lead conversion, a change event is generated for each change with the same transactionKey but different sequenceNumber in the header. The sequenceNumber is the order of the change within the transaction.
When Salesforce receives a change event, it assigns a replay ID value to it and persists it in the event bus. Subscribers receive change events from the event bus in the order of the replay ID.
User Permissions Required
The subscriber must have one or more of the following permissions depending on the subscription channel: View All Data, View All Users, and View All for an object. See Required Permissions for Change Events Received by CometD Subscribers.