Flow Elements: Decisions, Assignments, and Loops
By the end of this lesson, you'll be able to:
- Use a Decision element to branch Flow logic
- Use an Assignment element to set variable and field values
Prerequisites: Flow Types: Screen, Record-Triggered, and Scheduled
Decision elements
A Decision element evaluates one or more conditions, in order, and routes the Flow down the matching outcome's path, with a Default Outcome path for when nothing matches — functionally an if/else-if/else chain, built visually.
Assignment and Loop elements
An Assignment element sets a variable's or a record field's value — add, subtract, and append operators are available, not just direct set. A Loop element iterates over a collection variable, running the elements inside it once per item — used, for example, to process every item in a list of related records fetched by a Get Records element.
A Decision condition and a running-total Assignment
Decision outcome condition (branches when Amount exceeds a threshold):
{!Var_Amount} > 50000
Assignment inside a loop (running total):
{!Var_Total} = {!Var_Total} + {!Loop_CurrentItem.Amount__c}
The Decision's condition and the Assignment's operation are both configured through Flow Builder's UI, not typed as code — this is just how those configured expressions read conceptually.
Exercise
Describe, step by step, the three Flow elements you'd combine to calculate the total Amount across a collection of related Opportunity records and store it in a variable.
Show hint
Think about what fetches the records, what repeats per record, and what accumulates the total.
Flow Elements: Decisions, Assignments, and Loops — Quick Check
My Notes
Log in to keep private notes on this lesson.
Questions about this lesson
No questions yet — be the first to ask.
Log in to ask a question about this lesson.
Summary
A Decision element branches the Flow down different paths based on conditions; an Assignment element sets the value of a variable or record field; a Loop element repeats a sequence of elements once per item in a collection — the three workhorse elements behind almost every Flow.