The complete guide to Salesforce Flow

Salesforce Flow is by far the most potent tool for Salesforce admins. It is an automation tool that empowers users to create business processes and solutions using clicks.

The complete guide to Salesforce Flow
Table of contents

A significant chunk of Salesforce is automation, be it record creation, submission, custom linking, or any other out-of-the-box configuration. Salesforce Flow can handle them all.

From the basic record creation, updating, deletion, and posting to chatter, Flow can work with much more complex business processes and configurations.

Some everyday use cases of Flow are – mass updates of records, assignments, record stage conversions, etc. Moreover, every new Salesforce release adds more capabilities Flow.

This article will explain Salesforce Flow, its components, use cases, and much more. Are you ready to go against the grain but still go with the flow with Salesforce? Great! Let’s hop right in.

What is Salesforce Flow?

Salesforce Flow is an automation tool that takes data input and performs designated tasks.


Flow automates complex business tasks and is super easy to maintain. Salesforce users can build Flow on one or more objects to meet specific business requirements.

Flow also allows you to integrate external tools, such as Salesforce and Gmail or Salesforce and Slack. When data is updated in any of these tools, it can then be automatically updated in all the other connected tools with the help of Flow. This connection is made without having to write code at all.

Salesforce Flow can also automate tasks using a pre-built Flow customized based on user needs.

What is Flow Builder in Salesforce?

Flow Builder is an interface from which you can create or manage new ones. To access it, follow the steps below:

  • Log into your Salesforce and go to “Setup.”
  • Search for “Flow” in the “Quick Find” box.
  • Click on the “Flow” option that pops up.
  • You’ll land on the Flow Builder page. This page hosts your organization's existing Flow and an option to create one.

Create a new Flow in Salesforce

  1. Once you are on the Flow Builder page, click on “New Flow.
  2. A new page will ask you to choose a Flow type. You have five Flow types to choose from. For now, select “Screen Flow” and click “Create.”
  3. The Flow Builder now launches a page with a new Flow having the start and end points. Everything in between is created by you.
  4. When you click on the ‘+’ sign, you’ll see many options. These are called Flow Elements, each serving a dedicated purpose.
  5. You can select and work with one or more elements. Once you’re done, click “Save” and “Activate” Flow to see it running.

Three building blocks are used in Flow

  • Elements are the heart and soul of Salesforce Flow. Every complicated logic, assignment, or interaction in Flow goes with elements.
  • Connectors determine the path of Flow and the steps of what happens when in Flow.
  • Resources are custom data variables in strings, numbers, formulas, records, etc. These are used to enhance the before or after trigger functionalities of Flow.

Flow elements

The Flow elements are divided into three categories:

1. Interaction

This category hosts Flow elements that gather information from the user, launch one or more sub-flows, and perform external actions. These elements consist of:

  • “Screen” is used to take inputs from and show messages to the user.
  • “Action” is the element used to ‘call’ other actions that may be based on objects, other users, etc.
  • “Subflow” can ‘call’ one or more sub-flows in Flow with the help of this element.

2. Logic

This category hosts all the logical operations and assignments you can perform on the input or selected records. Logic consists of:

  1. “Assignment” is a simple assignment of values to the variables.
  2. “Decision” makes a path Flow based on the given conditions. It creates two new paths. For example, a path for ‘True’ and the other for ‘False.’
  3. “Loop” allows you to iterate over a record or value repeatedly.
  4. “Collection Sort” sorts a given set of values or records.
  5. “Collection Filter” filters out values or records based on the given filter.

3. Data

This Flow element handles all the operations related to Salesforce records. Data offers five sub-elements:

  1. “Create Records” allows you to create records based on the values you’ve gathered through Flow.
  2. “Update Records” allows you to update records based on the values you’ve collected from Flow.
  3. “Get Records” enable you to fetch one or more records and store the required values for later use.
  4. “Delete Records” performs the deletion of designated records within Flow.
  5. “Roll Back Records” are cancellations to pending record changes.

When to use Flow

You now know what Salesforce Flow is. But when do you use it? Under what requirements and scenarios can you trigger Flow? What are the different Flow types?

Firstly, it is crucial to understand the type of automation required and the origin and endpoint of data. 

Flow can automate a whole sequence of manual processes. For example:

  • An active Flow can automate record creation, updating, and deletion based on triggers and decisions.
  • A configurable Flow can trigger records into approval processes and launch sub-flows within themselves.
  • An authorizing Flow automates the updates and creation of related records and data within the Salesforce platform and external integrations.

Even though Salesforce Flow can perform a whole bunch of operations and automations, it is not advised to use Flow for every possible requirement.

When there is a need to implement complex logic that may require heavy debug sessions, it is better to use Apex code. Debugging in a single Flow can prove to be a pain.

Flow types

Salesforce comes with two main Flow types – a Screen Flow and an Auto-launched Flow. The second type is further divided into four more types. Hence, collectively, we have five Flow types in Salesforce:

  1. Screen Flow.
  2. Schedule-Triggered Flow.
  3. Record-Triggered Flow.
  4. Platform Event-Triggered Flow.
  5. Auto-Launched Flow.

Screen Flow

Screen Flow requirements are used whenever we need inputs from the user. With a screen sample Flow implementation, you can create a screen (a custom UI) that can display messages, take input, and guide the user throughout the Flow process.

A Screen Flow is launched from the “Salesforce Utility Bar,” Apex custom action, Lightning Pages, quick actions, and more.

While creating a Screen Element Flow, click on the “Screen” element. You’ll see a bunch of components to add to the screen. For example:

  1. Text area.
  2. Picklist.
  3. Lookup.
  4. Name.
  5. Radio custom buttons.
  6. Checkboxes.
  7. Date and time ranges.

You can create a complete Form to get all the database records, tables, display notes, and warnings.

Once you set up your screen and take inputs from the user, you can add elements to create contact records, single update records, perform external actions, etc.

A Screen Flow can prove beneficial in many aspects, such as reducing the requirement for multiple validation rules, providing a logical flow of targeting input from the user, and much more.

Schedule-Triggered Flow

As the name suggests, a Schedule-Triggered Flow is scheduled and launched at the specified time for the given frequency. You can compare this Flow type with Apex batch jobs.

When you create a Schedule-Triggered Flow, you get to set the schedule of Flow. It asks for the date and time along with the frequency. A Schedule-Triggered Flow can be set to run once, daily, or weekly.

To monitor an already scheduled Flow, you can go to the “Scheduled Jobs” page in the “Setup.”

Record-Triggered Flow

A Record-Triggered Flow is mainly incorporated when there is a need to make additional updates on the triggered record. When you create a new Flow and select a Record-Triggered Flow, you need to consider the object on which you want Flow.

You also need to take into account a Record-Triggered Flow, which can be triggered when:

  • A new record is created
  • An existing record is updated
  • A record is created or updated
  • A record is deleted.

Entry conditions are set to filter the records that enter Flow. This Flow type is called a ‘before-save’ or ‘after-save’ trigger.

There are a few points that you need to consider before using this Flow:

  • A Record-Triggered Flow can only make changes in the record’s field values.
  • It can’t update records other than the triggered record.
  • It doesn’t support Flow actions other than “Assignment,” “Decision,” “Loop Element,” and “Get Records.”
  • If an object hosts more than one Record-Triggered Flow, you can’t determine the order of execution of each individual Flow.

An important point is that a Record-Triggered Flow can change a record ten times faster than the conventional record change in Salesforce.

Platform Event-Triggered Flow

A Platform Rvent-Triggered Flow can help you manage all your Salesforce automations in one Flow. It is an Auto-Launched Flow that runs in the background. It is launched when a new platform-event message is received.

It can process up to 2000 event messages at a time. Although, the order of execution of these batches is unknown.

A platform event allows communication of applications internal or external to Salesforce. It is based on event-driven architecture and follows the publish and subscribe model.

A platform event mainly handles the queue of incoming and processed events.

Auto-Launched Flow

A non-trigger Auto-Launched Flow is invoked only by Apex class, REST API, or a Process Builder. This Flow type covers abstraction, as you can perform complex problems triggered and solved in the background without letting the user know anything.

Flow vs Apex vs Process Builder vs Workflow

Flow, Process Builders, and Workflows are no-code building automation tools of Salesforce, while Apex is a programming language. However, they all share a similarity – they're used to automate Salesforce processes.

But there are critical patterns, behavioral patterns, and differences that are important to know.

Flow vs Apex

Salesforce Flow and Apex are both potent tools. One goes down the no-code path, while the latter is based on coding. A piece of automation processes can be performed using these two.

But, if you are to compare the two, you can do much more with Apex. Let us understand the differences:

  • The most evident and significant difference between these two is that Flow is a no-code automation tool, and Apex is all about codes.
  • Apex code requires a seasoned developer with all the knowledge of Apex and Salesforce governor limits to write efficient code, while Flow is easy to begin with.
  • In terms of the range of capabilities, Apex stands above Flow. But that doesn’t justify the use of code in every possible scenario.
  • Apex code is favorable in complex multi-level automations and integrations with external systems and databases. These complexities are better handled with code. You can also easily control the batch size of a job.

Flow vs Process Builders

Both Flow and Process Builders are automation tools by Salesforce that depict the same idea. But where do these differ? To be short and concise, a Process Builder is an integrated part of Salesforce Flow.

Process Builders can handle slightly easier automations, like updating given or child records.

At the same time, Flow can handle much more complex automation tasks within or outside of Salesforce.

The key differences between these two are:

  1. Unlike Flow, Process Builders do not offer the functionality to add screens to fetch input from the user or show messages.
  2. Although both can be scheduled conditionally, Flow can be interrupted midway. This is not the case with Process Builders. Once the complex processes start and the conditions are satisfied, they can’t be stopped.
  3. Flow is created to perform actions before or after a record save, but Process Builders are limited to after a trigger.
  4. Process Builders only run after a record has been created or updated, but Flow takes it one level up by including the ‘on-delete’ operation.
  5. Process Builders offer a few individual actions that are not available in Flow, including survey invitations and quip actions.

Flow vs Workflow Rules

Consider Workflows as the left-out automation tool of Salesforce. As most of the work can be handled by Flow and Process Builders, Workflows are the last resort. Moreover, projects have started migrating Workflow Rules to Flow because Salesforce won’t be backing Workflows in the future.

Some key differences between the two include:

  • Unlike Flow, Workflow Rules are not available for use in Salesforce editions, such as “Professional” and “Essentials.”
  • Workflow Rules don’t offer a wide functionality range. These are limited, such as creating and updating a task or record and sending an email alert or outbound messages.
  • Workflow Rules have a limit of only 1000 triggers per hour.
  • Workflow Rules can’t make more than one decision at a time. They also can’t ‘call’ other automation processes within them. However, Flow allows you to ‘call’ other Apex classes and sub-flows.

Common mistakes while designing Flow

Although Flow is simple to work with, some complex requirements can make you commit mistakes. Here are some of the most common mistakes users make:

Null value check

Most of the time, Salesforce Flow has distribution methods that work on decisions and conditions based on field values. Hence, not having a null value check can prove fatal to the process.

Excessive SOQL queries

Salesforce organizations are often shared, and there are governor limits for different functionalities, especially for SOQL questions. Hence, keeping this in mind while working with a flow is vital.

Wrong field selection

Salesforce objects may have numerous and monotonous fields for complex business solutions. Therefore, setting up the fields carefully in a flow becomes necessary. However, one wrong field can disrupt the whole process.

Sharing and security

The user who triggers Flow should have proper object-level and field-level access to the objects and Flow used in the Flow process.

Is Salesforce Flow the most powerful automation tool?

This is a question that comes up with a lot of debate. However, the answer seems relatively straightforward. As we’ve discussed, with every new release, Salesforce announces new features and capabilities of Flow. It won’t be far off to say that Flow is the superlative of Process Builder and Workflow.

Also, Salesforce announced the retirement of Process Builders and Workflow Rules at Dreamforce 2021. Moreover, as Flow has almost all ‘Apex-like’ functionalities, it is arguably the most powerful automation tool by Salesforce.

The power of flow is in your hands

Flow is a very powerful automation tool and proves to be the weapon that puts Salesforce administrators on a stage equal to developers.

Learning how to leverage Flow will help you develop better and faster Salesforce solutions.

Salesforce administrators who excel at working with an auto-launched Flow can create a whole business process without writing a single line of Apex code. Using just Flow, you can build custom business logic within a few hours.

If you are a Salesforce admin, it is beneficial to become one of the many Flow users as soon as possible. You can forge a Salesforce Flow to almost any weapon you like.