Skip to main content

Software Development

An Introduction to Record Triggered Flow with Scenario – Salesforce

Hands That Make Productivity Happen

What is Salesforce Flow

Salesforce Flow is a tool used for automating business processes in the Salesforce platform. It allows users to create custom, guided processes that can interact with Salesforce data and other external systems.

With Salesforce Flow, users can create custom screens, input forms, and conditional logic to automate complex business processes. Flows can be initiated by a variety of triggers, such as when a record is created or updated, or when a button is clicked.

What is Record Triggered Flow

Record Triggered Flow is a type of flow in Salesforce that is initiated when a record is created, updated, or deleted. It allows users to automate certain business processes by defining a series of actions that should be taken when a specific trigger event occurs.

Scenario : –

Here’s an example of a record-triggered flow that Creates an Opportunity upon Account creation if Account active is equal to ‘Yes’ then only an Opportunity should be created related to the Account

 

Step 1: Create a New Flow

First, you’ll need to create a new flow. In Salesforce, go to Setup, then search for “Flows” in the Quick Find box. Click on “Flows” and then click “New Flow” to create a new flow.

A

Step 2: Choose Record Triggered Flow Type

In the new flow screen, select the “Record- Triggered Flow” option and give your flow a name.      B

 

Step 3: Select the Object to Monitor

Next, select the object you want to monitor for changes. In our example, we want to monitor changes to the Account object.

C

Step 4: Define the Trigger Conditions

Now it’s time to define the trigger conditions. In our example, we want to trigger the flow when the Account’s active field is equal to ‘Yes‘ then only an Opportunity should be created related to the Account. So we’ll add a trigger condition that says “When a record is created, and the Active field should be ‘Yes‘.

D

Step 5: Add an Action

You can see it is showing run immediatelySo once your account record is created so this part will run immediately and automatically.

Once the trigger conditions are set, it’s time to add an action to the flow. In our example,  So we’ll add a “Create Records” action to the flow. because we need to create an opportunity related to the account and account, we will be creating from the UI.

E      F

Step 6: Define the Field to Update

NOTE:  Now, one thing you need to remember. If you have gone through the screen flow scenario, what do we do in screen flow is we place our stream flow on the record page, or we launch it through the quick action. So in screen flow, if you want to receive the record ID of the record from where the flow is running.

We use it to create recorded variables in the screen flow. But in the case of record flow, you don’t need to create a recorded variable to store the idea of the record through which the flow is initiated. It is available in this global variable that is known as the $Record (dollar record). So if you use this dollar record, the dollar record will contain all the field information of the record through which this record-triggered flow will be triggered.

Now we need to specify which field to update. In our example, we want to update a custom field on the Account record. So we’ll choose the custom field from the “Field” dropdown.

G

 

Step 7: Set the Field Value

Finally, we need to set the new value for the custom field. In our example, we want to set the value to the  So we’ll choose $record account id from the “Value” dropdown for AccountId field,  for CloseDate,  build a formula and for StageName whenever any account record is created, so each opportunity will be having the stage name as prospecting or whatever you want to select in record triggered flow.

 

Step 8: Save and Activate the Flow

Once you’ve set up the flow, make sure to save it and activate it. Then, test it by creating a new Account with an active status. The flow should create a new Opportunity related to the Account accordingly.

That’s it! That’s how you create a record-triggered flow in Salesforce.

Thoughts on “An Introduction to Record Triggered Flow with Scenario – Salesforce”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Anshuli Nikhare

Anshuli Nikhare is a Salesforce Developer. She has over 2 years of IT industry experience working as an Associate Technical Consultant at Perficient based out of Nagpur. She is a Certified Salesforce Platform Developer (PD1). Anshuli enjoys how being a Salesforce Developer helps her skillset explore. She is a skilled researcher who can identify opportunities in a given arena, is a supportive teammate, and is an employee willing to go the extra mile to help others.

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram