Salesforce Flow

Knowledge of Salesforce Flow and Different Type of Flows and Its Elements

What are Flows?

In Salesforce, a flow is an application that automates complex business processes. Simply put, it collects data and then does something with that data. Flow Builder is the declarative interface used to build individual flows. Flow Builder can be used to build code-like logic without using a programming language.

Different Types of Flows:

The Salesforce Flow can be classified into five subtypes:

  1. Screen flows: It can be called using a button or an action or displayed in a Lightning Page or the Utility Bar. It appears as a screen for the user to interact with. Screen flow cannot be automatically triggered.
  2. Schedule-triggered flows: It runs automatically on a recurring schedule. It is helpful for jobs performed frequently or on a schedule (once, daily, weekly). It will run on the defined particular time on the particular Schedule (once, daily, weekly).
  3. Auto-launched flows: These can be called Apex, Process Builder, or another Flow. They can perform actions automatically behind the scenes.
  4. Record-triggered flows: It begins when a record is created or updated. Its functionality is similar to Process builder.
  5. Platform Event-triggered flow: These are called when a platform event is received.

Type of Flows

Type of Flows

Flow Building Blocks

Flows use three building blocks: elements, connectors, and resources.

    1. Elements are nodes on the canvas that makes things happen. To add an element to the canvas, click Add element.
    2. Connectors are lines on the canvas that define the path the flow takes when it runs. They tell the flow which element to execute next.
    3. Resources are containers that don’t appear on the canvas but are referenced by the flow’s elements. Each resource contains a value or a formula that resolves to a value. For example, your flow can search for an account’s ID, store that ID in a variable, and later use that variable to tell the flow which accounts to update.

dont miss out iconDon't forget to check out: Update Related Record Using Salesforce Flow - A Complete Guide

Types of Elements:

    1. Interaction - Flows can interact with users by presenting questions and information on a screen, or by sending various types of communications. The Screen element and the Action element make these interactions possible.


    1. Data - Data elements instruct the flow to interact with records in the Salesforce database. Use data elements to look up, create, update, and delete Salesforce records. You can work with one record at a time, or many records all at once.

Data elements

    1. Logic - With logic elements, you can evaluate that data and manipulate it according to your business requirements.

logic elements

Connectors: Connectors define the path that the flow takes as it runs. They tell the flow which element to execute next. There are different types of connectors that tell the flow to take a different path in certain circumstances, but most of the time, the flow follows its connectors from one element to the next.

What Is a Variable?

In a flow, a variable is a container that holds a piece of information. Flow stores values in variables, but those values can be changed by the flow.

Why Do I Need Variables?

    • In a screen flow, store the ID of the record that the flow is displayed on, so you can tell the flow which records to update at the end of the flow.

    • Store a number value that can be higher or lower depending on user choices.

    • Store the result of joining two text strings together.

    • Retrieve record values to use in calculations, copy to another record, or display to a user.

    • Assemble a collection of values that you can use to create a record.

    • Make changes to every record that meets certain criteria.

    • Delete every record that meets certain criteria.

    • Keep a running tally of how many times a loop has run.

What Can I Store in a Variable?

    1. Text: A string of letters, numbers, and characters. If you just need to store a Salesforce ID, and not a whole record, use a text variable.
    2. Number, Currency: A numerical value. Don’t include any currency symbols, such as $ or €.
    3. Boolean: A true or false value. These variables can only contain the True, False, or Empty String global constants.
    4. Date, Date/Time: A specially formatted value that indicates a specific date, or a specific time on a specific date. See Valid Date and DateTime Formats for info on how to format date and date/time data.
    5. Record: All of the values in a Salesforce record, are stored together in a single variable. Each value maintains its own data type, just like in a Salesforce record. The flow can retrieve or update each value individually.

Advantages of Flows:

  1. Admin maintainability
  2. Built-In version control
  3. Custom components
  4. Collections variables
  5. User-friendly debugging

dont miss out iconCheck out another amazing blog by Aman here: Knowledge of Sandboxes | Types of Sandbox in Salesforce

Disadvantages of Flows:

    • Learning curve (as a developer)

    • Code less complicated for some use cases

    • Missing capabilities that code has:

    1. Maps
    2. Upserts
    3. Partial DML Operations

Please follow this module for Hands-On Experience.

    • Record Triggered Flows

    • Flow Builder

    • Flow Basics

    • Screen Flow Distribution


Popular Salesforce Blogs