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 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 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.