Salesforce Flow – now the hottest out-of-the-box tool available – caters for anyone administering a Salesforce instance, from complete beginners to experienced architects.
There are multiple types of flow, and the sky’s the limit when it comes to choosing how simple or extremely complex they can be. We will begin with Flow basics, before focusing specifically on how you can get started using Salesforce Screen Flows.
What Is a Flow in Salesforce?
Before jumping into screen flows, let’s talk about Salesforce Flow in general. Simply put, flows are the new best friend you didn’t know you needed. Since Salesforce recently announced that Workflow and Process Builder are being retired in favor of Flow, the demand (as well as curiosity) around this functionality has seen a drastic increase in the ecosystem.
Salesforce Flow is an automation tool that can support most required business processes. It offers far greater capabilities and improved performance when compared to WorkFlow Rules or Process Builder. For example, flows can run before save (similar to Apex), which improves performance. There are quite a few types of Flow, which you can see highlighted below. Salesforce have done a great job of including a short explanation for each type (directly in the Flow Builder) to help you make the right choice before starting the build. You can also find more information about each type in the official documentation.
It’s important to note that, while you can opt to start from scratch, existing flows can be marked as templates for further development. Salesforce also provides some out-of-the-box templates for standard processes such as user provisioning. There are also many more free templates to try out on AppExchange.
What Is a Salesforce Screen Flow?
Screen flows provide a way to guide users through a business process; they provide instructions or call scripts, prompt users to complete certain fields, and then perform actions behind the scenes such as Record Create or Record Update. Your users will move through a series of screens that you have created – all without you having to write a single line of code.
When I first heard about Salesforce Screen Flows, the functionality did seem very interesting. However, I never expected it to be so user friendly, especially when creating from scratch without being an experienced developer. Salesforce proved me wrong!
Layout and Features
The key element that differentiates this type of flow from all others is the Screen Element. This is what we will configure and what users will see.
As previously mentioned, a single Salesforce Screen Flow can have multiple screens. These displayed screens will sit on your Flow canvas alongside your other elements. You can find out more about each flow element here.
On the screen flow, the components panel on the left represents the items available to be displayed within the screen element itself. This is where you will find standard components such as picklist and text, as well as custom components that have either been developed internally or come from managed packages.
Here are a few examples of useful components:
- Email: This component is very handy when an email address is needed from the user running the screen flow.
- File Upload: Exactly as the name says, this will allow your users to import files directly through the screen flow. This is especially handy as users won’t have to navigate to other pages to add files.
- Toggle: A personal favorite of mine, this component is fun for the user experience within a screen flow as it can replace a checkbox or a yes/no picklist.
We will not be using the Fields section during this post. However, you should definitely explore this further, as it allows the adding of fields directly from an object within the screen flow with some of the attributes already configured. This saves quite a bit of time, especially if you are adding a large quantity of fields. On top of this, as you will see in the image below, it reminds you about the required fields that should be completed for the record. You can find more information about this beta feature here.
Where Can a Screen Flow Be Used?
I’d say everywhere! If the process can be broken down into steps that require user input (or acknowledgement) and it should be displayed for users based on record criteria or on previous choices in the flow, then a screen flow is appropriate.
A Salesforce Screen Flow can be beneficial to many different types of users and teams. There are plenty of use cases for screen flows which can be accessed in different ways in Salesforce, including Lightning Record Pages, custom actions and buttons, or even a utility bar.
One of the most common examples is using a screen flow to collect data in order to create a record.
How to Create a Salesforce Screen Flow
Now that we have covered the basics of a screen flow, it’s time to get hands on! We’ll go through a step-by-step tutorial on how to create a screen flow, how to expose it to your users and, of course, how to make sure your flow works as expected.
Create the Flow
For this example, I have chosen to create a flow that will allow users to create a Contact.
Keep in mind that while I have only used a few fields, multiple fields and screens can be added to support your use case. Don’t forget to account for any existing validation rules!
Here’s an interactive tutorial
** Best experienced in Full Screen (click the icon in the top right corner before you begin) **
Make the Flow Available in the Interface
As mentioned above, the flow can be accessed in a few different ways – we will explore one of them, but feel free to try any other option that suits your use case best.
We will add the flow we just created to the Lightning Home Page within the Sales Lightning App. For the sales team in particular, it is important to make this process as seamless and accessible as possible (with the least number of clicks).
Here’s an interactive tutorial
** Best experienced in Full Screen (click the icon in the top right corner before you begin) **
Test Your Screen Flow
Once the flow is ready, it should be thoroughly tested prior to reaching your user base in production. The easiest way to test the screen flow is to use it in the interface in a Sandbox and see if it works as expected.
Considering the flow complexity, testing in a developer sandbox might be sufficient for a simple automation. But if a flow has broader impact, either on the existing implementation or on the user experience, testing should be completed A-Z including the UAT – as well as any integration testing, if needed.
You should definitely use the Debug button which appears when the flow is opened within Flow Builder. The screen behavior will be the same as the interface (including the required fields), but it will give exact information as far as the values for each component are concerned, and any errors if they occur.
Note: If any errors appear while the flow is live in production (and even in the Sandbox when used from the interface), you will receive an email with details for you to troubleshoot.
Don’t forget that Trailhead is also a great resource to learn. This trail not only includes information about Salesforce Flow, but also really fun hands-on challenges and even a module on testing.
Note: Testing should be done for any flow or automation, not just for screen flows!
Key Considerations
- Salesforce Screen Flows always require some sort of user interaction. If you’d like a fully automated flow, consider one of the other flow types such as “record-triggered” or “scheduled” flows.
- There is no actual limit as to how many screen flows you can have, but keep in mind that having multiple components will increase the load time.
- Screen flows can be accessed in many ways. They can be embedded into a Lightning Record Page, custom actions, custom Lightning Web components, Visualforce pages, and more.
- You can choose when and if a screen is actually displayed to the user running the flow by leveraging the conditional visibility.
Summary
Now that you have built your first Salesforce screen flow and are familiar with Flow basics, it’s time to get hands on and continue your journey. Be sure to keep practicing in a developer org and check out our other Flow articles to keep building your skills!
Here are a few suggestions to get you started:
- The Complete Guide to Salesforce Flow in 2022
- A-Z Guide to the Salesforce Flow Builder
- How Many Flows Should You Have Per Object?
If you want a complete guide to learning Flow, check out the Ultimate Salesforce Flow Foundation Course. This course covers everything you need to know to be successful at building Flows. The course includes written guides and instructor-led videos, plus step-by-step tutorials for creating both a screen flow and a record-triggered flow!
Register your interest for 25% off.
You may also be interested in FlowFest – the world’s first live Flow competition, combining learning, fun, and just a little competitive spirit from the contenders! Watch FlowFest V2 here.