Pause Element in Salesforce Flow

Pause Element in Salesforce Flow

Salesforce CRM involves the use of records and data as a CRM tool. Every day users create a lot of records and processes to run through those data and generate their required results. This is where Salesforce flows help in automating the task.

From performing basic CRED (Create, Read, Edit, Delete) operations to posting over Chatter or sending email, Salesforce flows help to work through all repetitive business processes and configurations within minutes.

Salesforce flow is an automation tool that takes data inputs and performs tasks assigned to them. There are different types of flow available along with different features to it like pause element and update record element. Let’s discuss about them.

Types of Flows

We have 2 major flows – a screen flow and an auto-launched flow. The auto-launched flow further gets bifurcated which gives you in total five types of flows which are mentioned below :

  1. Screen flow: A flow where the user creates a custom UI that will display a message, take input data and guide the users to the result via the flow process.
  2. Auto-launched Flow: A flow that is automatically launched by an API call, Apex Class or by any platform-event message. It doesn’t require any kind of user interaction or input. Some kinds of auto-launched flow are mentioned below.
  3. Scheduled-Triggered Flow: A flow that runs at a specific time after being scheduled for the duration and number of repetitions. This acts similarly to an Apex batch job.
  4. Record-Triggered Flow: A flow that is created to perform additional CRED operations on any specific record which is met while the parent flow runs.
  5. Platform Event-Triggered Flow: A flow that launches when a platform-event message is received and launches an auto-launched flow in the background. This flow can help you perform all automation that can be placed for a record in a single flow

A point to remember – the pause element is supported only in auto-launched and scheduled flows and not in screen flow or record-triggered flows.

Flow Builder

It is an interface where we can build new flows along with managing and editing the existing ones.

Follow the mentioned steps to launch flow builder in your orgs.

  1. Search for “flow” in the quick find box over the Setup
  2. Click on the “flow” option that pops up.
  3. It will launch the flow builder page which will have options to create new ones along with existing flows of the org.

Now let’s dive into what exactly the pause element is and see a scenario where it is implemented

Pause Element in Salesforce Flows

As the name suggests the pause element allows users to pause a flow for a specific duration or until the occurrence of a certain event before resuming the flow to continue. The process that gets started on the initiation of a flow ends when we pause a flow and a new process gets counted when the same flow resumes.

This way we can avoid hitting flow limits on a huge complex process dealing with a large number of records since the count of the generating process for the flow changes every time after a pause.

The pause element operates under multiple configurations known as “Pause Configurations” which help users to define the conditions of pausing the flow and resuming it back to action again.

When we add a pause element into our flow we get two options to work on – Pause Condition and Resume Event.

The pause conditions are optional but the resume event is mandatory data to be filled. The resume event determines and processes the condition when the pause occurrence will break and the flow will resume.

Implementation of the pause element in a Flow

Let’s see a scenario of how we can implement the pause element in a flow. Here I have taken a small example but similarly, we can nest pause elements and work over a complex flow.

Scenario:

We have field “Rating” with values hot, warm and cold. We have a field named “Active” with values yes and no. Both the fields are in the Account object. Whenever an account is created the rating field remains at warm and if the “Rating” is changed to hot the account will be activated.

We have to add a pause after checking the account value because we need a pause of an hour for the rest teams to prepare for account activation. After a pause of an hour, the Active status is changed to yes.

Steps to create Flow :

STEP 1: Search for “flow” in the quick find box over the Setup. Click on the “flow” option that pops up.

STEP 2: It will launch the flow builder page; click on “New Flow” and after that, you will get a new window opened which is our canvas to design the flow.

STEP 3: Over the flow builder drag the update record element and place it under the start button of the flow. Specify the conditions of the flow before pause. Since we will be looking for accounts with a rating as warm, we will update values as visible below.

STEP 4: Drag the pause element visible in the side panel. We get three options to pause a flow based on conditions we create, a specific time and a specific date.

Drag the “Wait for Amount of Time” element to pause the flow for a specific number of minutes, hours or days. In this scenario, we specified 5 minutes as the pause time.

STEP 5: Drag the update record element and place it under the pause element of the flow. Specify the conditions of the flow continuation after a pause; here we will be looking for accounts with a rating as hot so we will update values as visible below.

Save the flow and activate the flow.

 

Want to Learn Salesforce Flows? Checkout our Salesforce Flow Course

FAQs

1. What are flow interviews?

When we trigger or fire a flow the instance created is known as a flow interview. Flow interviews are made up of the current context and the logic within the flow.

2. Can we add the pause element in a screen flow in Salesforce?

A pause element can only be added in auto-launched flows and scheduled flows.

3. How to resume a paused flow in Salesforce? 

To resume a paused flow, click on the “Resume Paused” Actions tab and select the required flow from the list. The resumed flow will pop up and the list of further steps will be updated.

4. How do I pause a flow for 1 minute?

We can pause our designed flows for any specific time limit using formula fields. Create a Date/Time data type formula within the flow and {! $Flow. CurrentDateTime}+0.0007 as formula.

5. Where to find paused flow interviews in Salesforce?

We can view paused or failed flows under the “Paused and Failed Flow Interviews” section. Search Paused and Failed Flow interviews in Salesforce setup. We would land up to a listview with all failed flow interviews.

Conclusion

Incorporating the pause element in flows enables us to manage a large number of records effortlessly without exceeding flow limits, as the data is processed in separate batches before and after the pause.

By correctly setting the parameters and properly populating the resume event, pause elements ensure that flows run smoothly and efficiently, even when necessary delays are introduced.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Debasmita is a Salesforce Analyst by profession but her keen interest is to play with words and create content that helped her to be a technical content writer along with that she majorly deal with Salesforce Sales Cloud, Experience Cloud and she is always up for learning anything new which excites her.

Similar Posts

Leave a Reply

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