Newer Version Available

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

PushTopic Events (Legacy)

PushTopic events provide a secure and scalable way to receive notifications for changes to Salesforce data that match a SOQL query you define.

PushTopic events is a legacy product. Salesforce no longer enhances PushTopic events with new features and provides limited support for this product. Instead of PushTopic events, consider using Change Data Capture events. To learn about Change Data Capture events, see the Change Data Capture Developer Guide and the Change Data Capture Basics Trailhead module.

Important

Use PushTopic events to:

  • Receive notifications of Salesforce record changes, including create, update, delete, and undelete operations.
  • Capture changes for the fields and records that match a SOQL query.
  • Receive change notifications for only the records a user has access to based on sharing rules.
  • Limit the stream of events to only those events that match a subscription filter.

A typical application of PushTopic events is refreshing the UI of a custom app from Salesforce record changes.

PushTopic events can be received by:

  • Pages in the Salesforce application
  • Application servers outside of Salesforce
  • Clients outside the Salesforce application

The generation of PushTopic notifications follows this sequence.

  1. Create a PushTopic based on a SOQL query. The PushTopic defines the channel.
  2. Clients subscribe to the channel.
  3. A record is created, updated, deleted, or undeleted (an event occurs). The changes to that record are evaluated.
  4. If the record changes match the criteria of the PushTopic query, a notification is generated by the server and received by the subscribed clients.