Send Custom Bell Notification from Flow

Custom Notification Type: Custom notification type can be used to send the custom bell notification via a process builder, flow, Apex code, and Invocable action API. it is a very useful feature to notify the user of any changes/updates in the record.

In this post, I am going to share how we can create a flow to send the custom notification using flow in flow-builder. This flow will send the custom notification to the Account owner whenever the opportunity amount gets changed.

Create custom notification in your org.

Go to setup > search ‘custom notification’. Click on the new button and create a custom notification type.

Now, go to setup > in quick find search ‘flow’ and click on flow.

Click on the new button and select Record-Triggered Flow and click create.

Select Opportunity object and configure on which event this flow should execute, choose the “A record is updated” option. Set entry condition as Amount changed = TRUE.

Create a RecipientIDs collection variable to store the recipient’s ids.

Create a formula for a custom notification body.

Click on the (+) icon and select the ‘Assignment’ element. Add account owner ID in the Recipient IDs variable.

Click on the (+) icon and select the ‘Get Records’ element. Select the ‘Custom Notification Type’ object and add a filter condition ( DeveloperName = CustomNotificationTypeName)

Click on the (+) icon and select the ‘Action’ element. Search ‘custom notification’ in the action search box and select ‘Send Custom Notification’.

Fill in all the required fields (like shown in the screenshot below) and click on done.

The final flow will look like the below screenshot.

Click on save and activate the flow.

Test your awesome flow now. Update the amount field on any opportunity record. The account owner will receive the custom bell notification as you can see in the screenshot below.

Advertisements

About the blog

SFDCLessons is a blog where you can find various Salesforce tutorials and tips that we have written to help beginners and experienced developers alike. we also share my experience and knowledge on Salesforce best practices, troubleshooting, and optimization. Don’t forget to follow us on:

Newsletter

Subscribe to our email newsletter to be notified when a new post is published.

Advertisements
Advertisements

Arun Kumar

Arun Kumar is a Certified Salesforce developer and Salesforce Champions (Platform Champions), a Computer Science graduate, working on the Salesforce platform and providing customer solutions using force.com as a Salesforce consultant/developer. He is the founder of SFDCLessons. :)

This Post Has 3 Comments

  1. adil

    Hello sir,
    Thanks for this wonderful article.
    When implemented the same, I observed the user not getting notification in first go until he refresh his page and then it works like a charm. Is it a known behavior?
    Please confirm,
    Thanks in advance.

    1. Arun Kumar

      Hello Adil,

      It takes a few seconds to receive the notification; you do not need to reload the page; simply wait a few seconds for the notification to appear in the bell icon.
      This is normal behavior.

  2. Amy

    Does this work for notifications in Experience Cloud as well?

Leave a Reply