Newer Version Available

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

Push Notification Registration and Flow

To enable push notifications, you register with several different entities and configure the required settings.
Entities involved when sending a push notification include:
  • The OS vendor that delivers the notification to devices
  • The Salesforce organization that sends the notification
  • The mobile devices that receive and display the notification

Here is an outline of the registration process for developers.

  1. Register with the mobile OS vendor, such as Apple or Google, for push service.
  2. Create a connected app in Salesforce to upload the push credentials, such as the iOS .p12 certificate or the Android token.
  3. Enable the mobile client app to handle push notifications using the Salesforce Mobile SDK.
  4. Write Apex triggers to send push notifications when certain events occur on Salesforce records.
  5. (For partners only) For partners who are developing the push notification triggers for other customer organizations, this additional step should be performed.

    Create a managed package containing the connected app and Apex triggers. Distribute this package to customer organizations.

The following figure illustrates the complete push notification flow for customers who develop their own mobile apps and Apex triggers. The flow consists of the following sequence of events:
  1. Developer registration with the OS vendor (Apple in this figure)
  2. Connected app setup in Salesforce
  3. Sending the push notification via the trigger from the Salesforce organization
  4. Delivery of the push notification to mobile devices by the OS vendor
Push Notification Flow for Customers Push notification flow for customers

The Push Notification Service sends the message to the users specified in the send call of the Apex Messaging.PushNotification class.

This next figure illustrates the complete push notification flow for partners and customers. In addition to the flow represented in the previous diagram, this flow includes steps for customers who have installed the partner’s package. It includes purchase of the partner app, and installation of the partner’s package to get the connected app and the Apex triggers. The last few steps of sending and delivering the push notification are similar to the previous flow.

Push Notification Flow for Partners and Customers Push notification flow for partners and customers