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 generate an overflow event. 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 is counted as one change toward the threshold. However, in a record update, each field change is counted 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 are not frequent, but they can occur in some situations, such as for a recurring event with hundreds of occurrences and hundreds of attendees. Another example is a cascade delete of accounts that are associated with many opportunities, contacts, and activities, which 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, and the remaining 20,000 records generate overflow events.

Because changes are sometimes grouped in one change event, the number of generated change events is not always equal to the number of changes. For example, the consecutive deletion of accounts might be grouped into one change event. For more information, see the recordIds field in Change Event Header 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.