Newer Version Available

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

Overflow Events

To capture changes more efficiently, overflow events are generated for single transactions that exceed a threshold.

The first 100,000 changes generate change events. The set of changes beyond that amount generates one overflow event for each entity type included in that set. An overflow event is generated when a single transaction contains more than 100,000 changes. An overflow event contains only header fields. The changeType field header value is GAP_OVERFLOW instead of the specific type of change. The object type corresponding to the change is in the entityName field. An overflow event doesn’t include details about the change, such as the record fields or record ID.

A record creation, deletion, or undeletion counts as one change toward the threshold. However, in a record update, each field change counts toward the overflow threshold. For example, if three field values are modified in one record update, they count as three operations against the overflow threshold.

Transactions with a high volume of operations aren’t frequent, but they can occur in certain situations, such as for a recurring event with hundreds of occurrences and attendees. Another example is a cascade delete of accounts associated with many opportunities, contacts, and activities that results in deleting many more records in the same transaction. If the cascade delete results in the deletion of 120,000 account, opportunity, contact, and activity records in the same transaction, the deletions of the first 100,000 records generate delete change events. The remaining 20,000 records generate one overflow event for each unique entity.

Because changes are sometimes merged in one change event, the number of generated change events isn’t always equal to the number of changes. For example, the consecutive deletion of accounts can be merged into one change event. For more information, see the recordIds field in ChangeEventHeader Fields. If Apex triggers fire and create other records, more change events are generated in the same transaction.

Note

Example

This overflow event is for a task and contains information about the change in the header. The change type is GAP_OVERFLOW. The record ID for the change is always set to 000000000000000AAA, which is the empty record ID.