Meet Flow Builder
After completing this unit, you’ll be able to:
- Describe the building blocks of a flow.
- List the categories of flow elements.
The Flow Builder User Interface
When you build flows, you work from Flow Builder. Here are its parts and pieces.
- Toolbox (1)
- The toolbox contains the elements and resources you use to build your flow.
- From the Elements tab, add new elements, like Screen and Create Records, to your flow.
- From the Manager tab, create resources, such as variables, stages, and choices, to use in your flow. Or view a list of all elements and resources that you’ve added to the flow.
- Canvas (2)
- The canvas is the working area, where you build a flow by adding elements. As you add elements to the canvas and connect them together, you see a visual diagram of your flow.
- Button Bar (3)
- The button bar provides information about the flow, such as:
- Whether the flow is active or not.
- How long ago the flow was saved.
- Whether the flow has any warnings or errors. To see warnings or errors, click the respective icon.
- Run runs the most recent saved version of the flow that you have open.
- Debug lets you enter values for the flow’s input variables and display debug details while running the flow. That way, you can verify how the flow processes data.
Flow Building Blocks
Every flow is made up of three building blocks: elements, connectors, and resources.
- Elements (1) appear on the canvas. To add an element to the canvas, click and drag it there from the toolbox.
- Connectors (2) define the path that the flow takes at runtime. They tell the flow which element to execute next. Click and drag connectors from one element on the canvas to another.
- Resources (3) are containers that represent a given value, such as field values or formulas. You can reference resources throughout your flow. For example, look up an account’s ID, store that ID in a variable, and later reference that ID to update the account.
Each element is a step in the flow that instructs the flow on what to do. Those instructions vary based on which kind of element it is. We like to think of flow elements in terms of three different buckets: screens, logic, and actions.
Display data to your users or build a form to collect information from them with Screen elements.
Screens includes a treasure trove of out-of-the-box components that let you customize how users interact with your flows. Display text or images to your users. Request free-form responses, such as with a text box, or ask users to select from provided choices, such as with radio buttons. You can even have the user upload a file through the screen.
If you need more from your flow screens, like custom navigation or a data table, install third-party components or work with a developer to build custom ones.
Once you collect the data you need, what do you want to do with it? With logic elements, evaluate that data and manipulate it according to your business requirements. Create branches, update data, loop over sets of data, or pause until a specified time.
Logic operates only in the flow. If you use logic elements to evaluate or manipulate information in your flow, the resulting data can’t be accessed after the flow finishes. Use an action to store that data somewhere outside of the flow.
Actions instruct the flow to do something outside of itself, such as in the Salesforce database or in an external system. Flows can look up, create, update, and delete Salesforce records. They can also create Chatter posts, submit records for approval, and send emails.
Connectors define the path that the flow takes as it runs. They tell the flow which element to execute next.
Resources are placeholders that you reference throughout your flow. For example, look up an account’s ID, store that ID in a variable, and later reference that ID to update the account.
Plan Out the Flow
Now that we’ve learned a bit about the types of elements that flow offers, let’s think back to the request. It’s tempting to jump right into Flow Builder, but first map those requirements into a plan.
|Requirement||Element Type to Use|
|Collect information from user: first name, last name, and account for contact, as well as what to do if a matching contact exists.||Screen|
|Find a matching contact record.||Action|
|Check if a matching record was found.||Logic|
|If no match exists, create the contact.||Action|
|If a match exists, update that contact.||Action|
|For both branches, confirm what the flow did in Chatter.||Action|
|For both branches, confirm that the flow is done.||Screen|
To build a flow that addresses these requirements, complete the remaining projects and modules in the Build Flows with Flow Builder trail. The Build a Simple Flow project guides you through building most parts of the flow, and we use the project as a basis to dig deeper on flow concepts in the Flow Builder module.