In this session, we'll help you get comfortable with the terminology and concepts of Flow and the Flow Builder tool. Not only will you learn a lot about Flow, but we'll also work together with hands-on through several scenarios using flow to really help you grasp those concepts. Come prepared with a fresh Trailhead Playground or Dev Org and get acquainted with Flow!
2. Michelle Hansen
Senior Salesforce Administrator, NISC
-13x Certified
-Co-Leader, Cedar Rapids, IA User Group
-Trailhead Mentor
-Lightning Champion
-Trailhead 2x Ranger
-Presenter: Dreamforce ’18 & ‘19, TDX ’19, NED 2018 & 2019, MWD
2019, Florida Dreamin’ 2019, Automation Hour & more
Social Media
Twitter: @mehansen82
Trailhead: https://trailblazer.me/id/michellehansen
LinkedIn: https://www.linkedin.com/in/michelleelizabethhansen/
3. GETTING TO FLOW YOU – VITAL STATISTICS
• Works with Lightning and Classic* *some components require Lightning runtime
• Favorite Color: Salesforce Blue
• Includes many different types: Screen, autolaunched, record/scheduled triggered, etc.
• Favorite First Date: Whiteboarding business & automation processes
• Can retrieve, display, create, update and delete records
• Favorite Mascot: Codey
• Can send emails, notifications, and access quick & local actions
• Life Goal: To be your one and only Automation Tool
• Can access other flows (not all types have this capability)
• Fun Fact: Processes are really Flows under the hood!
4. GETTING TO FLOW YOU – VOCABULARY
• Flow/Lightning Flow – An automation tool in Salesforce
• Flow Builder – The User Interface in Salesforce used to build a flow
• Flow Interview – A single instance of a flow being run
• Element – An item from the toolbox that is placed on the canvas which does
some sort of action
• Resource – An item from the toolbox that holds data and is used by one or
more elements on the canvas
• Iteration – One “trip” through a loop within a flow
• Outcome – A branched path based on criteria within a Decision Element
• Fault – An error within a flow
7. • Screen – A screen where the user interacts with your flow by
viewing, adding, or editing information.
• Input fields – Text, number, date, checkbox, radio button, picklist, etc
• Display text
• Other components
• Action – Access a quick or standard action in your org
• Send an email
• Log a call
• Custom Actions
• Subflow – Call another flow from within this flow
• Autolaunched from Autolaunched Flow
• Screen or Autolaunched from Screen Flow
GETTING AROUND FLOW BUILDER – TOOLBAR ELEMENTS
8. This is simply manipulating data within your flow—Consider this a
sandbox within your org – you can’t hurt the org using these
• Assignment – How you set the value of a variable
• Set a record field value to the value of a field from a flow screen
• Set the record count in a collection vs. looping & incrementing a counter
• Decision – Ability to branch your flow down different paths based on
criteria
• Can have multiple outcomes for a decision & multiple decisions in a flow
• Good for doing a null check on records before you proceed
• Decisions are OKAY in loops
• Loop – Used to go through a group of records (a collection variable)
• Loop through all Contact records for an account and update the
address
• NEVER put a Data (pink) element inside of a loop!
GETTING AROUND FLOW BUILDER – TOOLBAR ELEMENTS
9. GETTING AROUND FLOW BUILDER – TOOLBAR ELEMENTS
Data Elements interact with your Salesforce Database – THIS IS REAL
• Create – Creates a new record or group of records in the database
• Update – Updates a record or group of existing records in the
database
• Get – Retrieves a record or group of records from the database for
use within your flow
• Delete – Deletes a record or group of records from the database
10. • Variable – a container to hold information that can change
• Constant – a container to hold information that doesn’t change
• Formula – a way to manipulate information
• Text Template – stores text information that can be manipulated in
the flow
GETTING AROUND FLOW BUILDER – RESOURCES
11. GETTING AROUND FLOW BUILDER – RESOURCES
• Choice – a defined option for a user to select on a screen
• Record Choice Set – a set of records that a user can pick from on a
screen
• Picklist Choice Set – uses an existing picklist field’s values for the user
to pick from on a screen
• Stage –sets stages within your flow, similar to Oppty stage
12. GETTING TO FLOW YOU – NAMING CONVENTIONS
• Decide on naming conventions for your resources (API names)
• camelCase is the standard for naming variables/resources in code
• lowercase first letter, Capitalize first letter of every new word
• Include a type of resource abbreviation for easy reference
• Examples:
• Variable: var_AccountName
• Formula: fml_totalCostPerMonth
• Choice: c_Yes / c_product_Training
• Collection Variable: cvar_Accts_in_Iowa
• Picklist Choice Set: pcs_Account_TypeField
13. GETTING AROUND FLOW BUILDER – RESERVED VARIABLES
recordId
• This variable is reserved by Salesforce for a specific purpose
• This passes the Id of the record from which the flow was launched into the flow
to give the flow interview context
• sYNtaX MATTerS – lowercase ‘r’ and uppercase ‘I’ are required
$Record
• This is a global variable that is used to hold each record that a scheduled flow
will interact with
• Scheduled flows will ALWAYS run a separate ‘interview’ of a flow for each
record that meets the entry criteria. This is the only time where bulkification on
record updates is not needed*
14. GETTING TO FLOW YOU – LOOPS 3
Records
1st Record Edit the Record Save Record
2nd Record Edit the Record Save Record
3rd Record Edit the Record Save Record
Iteration 0
Iteration 1
Iteration 2
15. GETTING TO FLOW YOU – BULKIFY
YOUR FLOW
Update
2nd Record Set
1st Record Edit the Record
Iteration 0
3
Records
2nd Record Set
1st Record Edit the Record
Iteration 1
2nd Record Set
1st Record Edit the Record
Iteration 2
16. TIME TO GET HANDS ON!
*Note: These scenarios are designed to showcase concepts. They are NOT best practices
and often not legitimate real-world scenarios that should be solved exactly as shown
17. TIME TO GET HANDS ON! FLOW SCENARIO #1
• User adoption has been problematic. The primary complaint is that it’s
too many steps to create an Account and Contact.
• We’ll create a screen flow that allows us to capture basic Account
and Contact data on a single screen.
18. TIME TO GET HANDS ON! FLOW SCENARIO #2
• Our Sales Managers routinely use the same Opportunity name across
different companies, causing confusion when searching for them
later.
• We want to use a Before Save flow to automatically append the
Account Number to the Opportunity name entered by the user
19. TIME TO GET HANDS ON! FLOW SCENARIO #3
• When the address for an Account is updated, every
Contact’s address should be updated to match
• This should happen automatically when the Account record
is saved
20. RESOURCES
• Trailhead – Get Started with Flows
• https://admin.salesforce.com/blog/2019/getting-started-with-the-new-flow-builder
• AppExchange – Flow Templates & Screen components
• UnofficialSF.com Blogs, Components, Local actions – www.unofficialsf.com
• Automation Hour - www.automationhour.com
• Jen Lee’s blog - www.jenwlee.com
• Rakesh Gupta’s blog - www.automationchampion.com
• David Litton’s blog - www.salesforcesidekick.com
• The Wizard News podcast/blog (Brian Kwong) - https://thewizardnews.com/
• Metillium Consulting blog (Luke Freeland) - https://metillium.com/blog/
• https://captechconsulting.com/blogs/9-tips-for-using-salesforces-lightning-flow-the-
right-way
• Terry’s Tidbits Let’s Get Flowing Series:
https://www.youtube.com/playlist?list=PLPXY38WvYAn6LX6Bl91ey_eLwY-_OYhPO
21. QUIZ TIME!
• What is the name of the site where you can download extra screen
components and actions for flow?
• If I need to combine two text strings together, what resource would I use?
• Under what Setup menu heading is Flows located?
• What is one thing Flows can do that Processes cannot do?