A Quick History of the Automation Tools
Salesforce offers a variety of automation tools, ranging from declarative to programmatic solutions. Some of these tools are no longer supported, while others remain operational. In this section, we will revisit what each of these automation tools can offer to the admins and developers when building effective solutions.
-
Workflow Rules were the original automation tool in Salesforce, like the ‘first-gen’ of automating simple actions. You could set up basic automation like updating fields, creating tasks, or sending emails based on specific criteria. Salesforce announced the retirement of Workflow Rules with the first step beginning in Winter '23 release, in which new workflows can no longer be created. Existing workflow rules are recommended to be migrated to Flow.
-
Process Builder had a relatively short lifecycle. Introduced in 2015 and phased out in 2022, it is a more flexible alternative to Workflow Rules. It can support actions like calling Apex and other processes. Like workflow rules, existing processes in Process Builder should be migrated to Flow.
-
Approval Process is an automation tool that you can use for record approvals, mostly utilized in sales, finance, and HR departments. For example, if the Sales Director must approve an opportunity where the revenue is more than 500,000 USD, then Approval Process is the best tool. This tool is still supported and can be triggered manually or via Flow.
-
Apex code is a powerful, programmatic automation tool capable of complex operations. Apex should be reserved for processes that can’t be accomplished declaratively, like integrations with external systems requiring complex data mapping and transformations, creating email services, and batch processing large volumes of data.
- Lastly, the Flow Builder is a game-changer as it is the most versatile and powerful declarative tool. Previously known as the old Visual Workflow, it has now evolved to an enhanced version what we known now as Flow Builder. It offers a wide range of functionality comparable to Apex. Salesforce is consolidating Workflow Rules and Process Builder into Flow to provide a single, unified automation tool that simplifies automation management and offers more power and flexibility. Flow Builder will be the focus of our discussion.
Introduction to Flow Builder
Salesforce Flow is a powerful declarative tool that offers functionality similar to Apex. It can automate business process and handle complex logic using only a point-and-click interface. Flow can handle everything from simple automations, like updating fields or sending emails, to advanced workflows that involve multiple decision points, data manipulation, and interaction with users through screens. This flexibility has made Flow the central automation tool in Salesforce, which is ideal for both admins and developers aiming to streamline processes without delving into custom code.
Types of Flows
Salesforce provides several types of flows to accommodate different automation needs, including:
-
Record-Triggered Flow - This type of flow will automatically be triggered upon record creation, update or delete.
-
Screen Flow - This is an interactive type of flow where user can navigate through the guided screens. This is usually embedded on a Lightning record page, or can be called upon clicking a button.
-
Autolaunched Flow - This runs automatically without user interaction, often called by other flow or Apex.
-
Schedule-Triggered Flow - This flow runs at scheduled interval, such as daily or weekly.
- Platform Event-Triggered Flow - This flow runs when a platform event message is received.
Use Cases of Salesforce Flow
The following are use cases for each type of flow in the given industries:
Basic Building Blocks of a Flow
The flow has 3 buildings blocks which are the Elements, Resources, and Connectors.
-
Elements are the main blocks of the flow that can execute actions. It can be retrieving records, updating or creating records, sending email, and displaying information to the users.
-
Resources are values that can be referenced throughout the flow such are variables, formula, text templates, and many more.
- Connectors, from the word itself, connects the elements and shows the path on which action or element will execute next.
Flow Elements
Elements are the primary building blocks within a flow, each representing a specific action. Salesforce categorizes elements into three types: Interaction, Logic, and Data.
Interaction elements require manual intervention from the user, making the Flow more engaging. It can be a Screen, Action, Custom Error or a Subflow.
-
Screen element can either capture details from or display information to the user. For example, a screen might prompt a customer service agent to enter information about a customer’s issue.
-
Action element calls a standard or custom action created by developers or admins, such as posting to Chatter, calling an Invocable Apex method, sending an email or custom notification, or submitting a record for approval.
-
Custom Error element is only available for record-triggered flows. Its purpose is to add error message to the entire page or a specific field, blocking further actions until the issue is resolved.
- Subflow launches another active Flow within your org, allowing for modular automation. This is particularly useful for reusing a set of actions in multiple Flows, similar to calling a method in Apex. For example, you could create a Subflow for common data processing tasks and call it from various Flows as needed.
Logic elements execute in the background without user interaction. Some of the most common Logic assignments are Assignment, Decision, Loop, and resource manipulation elements such as Transform, Collection Sort, and Collection Filter.
-
Assignment element allows you to set value to a variable or add data to a collection. This element is essential when you need to store interim results, prepare values for record updates, or manipulate data within the flow before passing it along to other elements or actions.
-
Decision element in Flow provides conditional branching, enabling you to split your flow into different paths based on specific criteria. This is similar to using if-else statements or switch statements in Apex, as it evaluates conditions and determines which path the flow should follow based on the result.
-
Loop element allows you to iterate over each item in a collection variable, performing actions on each item in the list. Similar to a for loop in Apex, it enables you to process each record or data item individually.
- Other resource manipulation elements such as Transform, Collection Sort, and Collection Filter allows the update of the content of your collection like sorting and filtering based on the set of criteria you defined, or map source to target data.
Data Elements are used to perform any operations related to your records - such as Get Records (records retrieval), Create Records, Update Records, and Delete Records.
Flow Resources
Resources are values that can be used throughout the flow.
-
Variables are the most common resource in a flow. It contains a value that can be used or updated throughout the flow. Just like in Apex, a variable has its own data type which can be a String, Number, Currency, Date, Boolean, or a Record.
-
Constant also holds a value but unlike variables, they can't be updated.
-
Formula also contains a value that is evaluated from an expression you defined.
-
Text Template contains a text that can be formatted as Rich Text or Plain Text and can be referenced on other elements.
- Collection Choice Set, Picklist Choice Set, and Record Choice Set contains a set of values that can be applied on a picklist or radio button component on a Screen element. The difference is the source of values - records are the source of the Record Choice Set, standard or custom picklist values of a targeted object and field are the source of Picklist Choice Set, while Collection Choice Set can have a source of a record list or a custom Apex-defined collection. Unlike the three, the Choice resource is a single value that can be added as an option for picklist or radio button.
Summary
Salesforce Flow is a powerful tool that enables admins and developers to build sophisticated, low-code automations across a wide range of business processes. As Salesforce continues to consolidate its automation tools into Flow, it’s clear that mastering Flow is essential for anyone looking to streamline and enhance processes within Salesforce. I’ll be creating future blogs to discuss each Flow type in detail—so stay tuned!
For those eager to deepen their knowledge, the resources below offer tutorials, hands-on practice, and in-depth guidance. By continuing to explore Flow, you’ll be investing in the future of Salesforce automation and expanding your ability to create impactful, scalable solutions without writing complex code. Keep practicing, experimenting, and building with Flow—your journey into low-code automation is just beginning!
Resources
Automate Your Business Processes with Flow
Trailhead: Flow Builder Basics
Trail: Build Flows with Flow Builder




0 Comments