Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Notification Scenarios

Following is a list of example scenarios and the field values you need in a PushTopic record to generate notifications.

Scenario Configuration
You want to receive all notifications of all record updates.
  • MyPushTopic.Query = SELECT Id, Name, Description__c FROM Invoice_Statement__c
  • MyPushTopic.NotifyForFields = All
You want to receive notifications of all record changes only when the Name or Amount fields change. For example, if you’re maintaining a list view.
  • MyPushTopic.Query = SELECT Id, Name, Amount__c FROM Invoice_Statement__c
  • MyPushTopic.NotifyForFields = Referenced
You want to receive notification of all record changes made to a specific record.
  • MyPushTopic.Query = SELECT Id, Name, Amount__c FROM Invoice_Statement__c WHERE Id='a07B0000000KWZ7IAO'
  • MyPushTopic.NotifyForFields = All
You want to receive notification only when the Name or Amount field changes for a specific record. For example, if the user is on a detail page and only those two fields are displayed.
  • MyPushTopic.Query = SELECT Id, Name, Amount__c FROM Invoice_Statement__c WHERE Id='a07B0000000KWZ7IAO'
  • MyPushTopic.NotifyForFields = Referenced
You want to receive notification for all invoice statement record changes for vendors in a particular state.
  • MyPushTopic.Query = SELECT Id, Name, Amount__c FROM Invoice_Statement__c WHERE BillingState__c = 'NY'
  • MyPushTopic.NotifyForFields = All
You want to receive notification for all invoice statement record changes where the invoice amount is $1,000 or more.
  • MyPushTopic.Query = SELECT Id, Name FROM Invoice_Statement__c WHERE Amount__c > 999
  • MyPushTopic.NotifyForFields = All