Saturday, September 16, 2023

What are the Different Types of Flows?

As a Salesforce Admin, Salesforce flows are one of the most effective tools in your toolbelt. When set up correctly, Salesforce flows help you simplify complicated business processes. Otherwise, it can make a mess.

Salesforce recently announced the deprecation of Workflows and Process Builder in 2023, which means they would no longer receive product updates. This announcement means that Salesforce Flow builder will be the single source of business process automation without code. After 2023, we would be unable to create new process builders and workflows, but editing on the existing ones would be allowed.

Let’s get a basic understanding of Salesforce flow and how it works.

What are Flows in Salesforce?

The flows in Salesforce are an automated application that captures all data and performs the necessary actions in the system. Flows are the strongest weapon of an admin in Salesforce. The Salesforce flow simplifies complex business processes using click, not code.

The flow builder is used to perform tasks without knowing the programming language. For example, flow builders can automate processes that need creating/updating unrelated records, querying multiple objects, or running loops on the data. Flow builders can also access external systems. Flows can be further extended by adding Apex actions.

If an admin possesses a foundational understanding of the flows, he can operate it by just clicking on the application’s automated tabs.

What are the Different Types of Flows?

There are 5 types of Salesforce Flows.

a. Screen flows
b. Schedule-triggered flows
c. Autolaunched flows
d. Record-triggered flows
e. Platform Event-triggered flow

1. Screen Flow

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. Record Triggered Flow

It begins when a record is created or updated. Its functionality is similar to Process builder.

3. Autolaunched Flow

These can be called Apex, Process Builder, or another Flow. They can perform actions automatically behind the scenes. Learn more about Autolaunched Flow in Salesforce in our in-depth guide.

4. Scheduled Triggered Flow

It runs automatically on a recurring schedule. It is helpful for jobs performed frequently or on a schedule (once, daily, weekly).

5. Platform Event-triggered Flows

These are called when a platform event is received.

flow 1

Learn everything about Salesforce Flows  – Sign Up for Salesforce Flow Course here


What are the Best Practices for Creating Flows?

1. Plan the Flow

Understand the business process that needs to be automated using the flow. Draw the step-wise details required; this will help determine what elements and actions the flow needs. It would also help to understand how or when the flow is initiated.

2. Create and Test the Flow

Create and test the flow in the Sandbox or developer environment before production. Creating the flow directly into production creates a risk of creating/modifying, or deleting data in production.

3. Perform Data Manipulation

Flows run under Apex governor limits; it is wise to combine all the data manipulations (create, modify or delete) and perform them at the end of the flow.

4. Do Not Hardcode Ids

Ids are org-specific and will cause an error in the Flow execution when deployed to other environments.

5. Save the Flow Regularly When Creating

Flows are not saved automatically. In case of session time out or internet issues, one can lose the developed flow unless explicitly saved. So it is recommended to save progress regularly.

6. Always Build an Error Handler

Include a fault path in the flow design to gracefully handle an error in the flow and show custom error messages.

7. Test Possible Paths the Flow Can Take

In the case of complex flows, the flow can take multiple paths depending on the data and decisions configured. Make sure to test as many paths as possible.

8. Ability to Navigate to the Previous Screen

Avoid giving users the functionality to move backward in the flow. This can cause the flow to make duplicate data changes in the database if not handled carefully.

What are the Major Limits of Using Flows?

Apex transaction limits govern flows. In case a flow exceeds a governor limit, the complete transaction is rolled back. The changes made by the transaction will be rolled back, even if there is a fault path defined. The limits of the larger transactions would govern the auto-launch flows initiated as part of a larger transaction.
Flows have usage-based entitlements that determine how many flow interviews are allocated per month. The entitlement allocated for the org can be viewed in Setup -> Company Information.

What are Some of the Flow Considerations?

There are a few considerations to keep in mind when creating flows. A few are listed below:

  1. Flow can access data only if the running user has permission to access the fields.
  2. In case Flow tries to update a field that is not editable by the user, flow fails. This scenario can be avoided by using the setting ‘Filter inaccessible fields.’ The setting can be found in Setup->Process Automation Setting.
    flow 2flow 3
  3. In a transaction when Salesforce creates, updates, or deletes data in the org and then attempts to access external data in the same transaction, an error occurs. A separate transaction is recommended to access data in external systems. In the flow, end the prior transaction by adding a Pause element or a Screen element.
  4. When a user session expires, in-progress flow interviews are interrupted and can’t be resumed. If the flow executed actions, such as record manipulations or Chatter posts, those actions aren’t rolled back. But any other progress through the flow, such as user data entered on the screen, is lost.

To read more about flow limits and considerations – Click here

What are Some of the Basic Flow Features?

1. Manager Tab

The manager tab displays the existing resources. Each resource represents a value that is referenced throughout the flow. Some of the resources are Variables, Collections, Constants, Formulas, or Choices.flow 4 e1634201175964

1. Variable: Variables are used to store data to use in the flow. The variables can be of type Text, Number, Record, Dates, Currency, Boolean, Picklist, or Object record, to name a few.

2. Collection: Collections are used to store a list of variables. They are used to process multiple records at a time.

3. Constants: Constants are values you set once and never change. Constants are recommended when the flow needs to reference the same value multiple times.

4. Formula: Formula is used to display a dynamic value depending on other values within the flow.

5. Choices: Choices are used in Screen flows to show options to the user.

2. Elements Tab

The elements tab displays Interaction, logic, and data elements available for the flow. Each element is an action the flow can execute. New elements can be created from the Elements Tab.
flow 5 2

3. Interaction Elements

a. Screen: Screen element / User interface for the flow. The screen can be used to display information or can be used to collect data from the user. This element is available only in Screen Flows.

2. Actions: Actions are external actions that further extend the functionality of the flow. Some examples for actions – Apex, Send emails, etc.

3. Subflow: A flow can initiate another flow.

4. Logic Elements

1. Decisions: Decisions split the flow depending on the data that’s being sent through the decision element.

2. Assignments: Assignments give a value to a variable.

3. Loops: Loops handle multiple variables at once using collections.

5. Data elements

Data elements allow the flows to fetch, create, update or delete records in the database. The elements include Get Record, Create Record, Update Record, and Delete Record. Get Record is used to fetch record/s from the database. Create Record, Update Record, and Delete Record are used to activate the data in the database.

6. Connectors

Connectors decide the available paths that a flow can take at run time. Various elements in the flow are connected using the connectors available. Some types of connectors are Unlabeled, Decision Outcome, Fault, Pause, For each, etc.

How to Troubleshoot the Flow?

Salesforce sends an error email every time a flow errors during the execution in the user’s default language who ran the flow. Flow error emails include the data that’s involved in the process or flow, including user-entered data. It gives step-wise information that was executed till the point of error.

A basic understanding of the Salesforce Flows provides the foundation for its further studies. We would love to help you to upgrade your knowledge about the recent developments in Salesforce. Sign Up Now!

Enroll in our Salesforce Admin Course to get the best chance to ace your Salesforce administrator exam in the first go. Check out our online Salesforce courses.

Explore about saasguru’s Salesforce learning app which is focused on increasing the skillsets of individuals and companies in preparation for Salesforce certification exams.

Frequently Asked Questions (FAQs)

1. How many types of flows are there in Salesforce?

The Salesforce Flow can be classified into five subtypes- Screen flows, Schedule-triggered flows, Autolaunched flows, Record-triggered flows, and Platform Event-triggered flows. 

The Screen Flows are UI apps where the users need to operate and interact with them, whereas the Schedule-triggered flow runs in the background and functions when required or at a scheduled time. 

In contrast to these two types, the Autolaunched flow, the record-triggered flow, and the Platform Event-triggered flow do not require any user input and run automatically when there is a need to record and save the update in the database.

2. What can we do with flows in Salesforce?

You can process your business smoothly in an automated manner without worrying about the nitty-gritty with the help of Salesforce Flows. It can collect all the data and function accordingly. Create posts for you, send emails, build records and delete them, update the necessary data and records and create events. 

The Salesforce Flow is one of the most powerful tools for the smooth operation of a business and for solving complex issues. It is also the savior of an admin in the company to automate the business. 

3. How does flow builder work?

The launch of a flow builder in the program or the Salesforce org is quite a complex procedure that might need you to seek professional help. 

You can create flows in your system to carry out complex business issues easily without having the need to use code or any other programming language. You must auto-launch the flow by creating and then activating it. 

4. When should I use a flow instead of Apex code?

Use a flow when you want to automate business processes in Salesforce with a visual, declarative tool. Flows are suitable for scenarios that involve data manipulation, record updates, and user interactions without writing code. If the process requires complex business logic or external integrations, Apex code may be more appropriate.

5. What is the difference between flow and trigger in Salesforce?

Flow is a declarative tool used to automate processes visually, while a trigger is a piece of Apex code that executes before or after specified database events, like insert, update, or delete operations. Flows are typically used for simpler processes, while triggers handle more complex and fine-grained logic.

6. What is flow vs process vs workflow?

Flow: A visual, declarative tool that automates business processes by guiding users through screens and performing actions based on user input or record changes.
Process Builder: A point-and-click tool that automates processes by defining criteria and actions to be executed when specific events occur (e.g., record creation or update).
Workflow: An older automation tool used for basic actions like sending email alerts or updating fields based on certain conditions.

7. What are the best practices for creating flows in Salesforce?

A. Keep the flow simple and focused on specific tasks.
B. Reuse flows where possible to reduce redundancy.
C. Use screen elements and dynamic choices to provide clear user instructions.
D. Consider error handling and provide informative error messages.
E. Use custom labels and custom metadata types for text values that may change over time.
F. Test thoroughly before deployment.

8. What are the limitations of flows in Salesforce?

A. Flows cannot execute certain administrative tasks.
B. Some complex business logic may require Apex code.
C. There is a limit to the number of elements and resources allowed in a flow.
D. Flow actions may not be bulkified, potentially impacting performance.
E. External calls from flows are subject to governor limits.
F. Flows do not support all data types and related functionalities.

9. How does Flow Builder relate to Salesforce Flow?

Flow Builder is a visual interface within Salesforce that allows users to create, modify, and manage Salesforce Flows. It is the primary tool used to design and build flows in a declarative manner.

10. How do I test a flow in Salesforce?

You can test a flow in Salesforce using the Debug mode within Flow Builder. In Debug mode, you can simulate the flow’s behavior by providing inputs and observing the actions taken. Additionally, you can run the flow in a sandbox or a developer edition environment to validate its functionality in a live setting.

11. How many flows can we create per object?

There is no specific limit on the number of flows you can create per object in Salesforce.

12. How do I troubleshoot a flow in Salesforce?

To troubleshoot a flow in Salesforce, you can:

Check debug logs to identify any issues.
Examine the flow’s logic and verify its actions and assignments.
Use the “Pause” element to halt the flow’s execution at specific points for testing.
Test the flow in a sandbox environment to replicate the issue and diagnose the problem.
Review any error messages or screen prompts displayed to the user during flow execution.

What is a flow in Salesforce?

Lightning flows (or simply flows) help you automate complex business processes and manual data entry. Flows let you work smarter, not harder, by saving your users time and making sure the required tasks are accomplished correctly.

As a Salesforce admin, flows are one of the most powerful tools in your toolbelt — when set up properly, flows make you look like a rockstar to your sales team, but if your flows aren’t configured correctly, they might be difficult to manage or make a mess (also kind of like a rockstar).

This guide will teach you everything you need to know about flows. Let’s dive in!

What is a flow in Salesforce?

In Salesforce, a flow is a tool 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.

Flows fall into five categories:

Screen Flows:

  • These are flows that have a UI element and require input from users. These types of flows are either launched as an action or embedded as an element on a Lightning page.

Schedule-Triggered Flows:

  • These autolaunched flows launch at a specified time and frequency for each record in a batch, and they run in the background.

Autolaunched Flows:

  • Run automated tasks with this flow type. Autolaunched flows can be invoked from other flows (subflow), process builder, from within an Apex class, from a set schedule, from record changes, or from platform events.

Record-Triggered Flows:

  • These autolaunched flows run in the background either before a record save or after the record is saved when a record is created, updated, or deleted.

Platform Event-Triggered Flows:

  • When a platform event message is received, these autolaunched flows run in the background.

Check out this example of a schedule-triggered flow, pulled from a well-known Salesforce group:

Screen Shot 2020-08-14 at 10.40.54 AM.png


When/why should I use a flow?

If you need to generate a new automated business process, or user guided experience that does not reach the complexity threshold for Apex Code, then flow is your go-to tool. If you are modifying an existing process that was built with Process Builder or workflow, then you should consider a number of factors when deciding whether to modify the existing process or migrate it to Flow. 

Flows are able to create, edit, and delete records in Salesforce, send emails, show relevant data and gather input from users, and generate outbound messages.

When should I not use a flow?

Generally, you should not use a flow in the following situations:

There is complicated logic involved that is better managed with Apex code. An example of this is the flow shown in the Overview section. The logic in this flow is so complicated that it makes debugging a pain, plus it makes documenting and managing the flow difficult.

Your Salesforce edition limits how many flows you can create. Note, it is possible for developers to write Invocable Apex methods that you can call from a flow (similar to calling a subflow). Using this pattern, you can offload especially complex processes to Apex, but still have your flow builder maintain control of the overall process!

Essentials and Professional editions of have a limit of five processes (per process type) and flows (per flow type) in each organization. For most logic in these editions, it is easier to use a process.

How do I create a flow in Salesforce?

Open Flow Builder. From Setup, enter “Flows” into the Quick Find box, select Flows, and then click New Flow. Select the Flow Type, then click Create.

The type of flow you create will impact your experience. For scheduled and record triggered flows, you can access an auto created global variable called $Record. This gives you access to all of the fields on the record that triggered the flow(and its parent records!!!). If you create an autolaunched flow, you’ll have to create any required input variables yourself.

Once you get your inputs setup, you can click the ‘+’ button after the start element - you will have a choice elements to carry out your business processes. Each element represents an action that the flow can execute. Examples of such actions include reading or writing Salesforce data, displaying information and collecting data from flow users, executing business logic, or manipulating data.

(For some more detailed flow building examples - subscribe to our newsletter! Just scroll to the bottom of this page to find the signup link.) 

Save your flow.

After you build a flow, make sure that it’s working correctly by thoroughly testing it. Once you’ve tested it, activate the flow. You’re now ready to distribute the flow to users.

Pro tip: Flows can be executed in several ways, depending on who the flow is designed for. Internal users, external users, or systems can run a flow, or a flow can be deployed for another organization. Just remember, no matter how you execute it…you’ve got to go with the flow.

Flows vs. Apex

Apex code requires a developer and Sandbox to deploy, meaning it can only really be built in organizations using a Professional or above edition of Salesforce. Flows can be built in all editions. While a Sandbox is not required to get a flow into a production environment, it is advisable that flows that leverage the full power of the tool are built and tested in a sandbox before being deployed to production.

Apex is not available in Essentials, and some Apex features are limited in Professional. Organizations with Enterprise and above have no Apex limitations, but flow features are not limited based on the edition. Apex code requires constant development and discipline to maintain. Flows require less work to keep up-to-date.

Flows can be built by admins, while Apex code is typically built by developers only. Apex code is considered a tool of last resort. Flows are simpler and should be used before Apex code.

If the logic is too complex, Apex code should be used. Each release brings new features that reduce the use cases that require Apex, but there are still some situations where Apex will bring a performance boost and should be considered.Renewal generation, Opportunity Product, and other pieces of automation that were traditionally built as Apex code can now be built as flows, preserving code space for projects that require Apex. 

Apex code should be used in the following scenarios:

  • Your flow requirements require nesting loops
  • Your flow requirements require get elements inside a loop
  • You are working with very large data volumes
  • You need custom-built integrations with other systems (such as a connection to a SQL database that requires bi-directional syncs).
  • ERP integrations are involved.
  • You need to log or present a custom error message if the automation fails or doesn’t find what it’s looking for. (However, you can do this in some cases with flow!)

Considerations for migrating from Process Builder to Flow:

With the Winter 23’ release, admins are no longer able to make new workflow rules, and Process Builder will be soon to follow. New automation should be built in Flow and migrating existing workflows and processes should be a strong consideration. Changing existing automation comes with its own risk. Consider the following when determining the right time to make the move.

Situations that indicate you should migrate soon:

  • You have more than one process builder per object
  • Your existing processes often fail or create errors
  • Your existing processes are simple
  • You are introducing a significant amount of new functionality
  • You have well designed acceptance criteria to test your new automation against your existing processes

Situations that indicate you should consider holding off your migration:

  • You have complex, stable processes that meet current business needs
  • You do not have clear testing requirements to confirm your new Flows replace the migrated workflows and processes. 

Testing flows

To test a flow, click the Debug button on the canvas, input your variables, and click Run. Then run through the flow to make sure it works properly. This process is especially helpful with screen flows.

Note that as of the Winter 2021 Salesforce release, a beta feature called Debug on Canvas is available. This feature makes flow debugging easier by visually demonstrating the path your flow will take when it runs. It also shows query limits of the flow in the debug details. Additionally, debugging now offers two more options than it did previously: Run flow as another user, and Run flow in rollback mode.

Where is the Flow Builder in Salesforce?

To find the Flow Builder in Salesforce (Lightning), navigate to Setup > Process Tools > Flows.

Setup.png
Screen Shot 2020-08-10 at 11.03.20 AM.png


What are the different Flow Types in Salesforce?

Auto-Launched Flows with No Flow Trigger

These flows don’t require user interaction, and they don’t support screens, local actions, choices, or choice sets. The available distribution methods available are:

  • Flow actions
  • Lightning pages
  • Lightning community pages
  • Custom Aura components
  • Custom Lightning web components
  • Custom buttons or custom links
  • Web tabs
  • Direct flow URLs
  • Visualforce pages
  • Lightning out
  • Embedded service deployments

Auto-Launched Flows with a Schedule Trigger

These flows only run from a schedule that the user sets. They don’t support user interaction, screens, local actions, choices, or choice sets. The available distribution methods are:

  • Processes
  • Custom Apex classes
  • REST API
  • Web tabs
  • Custom buttons or custom links
  • Visualforce pages

Screen Flows

Screen flows require user interaction because they include screens, local actions, steps, choices, or dynamic choices. Screen flows don’t support Pause elements. A schedule-triggered flow only runs at the scheduled time and frequency.

Auto-Launched Flows with a Record Trigger

These flows are designed to quickly make simple changes to a record when the record is created, updated, or deleted. They can also be configured to make those changes either before or after the record has been saved to the database. In a before-save flow, the supported elements are Assignment, Decision, Get Records, and Loop. After-save flows have access to all flow capabilities, but they cannot launch sub flows.

User Provisioning Flow

User provisioning flows provision users for third-party services. You could use this flow type to customize the user provisioning configuration for a connected app, linking Salesforce users with their Google Apps accounts. A user provisioning flow can only be implemented by associating it with a connected app when running the User Provisioning Wizard.

Field Service Mobile Flow

These flows require user interaction because they have one or more screens.

Field Service Embedded Flow

These flows require user interaction because they have one or more screens.

Contact Request Flow

These flows require user interaction because they have one or more screens. Use one of the following Experience Builder components to add this flow:

  • Contact Request Button & Flow (launch the flow in a popup window)
  • Flow (embed the flow directly on the page)

For more on Flow Types in Salesforce, check out the official documentation.

What is a flow interview in Salesforce?

While a flow is an application built by your administrator that asks you for inputs and does something in Salesforce based on those inputs, a flow interview is a running instance of a flow.

For example, a flow could provide a call script for customer support calls using the information you provided to create a case. What the flow does with the information you provide is entirely up to your administrator.

When you run a flow interview, whether through a link, button, or tab, you’re running a single instance of a flow. If the terminology is confusing, consider the difference between a record and an object. You create an account record, which is a single instance of the account object that your administrator customized.

It is a good idea to monitor the Paused and Failed Flow Interviews list available in Setup>Paused and Failed Flow Interviews. This pair of lists is quite helpful. The paused flow interviews lets you check in on flows with time based actions or screen flows that users have not completed. The failed flow interviews list is still more helpful as it shows you flow errors along with the debug log for the flow interview. This should be your first stop when troubleshooting a flow.

Read more about flow interviews in Salesforce’s documentation.

How do you call a flow from a button in Lightning?

Since Winter 2018, Salesforce has offered an easy way to trigger a flow using a Quick Action button in Lightning.

Note: Only screen flows or field service mobile flows may be launched from a Quick Action button.

Create a custom action for the record in question by navigating to Object Manager > (Object Name) > Buttons, Actions and Links. Select “Flow” as the type for the custom action, configure the custom action to reference the flow, then name it. Then add the custom action to the page layout of your choice.

Common mistakes made when designing flows

We see a lot of flows here at Kicksaw, and we build even more of them. Here are some common and avoidable mistakes we’ve identified:

  • Using the wrong field or variable
  • Not checking for null values
  • Putting Get, Create, Update, or Delete elements inside of a loop element
  • Referencing objects or fields that an end user may not have access to
  • No access to running flows
  • Using Get elements to get data that is available through the $Record or $RecordPrior in a record or scheduled trigger flow
  • Hardcoding record Ids

Further Salesforce flows documentation

We hope you learned a lot about the power of Salesforce flows in this article, but if you need more help, reference the official documentation.

For further learning, we also recommend completing the Build Flows with Flow Builder trail on Trailhead, and we encourage you to read more about Flow Builder.

Better yet, reach out to us by filling out the Contact Us form below! We’d love to help in any way we can.

Salesforce Flow

The use cases for Flow are endless, and its capabilities are growing with every Salesforce release. Formerly Visual Flow, Salesforce Flow has gone through significant upgrades to give us the Flow Builder interface, after being completely rebuilt from the ground up!

Today, I’ll take you through Salesforce Flow basics, and answer the following questions: What are Flows? What are Flow’s features? How can Flows be called? And finally, can Flows become the ‘one tool to rule them all’?

What are Salesforce Flows?

Flows allow you to build complex business automation using clicks instead of code. As an admin, Flows are going to be your best friend because you will be able to handle the majority of complex business requirements without the help of a Salesforce developer!

The benefit of Salesforce Flow is that they are easy to maintain because anyone (assuming they know Flows) should be able to follow along with what you built.

Flows are accessible through the Setup menu. Simply enter ‘Flows’ into the Quick Find box, and create a new Flow to get started.

Read More: Process Builder Vs Flows – Become the Ultimate Admin

There are 3 main “building blocks” of any Flow:

1. Elements are the individual building blocks of the Flow. These perform logical actions such as assignments, decisions, or loops. There are also data elements that will query the database or commit record changes.

2. Connectors determine which element leads to which. Winter ‘21 enables Auto-Layout, and connects the Elements together automatically.

3. Resources are the individual variables of data that are to be used in a Flow – these can be strings of text, numbers, records, formulae, or collections.

You can see these in action on the Flow Canvas below. This example Flow below is a declarative replacement for a ‘before’ trigger. In the ‘Start’ element at the top you can see that the trigger is when a record is created or edited, and it should run before the record is saved.

What Are the Basic Flow Features?

On the left-hand side of your Flow Canvas, you’ll see the Toolbox. Depending on the type of Flow that you’re working on (whether it’s a Screen Flow, Auto-Launched Flow, etc.) you’ll see a different set of tools.

Manager Tab

In the screenshot below, you can see the Manager tab that contains the existing elements and resources of the Flow (this is from an Auto-Launched Flow):

This is where your Resources are kept. Some examples of Resources are Variables, Collections, Constants, Formulae, or Choices.

  • Variables are where you can store data to use in the Flow. These can be Text, Number, Record, Dates, Currency, Boolean, or Picklists just to name a few.
  • Collections are a group, or ‘list’, of Variables stored together. Collections allow you to process multiple records at once, or ‘bulkify’ your Flows.
  • Constants are values you set once and never change. They are useful when you want to refer to a single value multiple times through your Flow – if you ever need to change that value, you just need to change it once and it is reflected throughout the Flow.
  • Formulae display a dynamic value depending on other values within your Flow. If you need to calculate a future date based on when the Flow was run, a Formula will be helpful. If you need to calculate and set a currency based on an interest rate, a Formula can be used.
  • Choices are used within Screen Elements to display an option to the user.

Elements – Interaction, Logic, Data Elements

Next, you have the Elements screen. This is where you can create new Resources and Elements in the Flow. In the screenshot below, you’ll see a ‘Screen’ element (because I took the screenshot in a Screen Flow, which will not appear in a Flow type that doesn’t support Screens, such as an Autolaunched Flow). There are a number of different elements that will dynamically show up depending on the type of Flow you’re working with.

Interaction elements include Screen, Action, or Subflow.

  • A Screen element, only available in a Screen Flow, allows you to present a screen to the user. This screen can display information from the data your Flow is working on, or it can be used to collect information from the user.
  • An Action element allows you to pass data through to a pre-existing standard or custom action such as Send Email, a Quick Create, or a custom Apex action.
  • A Subflow element allows you to call another Flow within your current Flow – this means that if you have another complex Flow set up, you don’t need to replicate the logic in your new Flow. This also makes maintenance easier as you only need to update your logic once if you design your Flows well enough!

Logic elements include Decisions, Assignments, and Loops.

  • Decisions allow you to split your Flow depending on the data that’s being sent through it.
  • Assignments allow you to give a value to a variable.
  • Loops allow you to handle multiple variables at once using collections.

Data elements include Create, Update, Get, or Delete records.

Essentially, any time you want to edit a record in the Salesforce database, you’ll need to use one of these Data elements. These will also dynamically display depending on the type of Flow you’re running. If you’re running a ‘before triggered’ Flow, you’ll only be able to use ‘Get’, for example.

How Do You Call a Flow in Salesforce?

To ‘call’ a Flow means that something happens in order to kickstart the Flow process. This could be a Salesforce record change, from another process in Apex/Process Builder, or automated on a recurring schedule.

When you create a new Flow, you’re prompted to select the type of Flow you wish to create.

  • A Screen Flow is called through a button or action, or displayed in a Lightning Page or the Utility Bar, and appears as a screen to the user to interact with. This cannot be automatically called.
  • A Schedule-Triggered Flow runs automatically to a recurring schedule. This is handy for tasks that need to be performed daily on a set of records, or to handle jobs that run frequently.
  • Autolaunched Flows are called through Apex, Process Builder, or another Flow. They can be used to perform actions automatically behind the scenes.
  • Record-Triggered Flows begin when a record is created or updated, very similar to Process Builder (more on this later).
  • Platform Event-Triggered Flows are called when a platform event is received, similar to an Autolaunched Flow.

Can Flows Be the ‘One Tool to Rule Them All’?

This is a question that I’ve been wondering about, each time Salesforce announcements huge amounts of updates for Flow in every release. But my suspicious have been confirmed. At Dreamforce ’21, Salesforce announced that Workflow rules & Process Builders will be retired, and Flow will be the only declarative automation solution on the platform.

Overall, I think this is inevitable. Salesforce has not updated the functionality of other automation solutions in many years, and due to Flow having “Apex code” like functionality, it’s by far the most powerful automation tool.

By learning and adopting Flow, you are able to help your business beyond what a declarative Salesforce Admin would have been able to do before. This means you can bring value faster to your business, without the need for expensive developers.

Summary

Today, I have taken you through the basics of Salesforce Flows to answer what Flows are, the features, and how Flows can be called. Finally, I shared my thought on why Flows could become the ‘one tool to rule them all’.

As you can see, Salesforce Flow is a powerful tool that empowers admins to build complex business solutions, possibly the most powerful tool that a Salesforce Admin has at their disposal! The use cases for Flow are endless, and its capabilities are growing with every Salesforce release.

I can’t stress enough just how much learning Flow Designer (back in the day) changed how I viewed Salesforce. I learnt that I could build a functional business system without having to learn Apex, and I could quickly assist department heads to implement custom logic in a few hours. I would recommend learning Flows to absolutely any admin who uses Salesforce (and I do!). That said, with great power comes great responsibility! There are a number of best practices that need to be followed to ensure your Flows are future proof and scalable (something we’ll go through in another post!)