How to Set up Push Notifications for Salesforce Opportunities

Share this article...

Salesforce added a cool feature called ‘custom notification’ to the Process Builder in the Summer ‘19 release. Custom notifications allow you to send important information in real-time, so your users don’t miss record changes and updates, available for the Salesforce Lightning Experience and the Salesforce Mobile app. You can define when you want the notification trigger, what message would you like to show, and which users to notify.

You can use ‘custom notification’ for many use cases (which I will share with you later). First though, I am going to show you how to set up push notifications for overdue Opportunities using Process Builder, where the close date has passed.

“Prodly”

Step 1: Create a Custom Notification

We will create a custom notification that can reach users either on desktop or mobile devices. This is so that we can use it in Process Builder later. Follow the steps below to set up a custom notification:

1. Go to the Setup, and find Notification Builder.

2. Click Custom Notification:

3. Click New (right side).

4. Input the Custom Notification Name (the API name populates automatically), and choose Supported Channels, which is where to show the alert, (either desktop or mobile or both):

Note: to receive mobile notifications, the user must install the Salesforce mobile app on their mobile phone and have notifications turned on.

5. Click Save

Step 2: Create the Process Builder

Now we will create a Process Builder process, and push the notification using that automation.

1. Go to the Setup, and find Process Builder:

2. Click New (See button right side):

3. Put all the necessary details: Process Name, Description (Optional), and choose The Process starts when ‘A record changes’ (We are choosing this because the Opportunity Close date will be changing).

4. Click Save

5. Choose the Object: Opportunity

6. Click when a record is created or edited

7. Click Save

8. Click Add Criteria and add a Criteria Name (this is up to you, but make it identifiable so that you can reference it later).

9. Choose Conditions are met.

10. Now Set Conditions. Here, you have to put the conditions for when would you like to trigger this process and send a custom notification to the user. In this case, the criteria are: [Opportunity].CloseDate Is Null Boolean False, Check Yes, Then click on the Save button. This whole step is shown in the following screenshot:

11. The next task is to set the time for scheduled action. For this click on Set Schedule available under Scheduled actions. Set time for scheduled actions. In this case, I have put 0 Days After CloseDate. This whole step is shown in the following screenshot

12. Click Add Action, and choose the Action Type: Send Custom Notification. This whole step is shown in the following screenshot

13. Notification Type: use the Custom Notification, that you have created in Step 1.

14. Notification Recipient:  In this case, the opportunity owner should receive this notification.
Criteria: Owner [Opportunity].OwnerID, as shown in the above screenshot.

15. Input a Notification Title and Notification Body. For example:

“Your Opportunity’s closed date is overdue, please take action immediately using the details below.

Opportunity Name – {![Opportunity].Name}

Amount – {![Opportunity].Amount}”

The text you see in { } will merge in record data dynamically.

16. Finally, click Save and Activate (Top right-hand side).

Step 3: Test the Results

The final step is to check this useful functionality out! To do so, let’s create an opportunity and put a close date in the past. Did the notification fire, or not?

You can see in the screenshot below, the close date is in the past, and the opportunity is still open. The user did receive the notification (see right top side in red colour).

All done! It was easy to set up, and now users never miss out on important information. There are other use cases you could use custom notifications in Process Builder, such as:

  • When a new case is created with ‘high’ priority,
  • A new opportunity is created over a certain amount,
  • Important event notification,
  • A high priority task is open for too long,
  • ‘Hot’ lead notifications,

So, start exploring options for your own org!

5 thoughts on “How to Set up Push Notifications for Salesforce Opportunities

  1. Avatar

    It looks like these custom notifications are only triggered when a field changes or other process that kicks off Process Builder. But what if a stale record is not touched but then the close date passes?

  2. Avatar

    Hi Mira,

    This is really useful, thanks for the guide. I have implemented it and it works as tested.

    However, will this work automatically – whenever all Opportunities created after this logic has been implemented pass their close date?

    OR, will it only fire when someone comes back into the Opportunity and started editing it again (those Opps with a close date that has already expired).

    Curious to know.

    Thanks
    Mark

  3. Avatar

    This process isn’t looking for a past due close date, it is looking for any close date. The close date is always required in an opportunity, so it will never be null, and the user will get a notification every time they edit the opportunity. You would need to set the criteria to <TODAY on the start date for that to work, and it will only work on creation or edit. If you set a time based notification tied to the close date, you can make the action trigger without any edits to the opportunity after it is created (you would have to run a mass update on all opportunities to get it to trigger on existing records). It took me a bunch of tries to get the criteria right because I didn't want it to fire on all opportunities, and it's a bit of a pain to test. I use an email notification, but I am definitely going to add the push now that I know how to do it after reading your post!

  4. Avatar

    Hi Mira , Nice article however this will work only when someone makes changes to the record. Is there a way to send custom notifications to users automatically when date/time has passed. for e.g. close date on opp is 14/02 and salesforce sends a custom notification to the user on 14/02 at 00:01 without the need for user to change the any field on his / her opportunities.

Leave a Reply