How to Set Up Salesforce Push Notifications
Salesforce push notifications are a great way to provide real-time information to users. You can leverage push notifications in Salesforce to alert sales managers about changes to their opportunities, or service agents for cases that need immediate attention, and more!
You can send notifications for any object based on the criteria you set up to trigger the Salesforce Flow automation. This feature is available for both desktop and mobile apps. Keep reading for a walkthrough on how to set it up!
Step 1: Create the Custom Notification Type
The purpose of this step is to create a notification that will either go to the mobile or desktop app, or both. Let’s make a start!
1. Go to Setup → Notification Builder → Custom Notifications
2. Click New and give the Custom Notification a name.
This is important if you decide to have more than one type available, and I recommend making the name specific enough.
3. Select the Supported Channels.
As you create more custom notifications, you will be able to view the channel the notification is intended for directly in the list, with the possibility to come back and edit it later.
Bear in mind that for mobile notifications, some restrictions apply. This includes (but is not limited to):
- The user installing the app on their phone.
- The application having notifications turned on.
- The user actually looking at the app.
In some cases, if the user is both the person causing and receiving the notification, and “Mobile” and “Desktop” are selected, the user will only see the notification on the mobile device when entering the app itself, assuming they haven’t already clicked on it in the desktop app.
Step 2: Create the Flow
This is the step to actually trigger the notification to go out using Salesforce Flow. While notifications can still be sent out using Process Builder, remember this will no longer be an option considering the retirement of Process Builder scheduled for later this year.
Note: The tutorials we showcase are built-in developer edition orgs with limited data and only a few custom automations. Ensure you evaluate your existing processes properly before building new ones, including both declarative automation and custom Apex. For Flow specifically, consider the recommended practices when it comes to the number of record-triggered flows per object.
Check out the step-by-step tutorial below on how to set up a basic flow to notify Opportunity Team Members when an Opportunity is Closed.
You can take a look here at the official documentation pertaining to this core action, including all the information you have to fill in, such as the “Recipient ID”. We will be using the OpportunityId stored in a collection variable for, since this is the supported input for this parameter to trigger the notification being sent out to active Opportunity Team members.
In Setup, navigate to the Flows page, click the New button, and let’s get started!
Step 3: Testing
Now it’s time to test this lovely new feature!
For testing, you can use both the “Debug” option in flow, as well as actually trigger the notification on a test record. The place where you will look out for the notification depends on your set Notification Type (Mobile or Desktop).
As you noticed in the video, you will see a “1” appear in the corner on the little bell icon in either application. If you are on mobile and have badges/banners on for the Salesforce app, you may also see this appear. Since we also set up a Target Id in the Custom Notification Action within the Flow, opening and clicking on the notification will redirect the user to the Opportunity in the cause.
There you have it; your notification alert to users is all set up! For the recipients who are active Salesforce users, this in-app notification is an excellent alternative to emails – saving the time to navigate to another tab or application.
Enjoy this wonderfully simple but powerful, out-of-the-box notification option!
Great post! This is really helpful. I tried it and works just fine. However, to access new Desktop notifications you HAVE to click the bell icon. If I am already logged in to Salesforce and a notification is published, I would ideally want it to just float up in the top right corner and an ability to close it, mark it as read etc.
Is there a way to do that?
Very good post Yelena !! Precisely to the point .. Thank you for this article.
Unfortunately, I had a similar experience which is why I liked the mobile version of the notifications more, as you could get the badge to appear on the screen. I was not able to find a way to create a badge like notification for the desktop. The experience is the same though in both mobile and desktop, that it just shows in the bell if you are in the app.
I have the same issue where the notification does not appear in iOS, only the bell with the badge indicator.
in iOS it will depend on your personal settings for the Salesforce application. You will get the bell indicator, plus either badge on the top or on the Locked Screen depending on your settings.
This is great and would be even better if it would leverage Chrome notifications when using Chrome.
thanks for sharing this.
I’ve just recently set up “major incident (push) notifications” in our org by using process builder, a chatter group and the mobile app.
With the right configurations you get the app to push the chatter post on the device.
What are the advantages of the “Custom Notification” method?
“UserXYZ mentioned the group123 in a post” or “UserXYZ posted in the group123” would be dropped, guess that is cool enough to give it a try …
Any other advantages to the chatter model?
Can we send push notification to a Windows desktop application like uwp app(other than web)?
This process works great, however we have issue with special characters being included in the Notification Body. Is it possible to remove the special characters?
Deepak Singh G
I have followed all the steps given, but not getting notification,
But in the same process builder I am updating one field that is working fine.
What could be the reason.
I learned that if you are in the middle of process builder, and create the notification type in another screen, you will need to exit right out of PB and go back in again for it to appear in the list of notification types.
Desktop notifications appear for users, however, users are receiving others opportunity desktop alerts. Is their a solution to this? I need users to only receive alerts to records they own.
Is there a way to clear notifications from the drop down? They seem to stay in the drop down notification widget even after clicking on it or marking as read. Or do they get cleared out after a certain amount of time?