Newer Version Available
Gap Events
A gap event contains information about the change in the header, such as the change type and record ID, but doesn’t include details about the change, such as record fields. Valid change type values are:
- GAP_CREATE
- GAP_UPDATE
- GAP_DELETE
- GAP_UNDELETE
Upon receiving a gap event message, your application can retrieve the Salesforce record using the record ID value to get the current data for your system. You can get the Salesforce record with a SOAP API retrieve() call or through a SOQL query.
If the same type of change occurs on the same Salesforce entity within the same transaction, multiple gap events might be replaced with a single gap event. The IDs of the changed records are included in the recordIds header field.
Example
This sample gap event is for an archived calendar event and contains information about the change in the header. The change type for archiving is GAP_UPDATE. The sequenceNumber field is always set to 1.