User Guide | Push notifications for Salesforce® desktop and mobile app

The people you’re trying to reach are on the go! Mogli clients understand this, which is why they connect with stakeholders through mobile messaging, such as with SMS, MMS, TTS, or WhatsApp™

You might be managing hundreds or even thousands of Contacts, so it's important to configure notifications supporting your ideal workflow. The last thing you need is to miss an important incoming message or have your concentration interrupted by noisy push notifications. 

We know you aren’t chained to your desk (or at least we hope not).  When you’re out and about during working hours, you still need to be alerted when crucial messages arrive from clients, patients, or students - but you don’t want to be conducting business from your personal phone. 

We recently improved our notifications routing!  Learn more here. >>

Here’s how to make sure you’re up-to-date with your desktop and mobile communications to and from Salesforce.

In order, this knowledge-base article covers how to:

  • How to install an unmanaged package
  • How to adjust your Application Settings
  • How to create a Custom Notification
  • How to customize your Flow
  • How to configure mobile phone notification settings
  • How to test your push notifications 

Setting up Salesforce push notifications for desktop and mobile

If you intend to utilize push notifications for mobile, please enable the proper permissions here and be sure you’ve downloaded the Salesforce mobile app on your device.  When testing, be sure you're logged into the proper Salesforce environment in the Salesforce mobile app.

In this example, we’re going to send a push notification to a Contact Owner when an incoming text arrives.

Install the custom notification unmanaged package

1. From your Salesforce instance, append your Salesforce URL with the following string: packaging/installPackage.apexp?p0=04t6g000007LdSZ
  • Remove the contents of the URL up until "lightning/ " and paste the above.  For example, your URL should now appear like this:

2. Click Enter
3. Install for All Users

Learn more about Mogli user permissions here. >>

Modify your Application Settings page layout 

1. Once the package is installed, add the Platform Events for Incoming SMS Enabled checkbox to the page layout for Application Settings
From Setup, access Object Manager and select Application Settings
  • Select Page Layouts
  • Select Default
  • Pull in the Platform Events for Incoming SMS Enabled field into the Triggers section
  • Save
2. Navigate to the Application Settings tab and check the box for Platform Events for Incoming SMS Enabled:

Triggers section view with Platform Events for Incoming SMS Enabled checked

Create your Custom Notification

1. From Setup, enter Custom Notifications, and select Custom Notifications
2. Click New and populate a name, such as “Incoming SMS”.  Select Desktop and/or mobile depending on your use case, and Save:

Custom notifications view in Salesforce setup

Adding new custom notification view

3. From Setup, enter notification and select Notification Delivery Settings.  Scroll down to the bottom of the page, click the dropdown caret, and select Edit:

Accessing delivery settings field from notification delivery settings view

4. Select the appropriate options for Applications and Save:Editing delivery settings to select for appropriate options view


5. From Setup, enter Notifications and select Salesforce Notifications.  Confirm that the both checkbox fields are checked:

Enabling Salesforce Notifications view in setup

Flow Modifications

1. From Setup, enter Flow and select Flows
2. Select the Flow entitled ‘Incoming_SMS_Alert’
3. In the Manager tab in the Flow Toolbox, click the New Resource button:

Salesforce Flow Builder view to select New Resource

4. Populate the resource as follows:
    1. Resource Type:  Variable
    2. API Name:  RecipientCollection
    3. Data Type:  Text
    4. Check the box for ‘Allow Multiple Values (collection)’

Populating the New Resource in Flow Builder with RecipientCollection and Allow Multiple Values view

4. Click Done and create another resource populated as follows:
    1. Resource Type:  Variable
    2. API Name:  RecordID
    3. Data Type:  Text
    4. DO NOT check the box for ‘Allow multiple values (collection)’

Populating the New Resource in Flow Builder with RecordID and do not allow multiple values image

6. Click Done
7. Double-click the ‘Assign Contact Owner’ node Assign Contact Owner image

8. Modify the Assignment as follows:

    1. Delete the contents of the Variable field and replace it with the {!RecipientCollection} variable
    2. Change the Operator to ‘Add’
    3. Delete the contents of the Value field and replace it with {!Get_Contact_Record.OwnerId}
    4. Add a new line where the {!RecordID} variable Equals {!Get_Contact_Record.Id}

Modifying the assignment in Flow Builder for notifications view

9. Click Done
10. Click on the Post to Chatter Action and delete it by clicking the trash can

Post to Chatter Action view

11. In the Elements tab in the Flow Toolbox, drag a new Action into the same location as the Chatter Action you just deleted

12. Select Notifications from the column and select Send Custom Notification:Adding  "Send Custom Notification" as a new action image

13. An Action Edit Screen will populate
14. Duplicate your Salesforce tab so that you’re able to access another screen in Salesforce besides your Flow.  Click the gear icon in the upper right-hand corner of your screen and select Developer Console:

Selecting Developer Console from gear icon in duplicate Salesforce tab view

15. Select the Query Editor tab, check the Use Tooling API checkbox, and paste the following Query in the field as shown:

SELECT Id,CustomNotifTypeName FROM CustomNotificationTypeUsing Query Editor to alter for custom notification view

16. Click Execute
17. Copy the ID that appears within your Query Results:

Copying the ID from Query Results in the Developer Console view

18. Access the tab with your Flow and continue populating the Action as follows:
    1. Label:  Custom Notification
    2. Custom Notification Type ID:  paste the ID from the Developer Console
    3. Notification Body:  enter the desired content of the push notification
    4. Notification Title:  enter the desired title of the push notification
    5. Recipient IDs:  select the RecipientCollection collection variable you created earlier
    6. Target ID:  select the RecordID variable you created earlier
    7. Click Done

New Action view for custom notification with ID from Developer Console

19. Drag the nodes from each Assignment to the Custom Notification Action, and drag the node from your Custom Notification Action to the Apex Action (reLaunch):

Image of dragging the nodes from assignments to custom notification action and then to apex action

20. If an incoming text arrives containing ONLY MMS (without any text), your Push Notifications Flow will fail unless the following modifications are made.  Between your Assignments and Custom Notification Actions, add a Decision element:

Adding a decision element to account for "only mms" texts in edit decision view

Adding a decision element to account for "no message"  in edit decision view

Important: From each Assignment node, drag the arrows to the Decision node.  If this isn’t completed, the Assignments will lead to the wrong node and the Flow will break.

Image of dragging the arrows from assignments to decision nodes

21. Add a second Action for ‘Push Notification for MMS Only’ and populate it as follows: 

Populating the second action for "Push Notification for MMS only" view

Learn how to send MMS from Salesforce here. >>

22. Repeat the process for ‘Push Notification for SMS and MMS’ and connect the nodes.  All Custom Notification Actions must connect to the Apex Action for relaunch.

23. Click Save, Activate, and Run

24. In Setup, enter ‘Paused’ and select Paused Flow Interviews.  You should see your Flow waiting to run when an incoming SMS arrives:

Paused Flow Interviews view with new incoming sms alert flow

Configure Mobile Settings

1. Ensure that you and your users have downloaded the Salesforce mobile app on their devices
2. Ensure that your mobile device’s settings allow for push notifications on Salesforce
3. From within the Salesforce mobile app, access your profile (avatar or picture) > Settings > Push Notification Settings > turn on for Incoming SMS

Testing your notifications

1. Send an incoming text to one of your Gateways (be sure you’re the owner of your own test Contact).  Your mobile device should display a notification like this:

Test notifications mobile display view

2. Clicking on the push notification will open up to the Contact’s record within Salesforce mobile app so that you may respond right away.

Related Resources

More on Notifications >>
All knowledge-base articles >>
All MMS-related articles >>
Summer-Fall 2020 release notes >>


Let's connect!