Newer Version Available
Methods for Push Notifications
Push notifications are visual indicators on lists and detail pages in a console that show when a record or field has changed during a user’s session. For example, if two support agents are working on the same case, and one agent changes the Priority, a push notification appears to the other agent so he or she spots the change and doesn’t duplicate the effort.
When administrators set up a Salesforce console, they choose when push notifications display, and which objects and fields trigger push notifications. Developers can use push notification methods to customize push notifications beyond the default visual indicators supplied by Salesforce. For example, developers can use the methods below to create personalized notifications about objects accessible to specific console users, thereby eliminating the need for email notifications. For more information, see “Configure Push Notifications for a Salesforce Console” in the Salesforce Help.
- Push notification listener response is only available for the objects and fields selected to trigger push notifications for a console.
- When a Visualforce page includes a
listener added by the addPushNotificationListener() method, the page receives notifications. The listener receives notifications when there is
an update by any user to the objects selected for triggering console push notifications and the
current user has access to the modified record. This functionality is slightly different from
push notifications set up in the Salesforce user interface in that:
- Listeners receive update notifications for changes made by all users.
- Listeners receive notifications when an object’s fields are updated or created, even if those fields aren’t selected to trigger push notifications; and the notifications don’t include details about what changed. For example, if Status on the Case object is set to trigger a push notification, but Priority on the Case object changes, a listener receives a notification that the case changed without specifying details.
- Listeners don’t obey the Choose How Lists Refresh and Choose How Detail Pages Refresh push notifications settings in a Salesforce console.
- The only way to stop receiving notifications is to remove listeners using the removePushNotificationListener() method.
- Push notifications aren't available in the console in Professional Edition.