Create Custom Notification in Salesforce (using Flows)

Pranav Bhatia
3 min readAug 26, 2024

--

Pre-requisite for the Flow

Create a Custom Notification — go to Setup -> (Search for) Custom Notifications

Create New and give it a name as shown below.

Save it

Create a new flow

Let’s start with creating a new flow. Go to Setup-> (Search for) Flows. Select “Start from Scratch” and “Record-Triggered Flow” in the next step.

Flow Components

This is how the completed flow will look like. In this use case, we will check whenever the Case is Escalated and send a notification to the person who created the Case.

  1. Starting from our first component — “Start”

Keep the properties of the component as shown below.

2. Add a decision node “Check if Case is Escalated”

The properties of the decision node will have an Outcome order called “Case = Escalated” which has

{!$Record.Escalated_Case__c} = Yes

3. Get record of Custom Notification (created in pre-requisite step) — name the component Get Records — as “Notification Type”

4. Assign variables for Custom Notification

Set the following variables —

{!CustomNotificationTypeID} = {!Notification_Type.Id}

{!Notification_Type.Id} = {!$Record.CreatedById}

{!TargetID} = {!$Record.CreatedById}

5. Create Custom Notification Action

Before we go into how the Action is setup, let’s have a look at the various fields and what they mean.

Set the following variables —

Custom Notification Type ID = {!CustomNotificationTypeID}

Notification Body = Case has been escalated by {!$Record.LastModifiedBy.FirstName} {!$Record.LastModifiedBy.LastName}

Notification Title = Case Escalated

Recipient IDs = {!RecipientIDs}

Target ID = {!TargetID}

Activate the flow and verify it by creating a new record and escalating a case and you would see a notification with the title and body.

--

--

No responses yet