How to Create a Scheduled Path in Salesforce Flow

In Salesforce, to execute a process automatically after a specific time, we can either create a Scheduled-Triggered Flow or use a Wait Element in Salesforce Flows.

The Wait Element can only be used in Scheduled-Triggered Flows and Autolaunched Flows. However, when we are working with a Record-Triggered Flow, which runs when a record is created or updated, we might want to delay the execution of certain actions instead of running them immediately.

Since the Wait Element is not supported in Record-Triggered Flows, Salesforce provides the Scheduled Path feature. This allows us to configure actions to run before or after a specific time, such as a certain number of days or hours after the record is created or updated.

In this article, we will learn how to create a scheduled path in Salesforce Flow. In this scenario, I will explain the situation. Then we will create a Record trigger flow to execute before or after the record is created or updated, depending on the scenario.

Create a Scheduled Path in Salesforce Flow

Below, I will explain the use case and how we can create a scheduled path in Salesforce Flow to automate the process according to our requirements.

The ‘Scheduled Paths’ allow us to pause the flow for a specified duration, such as a few minuteshoursdays, or months.

Use Case:

Suppose a company has organized a campaign, and the lead generated from that campaign is stored in the Lead object. Initially, the lead status was ‘Open Not-Contacted’.

Now, after 3 days of lead creation, even if a lead is still in Open Not-Contacted status, we want to send a follow-up email to the lead owner.

Create a Record Trigger Flow in Salesforce

I will now explain the flow and demonstrate the proof of concept for the working flow.

Click on the Setup. -> Home Page. -> In the Quick Find Box, Search for Flows. You will see an option under Process Automation. -> Click on Flows.

In the flows setup window, click on the button New Flow -> Start From Scratch -> select the Record Trigger Flow -> Next.

In the start element, we have to select the object on which we want to perform automation. In our scenario, the Lead is a triggering object.

In Configure Trigger, I have selected A Record is Created. Then, add the conditions to get only those records that meet the condition requirement. Here, I set the Status  ‘Open Not-Contacted’.

Use Scheduled Paths in Salesforce Flows

After that, when we create a lead record, instead of sending a follow-up email immediately to the lead owner, we want to send it after 3 days of lead creation.

For that, click the Scheduled Paths option, provide a Label, and API Name. Next in the Time Source, we need to select the action for which we want to set the schedule path.

Then, in the Offset Number, we need to provide a number, and then in the Offset Option, we can select the following values:

Before ExecutionAfter Execution
Months BeforeMonths After
Days AfterDays Before
Hours AfterHours Before
Minutes AfterMinutes Before

For this scenario, I have added that when a Lead is created, then 3 Days After, further action should be executed.

Create a Scheduled Path in Salesforce Flow

Next, add the Decision element to check whether, after 3 days, there is still any lead in open, not contacted.

Add an Outcome Label and a condition for the decision element that verifies the lead status.

Create Scheduled Paths in Salesforce Flows

Now, let’s create the Text Template for the email subject and body. In the body, we inform the lead owner that their lead remains open and not contacted even after 3 days. Whatever you want to send as a customer template, you can send.

Salesforce Flow Configure Scheduled Paths

Next, we will send an email to the lead owner, notifying them to follow up on the lead. For that, add the Send Email action.

Here, you need to select the field values to send an email, such as sender email, subject, body, recipient address, etc.

Record Trigger Flow Scheduled Paths in Salesforce

Now we are ready to save the flow. To do this, click the Save button, provide a flow Label, and the API Name will be automatically populated.

After that, always debug the flow before activating it to ensure that the working flow is correct and that there are no runtime errors. Then activate the flow.

Record Trigger Flow Pause Execution in Salesforce

In this way, we can create scheduled paths in record trigger flow to set the flow execution time in Salesforce.

Conclusion

I hope you have got an idea about how to create a scheduled path in Salesforce Flow. In this scenario, I have explained how we create a record trigger flow to execute before or after a specific period of time when a record is created or updated.

By creating the scheduled paths in the record trigger flow, the flow executes after a time interval that we defined instead of executing immediately.

You may like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.