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:
https://tact.lightning.force.com/lightning/packaging/installPackage.apexp?p0=04t6g000007LdSZ
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 SettingsFrom 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
Create your Custom Notification
1. From Setup, enter Custom Notifications, and select Custom Notifications2. Click New and populate a name, such as “Incoming SMS”. Select Desktop and/or mobile depending on your use case, 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 Flows2. Select the Flow entitled ‘Incoming_SMS_Alert’
3. In the Manager tab in the Flow Toolbox, click the New Resource button:
- Resource Type: Variable
- API Name: RecipientCollection
- Data Type: Text
- Check the box for ‘Allow Multiple Values (collection)’
-
- Resource Type: Variable
- API Name: RecordID
- Data Type: Text
- DO NOT check the box for ‘Allow multiple values (collection)’
7. Double-click the ‘Assign Contact Owner’ node
8. Modify the Assignment as follows:
-
- Delete the contents of the Variable field and replace it with the {!RecipientCollection} variable
- Change the Operator to ‘Add’
- Delete the contents of the Value field and replace it with {!Get_Contact_Record.OwnerId}
- Add a new line where the {!RecordID} variable Equals {!Get_Contact_Record.Id}
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:
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:
SELECT Id,CustomNotifTypeName FROM CustomNotificationType
17. Copy the ID that appears within your Query Results:
-
- Label: Custom Notification
- Custom Notification Type ID: paste the ID from the Developer Console
- Notification Body: enter the desired content of the push notification
- Notification Title: enter the desired title of the push notification
- Recipient IDs: select the RecipientCollection collection variable you created earlier
- Target ID: select the RecordID variable you created earlier
- Click Done
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.
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
More on Notifications >>
All knowledge-base articles >>
All MMS-related articles >>
Summer-Fall 2020 release notes >>