Mogli Blog

Helping you create your own Mogli magic on Salesforce®.

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 communications environment, which is why they opt to connect with stakeholders through mobile messaging, whether it’s SMS, MMS, TTS, or WhatsApp™. 

You might be managing hundreds or even thousands of contacts, so configuring your notifications to support your ideal workflow is important. The last thing you need is to miss an important message or have push notifications interrupting your concentration all day. 

Plus, Mogli understands that you, too, aren’t chained to your desk (or at least we hope not). When you’re out and about during work hours, you still need to be alerted to crucial incoming client, patient, or student-related messages, 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 both your desktop and mobile communications to and from Salesforce.

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

  • How to install an unmanaged package
  • How to modify page layout
  • How to create a Custom Notification
  • How to manage Flow modifications
  • How to configure mobile phone notification settings
  • How to test your notifications 

Instructions for setting up push notifications for desktop and mobile Salesforce

(entails the installation of an unmanaged package, page layout modification, creation of Custom Notification, Flow modifications, and mobile phone settings)  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.

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:

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:

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:

4. Select the appropriate options for Applications and Save:


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

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:

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)’

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)’

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

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}

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

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:

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:

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 CustomNotificationType

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

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

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):


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:

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

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:

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:

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


Let's connect!