Salesforce Flow is an innovative, intuitive automation tool. It can help Salesforce users quickly and easily automate business processes, like updating a record and then sending an email to the customer. It brings together Lightning Web Components and Apex to provide users a low-code way to build automated workflows in Salesforce. A key benefit of Salesforce Flow is that it can help you easily maintain and enhance your workflows.
Salesforce Terminology
Here are a few terms to know before diving into the video guide.
Salesforce Flow: A blanket term for Salesforce components that can help you create, manage, and run automation with clicks, not code.
Flow: An automation configuration saved in Salesforce with the structure of a flowchart. A flow can automate a business process by collecting data and using that data to create an action. A flow can make something happen in your Salesforce org as well as in integrated external systems, like an ERP or customer service platform.
Flow Builder: The tool you use when you build flows in Salesforce.
In this video, we’ll provide a high-level overview of flows and how they can work. You can explore:
- What flows are and how they can transform your Salesforce experience
- Different types of flows for diverse automation needs
- Step-by-step walk-throughs of building both screen flows and record-triggered flows
- Key features and functionalities to unlock more automation
- Best practices for building efficient and effective flows
- Practical examples demonstrating how flows can automate real-world tasks, including updating records based on user input, sending automatic emails, and assigning cases to the right queue.
Click play to get started!
Salesforce Flow Video Transcript
0:09
Today we’re going to cover Salesforce Flow. We’re going to explore different types of flows and what they can do. Let’s start with a basic overview of Salesforce flows.
0:21
They’re simply a way for you to create automations with business processes in Salesforce using clicks instead of code. It’s a great way for you to create automations without involving a developer and getting into creating and writing code. It can be a simple yet very powerful way for you to create these kinds of automations.
0:44
So, to create a flow within Salesforce, start out in Setup, and very simply go into the Quick Find box and type in “flows.” You also can find it by going underneath the Process Automation section.
0:57
From here we can see Salesforce does come with quite a few out-of-the-box flows. These are set up as templates, as you can see by the column indicating it here. These are just meant as starting points. You can use them to base a flow off of or see some examples. To set up your own flow, you can go up into the top right here and click “New Flow.” From here we can see the different types of flows there are. [Different types of Salesforce flows include Screen Flow, Record-Triggered Flow, Schedule-Triggered Flow, Platform Event—Triggered Flow, Autolaunched Flow (No Trigger), and Record-Triggered Orchestration.]
1:20
To go through these quickly, the Screen Flow, this is the one flow that’s going to provide you with user interaction. With this flow you can set up screens that pop up and request input from the user or allow them to make decisions that then control the rest of the flow.
1:36
Record-Triggered Flow: These are going to be triggered when a record is either created, updated, or deleted, and this flow will run on the back end. There will be no user interaction, these are just automations that run whenever records are modified.
1:52
Schedule-Triggered Flow: These also run on the back end, but instead of being triggered when a record is modified, this one is simply triggered based on a schedule. This one can run either daily, weekly, or monthly, and based on the entry criteria that you set for which records it runs for, it’ll run for a batch of records—whatever meets the criteria. So, this one runs for multiple records versus the Record-Triggered Flow, that’s going to run for the single record that’s updated.
2:21
Platform Event—Triggered Flow: These are less commonly used, but they allow you to connect outside systems outside of Salesforce and use that as a way to trigger when these automations run.
2:32
Autolaunched Flow: These don’t actually have a trigger at all. These flows are going to be invoked by either other flows or by Apex code that you’ve written or the REST API. These need something else to trigger them, and these are a great way to try to break up very complex flows. If you have a flow that’s getting really large and confusing, you can use an Autolaunched Flow as kind of like a subflow to try to help organize them and make it a little bit easier to digest.
3:06
Then, Record-Triggered Orchestration is a newer feature that Salesforce has come out with recently that basically allows you to create a more complex flow that kind of goes through a multistep, multiuser process.
3:19
Today we’re going to be focusing on the Screen Flow and the Record-Triggered Flow.
3:23
We have a couple demos set up already. We’re going to come out here and open up this flow called, “Update Related Contact Addresses.” Here’s the basic layout of the Flow Builder. We can see up at the top, we have a toolbar, and if you click the top left button here, it’s a little sidebar, it opens up the toolbox. With a Screen Flow we have a manager that shows you all your different resources.
3:50
Some things in the flow are going to look a little bit different based on what type of flow you’re building. Some of the resources and elements that you have available to you are going to be different.
3:59
But within the Screen Flow we have resources here and these get automatically created as you’re creating elements or you can create them manually from over here to start. We’ve got things like Choices, Record Variables, Record Collections. But to really go out and build the flow, you’ll be going out here and clicking on these “+” buttons that you see depending on where you want to put elements.
4:23
An element is kind of an action that’s happening within the flow and resources are variables that are used within those actions to pass information around. We can see if you click the “+” here at the top, you’ll get an option to add an element and from here we can see some of the different interaction items that we have.
4:42
So, we can add a Screen, Action, or Subflow. The Logic choices that we have here include Assignment, as a way to assign variables within the flow; Decision, you’re going to be basing this off criterion. You can go down different paths, do different things in the flow based on different criteria. Loops are used in combination with collections. If you have a collection of records, say a collection of contact records, you can use a Loop to go through each one of those contact records to perform an action.
5:14
Transform is a newer feature. It’s still in beta, but it’s a way for you to transform data. It allows you to transform your source data into a new target data set that uses new formats, structures, or values.
5:25
Then we have a couple of collection elements down here that allow you to Sort and Filter your collections. The data elements down here allow you to interact with your database so we can either create, update, get, or delete records. You also have the option to rollback changes that were made within the flow if you need to.
5:46
Running through this basic flow here, what this flow is doing is providing a screen to allow you to take one of the address fields from the account and update all the related contacts under that account to have a matching address. We have a screen that’ll pop up to ask you which address you want to use for that. It can either be the billing address or the shipping address.
6:05
Stepping through this really quickly, we’re getting the Account and with a Screen Flow that’s launched from the record page. The way to get that account record is you’ll first need to create a record ID variable, which we see here. It’s simply a text variable and it just has to match the record ID name here.
6:26
I'm not going to go into too much detail on this, but quite simply that’s how you pass in that record ID from the record page. Then you can go out and get that account, and then we’re getting all the related contacts to that account.
6:39
Then the screen element here is providing you with the different addresses and asking you to choose which one you want to use. The decision is using that choice that you made to determine which address you’re going to assign and then we’re looping through all the contacts and updating that final collection.
6:57
That’s a very high-level overview of what a Screen Flow looks like.
7:02
We also have an example of a Record-Triggered Flow to see some of the differences that you’ll have between them.
7:11
A lot of the elements and resources are shared among all the different types of flows. You’ll see a lot of the same things such as get record, decisions, collections, and all the variables. But with the Record-Triggered Flow, for example, we have a few other options up here at the top like we didn’t have with the Screen Flow.
7:27
We can go into here and click “Edit,” and with the Record-Triggered Flow we have the option to choose what object we want this to run for. We can set the trigger criteria to say if it’s created, updated, created or updated, or deleted. Entry conditions can say only run this flow for records that meet these conditions. And there’s a lot of different ways you can set these up using different types of logic. Finally, we have a way to “optimize the flow.” This simply says whether the flow is going to run before a record is saved or after the record is saved.
8:00
As an overview, what this flow is doing is we have the set up to only run whenever a case object or a case record is created. It’s going to take that record and check what its priority level is, and based on that, it’s going to go out and find a queue.
8:20
We have a queue set up for high priority, medium priority, and low priority. The flow will get that queue and then it’ll update the case so that it’s now assigned to that queue.
8:31
Once you have the flow built, there are a few other options here at the top right. You can run it manually, you can debug it, you can set up tests. If there’s a more complex scenario that you need to set up for testing, you can set that up so that you can retest it over and over again. Then we have options to deactivate, activate, save it, or save it as a new flow, or “Save As” with a new name.
8:57
Debug is going to be one of the more common ones you’re using up here. This is a way to test it. It’ll show you what steps have been taken based on what record you’re passing in, and it’s a good way to troubleshoot any issues you might be having with the flow.
9:10
Then, just to kind of show one of these in action, we’ll go back to the original Screen Flow, the “Update Related Contact Addresses.” I’m not going to go into detail on exactly how all of this is set up, but you can take a Screen Flow and you can create a button out of it and place that button on the [Flow Builder] page.
9:29
So, we’ll come out to one of the accounts out here, “Pyramid Construction, Inc.,” as an example. We can see I have a button down here created called, “Update Contact Addresses.”
9:44
What we’ll do is, we’ll take the billing address from this account, and we can find one of the contacts. Open that in the new tab. We can see the mailing address does not match. So, we’ll come back to the account, and say we had more than one contact, this would work for all of them. Just to see what the Screen Flow looks like, come out here and click the button, and it pops up showing us both of our addresses and it’s asking us which one we’d like to use.
10:14
We have it defaulted to billing, but you can switch it to shipping if you’d like. We’ll leave that billing. The way this flow is set up, just as an example, it will always update the contact mailing address. So, we’ll just do this and simply click “Next.”
10:27
Now, if we come back out to that contact and refresh the page, we can see that the mailing address has been updated to match that of the account.
10:37
That’s a very basic overview of flows and a couple of examples in Salesforce. I hope you found this video useful, and thank you!
How Forvis Mazars Can Help
If you have questions about Salesforce Flow or would like assistance setting up flows, please connect with us. The Business Technology Solutions team at Forvis Mazars is a Salesforce partner with certified experience. Learn more about our Salesforce services or request a personalized demo.