Sub topic 1
Flow Builder in Brief
Flow Builder is the Salesforce tool for building flows, which are automations made with clicks instead of code. This chapter gives you the working model of the canvas, the building blocks, and the lifecycle of a flow. Later chapters cover each flow type in detail.
Prerequisites
This chapter assumes you know the following:
- The Salesforce data model: objects, fields, and records.
- How to move around the Setup menu.
- The basic idea of declarative automation, meaning automation built with clicks.
- Optionally, simple Apex. It is only needed for the code-based chapters later.
Opening Flow Builder
In Setup, type "Flows" in Quick Find and select Flows. Choose New Flow, then pick a starting point. The starting point you choose decides how the flow begins, and you can't change it freely afterward. The next chapter compares the options.
The Canvas and Its Parts
Flow Builder shows a canvas with a Start element at the top. You add elements below it and connect them with arrows called connectors. When the flow runs, it follows the connectors from one element to the next.
The toolbox on the left holds the building blocks. Flow Builder groups them like this:
| Group | Purpose | Examples |
|---|---|---|
| Resources | Store values that elements read and write | Variable, Collection, Formula, Constant |
| Data elements | Read and change Salesforce records | Get Records, Create Records, Update Records, Delete Records |
| Logic elements | Control the path | Decision, Assignment, Loop |
| Interaction elements | Talk to users or other automation | Screen, Action, Subflow |
Scheduled and autolaunched flows have no user on screen, so you will mostly use resources, data elements, and logic elements.
Elements, Resources, and the Run
An element is a step the flow performs. A resource is a named value the flow can use, such as a variable. Elements use resources by name. For example, an Assignment element can add one to a number variable, and a Decision element can test that variable.
Each time the flow runs, Salesforce creates an interview, which is one running instance of the flow with its own values. Two runs never share variable values.
From Draft to Running
A flow you save is not live until you activate it. Each save creates a version, and only one version can be active at a time. This gives you a safe loop:
- Build and save the flow.
- Debug it from Flow Builder.
- Activate it.
- Edit by saving a new version, leaving the active one untouched until you switch.
Common Early Mistakes
- Choosing the wrong starting point and then rebuilding the flow. Decide the trigger first.
- Skipping meaningful API names. Names such as
var1make flows hard to read and hard to call from code later. - Testing only with one record. Flows often run against many records, so test with more.
Exercise
You save a change to an active flow in Flow Builder. Is the change live for users? Why or why not?
Show answer
No. Saving creates a new version, and the previously active version keeps running until you activate the new one.