Professional Documents
Culture Documents
Flow Cheatsheet
Salesforce Flows can be hard to master. This cheatsheet has all
the information you need to know before you can master flows
Salesforce flows can be invoked by a number of different events. Choose the correct flow type based
on the event that should invoke the flow.
Flow Type
Type Invoked when Runs In Use when Example
Screen Flow Launched by a user The user You need users to Guide users through
(via a button) interface follow a UI-based the steps required to
business process complete a booking on
behalf of a customer
Record-Triggered A record is created, The You need to automate Update the opportunity
Flow updated or deleted background something in response name whenever the
of a record being amount field is updated
modified by a user
Autolaunched Called by another The You want to reuse flow Create a flow that
Flow Flow, Apex, or the background logic in other areas of defines how a child
REST API your org opportunity is created.
Re-use this logic
across flows, apex, and
Workato (example of
REST API)
Platform Event– A platform event The Your org is already A platform event is
Triggered Flow message is background using platform events created when an
received and an event-driven opportunity is closed-
architecture, and you won. You want a flow to
want plug flows into the run in the background
mix that is going to email
the account manager.
www.salto.io info@salto.io
Record-triggered flows can execute logic on the record that triggered the flow or on related records.
Choose the correct record-triggered flow type based on what records should be modified.
Before save You need to When an • The flow can’t perform actions other than
update the opportunity updating the triggering record’s field values.
same record amount is • The flow can’t update values in records that are
that triggered updated, update related to the triggering record.
the flow the opportunity • Only these elements are supported:
name to reflect the Assignment, Decision, Get Records and Loop.
new amount.
After save You need to When an It can be used to update the same record that
update or opportunity is triggered the flow, but it’s not efficient and will
create other closed-won, consume governor limits.
records related update all the
to the record opportunity line
that triggered items and send
the flow an email to the
account manager.
Flow Elements
Name Use when Example
Assignment You need to assign values to a The flow creates a new opportunity. Use the
variable on the flow. It could be a Assignment element to define the values of the new
record variable or a user-defined opportunity (name, stage, amount, etc.)
variable
Decision You have multiple execution paths If the opportunity stage is Closed Won, execute X,Y
based on the conditions of the and Z actions.
record. Also known as “if/else” logic.
If the opportunity stage is Closed Lost, send an
email to the account manager.
Loop You have a collection of records and The flow has a list of opportunity line items. You want
you want to execute some action on to go through all of them, and for each, calculate
each individual record. the amount based on the currency selected on the
opportunity.
Collection Sort You have a collection of records and You want to sort a list of opportunities by their
you want to sort them based on their amount. After sorting, the opportunity with the
attributes. highest amount will be the first one on the list.
www.salto.io info@salto.io
Flow Elements
Name Use when Example
Collection Filter You have a collection of records You have a collection of all opportunities for a given
and you want to create another account. You want to create another collection that
collection that only includes certain only has those opportunities where the amount is
records from the original collection, greater than 100.
based on some conditions.
Create Records You want to create records when the You have a flow that fires when an opportunity is
flow is executed Closed-won. Use a “Create Records” element to
automatically create a new Contract record.
Update You want to update records when You have a flow that fires when an opportunity is
Records the flow is executed. It should not Closed-won. You want to now update the parent
be used to update the record that account to reflect the amount of the opportunity.
triggered the flow (you should use
before-save flows for that).
Get Records You want to query or get records that You have a flow that fires when an opportunity is
are somehow related to the record Closed-won.
that triggered the flow.
You use the “Get Records” element to get all the
opportunity line items related to the opportunity.
Delete Records You want to delete records when the You have a scheduled flow that runs every Friday
flow is executed night looking for duplicate records. Once the
duplicate records are found, you use a “Delete
Records” element to delete them.
Action You want the flow to execute an You have an apex class that has the logic to create
action that exists outside of the flow, an upsell opportunity. This logic must be reused
typically used to invoke apex code. across all areas of your org.
Subflow You have an existing flow that You have a flow that has the logic to create an
contains logic for a well-defined upsell opportunity.
action, you want to reuse this logic
in other flows rather than writing it all When an opportunity is Closed-won, you call this
over again. sub-flow, rather than creating the same logic all over
again.
It can also be used to simplify your
flows by breaking them down into
logic units.
www.salto.io info@salto.io
Resources are the building blocks of the logic in your flow.
Flow Resources
Type Use when Example
Variable You need to store a value that can You have a “Get Records” element that gets all the
be read and updated throughout opportunity line items of an opportunity.
the flow.
The records are stored in a collection variable of
Typically used to store the record type Record.
that triggered the flow, or a set of
related records.
Constant You need to store a value that can You create a constant to store the maximum
be read throughout the flow but opportunity amount that should trigger the creation
should not be changed once set. of an upsell opportunity.
Formula You need to calculate a value You create a formula that returns a “Yes” or “No”
based on the values of a record. value based on the opportunity amount.
Similar to a formula field.
Later in the flow, you can use this formula in a
The resulting value can then be “Decision” element to execute different paths of
used throughout the flow. logic.
Text Template You need to create text that can be You create a text template that organizes the
used later in the flow. opportunity details in a simplified format.
www.salto.io info@salto.io