SlideShare a Scribd company logo
1 of 15
Download to read offline
Reuse your Flows
with Subflow
Salesforce Women in Tech Group - Columbia, MD, USA
https://katiekodes.com/subflow-witmd23/
What is Flow Builder?
Flow Builder is a point-and-click tool for building flowchart-based code-like logic
(“Flows”) that do useful things in Salesforce.
There are 3 main types:
1. Screen
2. Triggered
3. Autolaunched
#1: Screen Flows
● Run interactively.
● Run in response to human clicks & typing.
DEMO: Screen Flow
#2: Triggered Flows
● Run in the background.
● Background. Via schedule, data edits, “platform events.”Interactive.
● Run in response to:
○ Schedules, or
○ Data edits, or
○ “Platform events”
DEMO: (Record)-Triggered Flow
#3: Autolaunched Flows
● Run in the background.
● You don’t think about WHAT they’ll run in response to when you build them.
(Most commonly, though, they get run from…)
○ other Flows (then it’s a “subflow!” That’s all “subflow” means.)
○ Apex code
Why Subflow / Autolaunched Flow?
To design with “modularity” (small, specialized logic clumps):
“All cooking knives should live in a knife block, not mixed with the spoons.”
1. Tidiness / Readability
2. Maintenance / Reusability
○ Edit once, update everywhere
Extreme Subflowing: “Build every Flow first as autolaunched”
○ Counterpoint: “D.R.Y. premature optimization”
○ Counterpoint: (Fast Field Update record-triggered flows get tricky)
More “modularity” / reusability besides Subflow
● Fetching data (custom metadata, custom settings, or Salesforce object data)
● Packaging
○ (If you’ve ever installed something from the Unofficial Salesforce blog, that’s what they do)
DEMO: Subflow
Redesign 2 Flows into 3 Flows
(2 parent Flows both calling 1 shared child Subflow)
Recognizing Subflow (“modularity”) opportunities
1. Copying & pasting inside/between Flows
2. Save As from another Flow
3. If-Then-Else branching with nearly-identical branches
I ❤ paper & 25 colors of highlighter play.
● 👍 “DRY” Flows: “Don’t Repeat Yourself”
● 👎 “WET” Flows: “Write Everything Twice” 😂
Avoiding overthinking about “DRY:”
● 1 redundancy = life happens
● 2+ redundancies = time to Subflow
Advanced Subflow
More “Refactoring,” even better “Decoupling”
Advanced subflow: “services”
Not all Autolaunched Flows / Subflows are “services.”
(Not all tasty cakes are strawberry!)
Only the ones that make no assumptions about how they’ll be “called” are.
1. They never edit data.
2. They avoid “record”-typed input variables (stick to text / number / etc.)
○ (Except some Custom Metadata & other very-unique “config” record types can be OK)
3. They always have >= 1 output variable(s).
“Service” subflow benefits
1. Reuse an Autolaunched Flow in more kinds of Subflow + outside of Flow.
○ (A street-address helper should be reusable for Lead, Contact, Account, or no record at all.)
■ from a Screen Flow
■ from a Record-Triggered Flow
■ from an API-driven “find your sales rep” public website that doesn’t edit any data at all
2. Tidier testing. Separate out thinking about:
○ “Does it suggest a value correctly?” from
○ “Does it post the value to Chatter?” / “Is the value displayed beautifully in Screen Flow?”
Thanks!
Questions?
https://katiekodes.com/subflow-witmd23/

More Related Content

Similar to Women in Tech - Reuse your Flows with Subflow - May 2023

Creative Data Analysis with Python
Creative Data Analysis with PythonCreative Data Analysis with Python
Creative Data Analysis with Python
Grant Paton-Simpson
 
Making software
Making softwareMaking software
Making software
naeemullah530
 
Debugging Apache Spark
Debugging Apache SparkDebugging Apache Spark
Debugging Apache Spark
Joey Echeverria
 
Debugging Spark: Scala and Python - Super Happy Fun Times @ Data Day Texas 2018
Debugging Spark:  Scala and Python - Super Happy Fun Times @ Data Day Texas 2018Debugging Spark:  Scala and Python - Super Happy Fun Times @ Data Day Texas 2018
Debugging Spark: Scala and Python - Super Happy Fun Times @ Data Day Texas 2018
Holden Karau
 

Similar to Women in Tech - Reuse your Flows with Subflow - May 2023 (20)

E3 chap-16
E3 chap-16E3 chap-16
E3 chap-16
 
Creative Data Analysis with Python
Creative Data Analysis with PythonCreative Data Analysis with Python
Creative Data Analysis with Python
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developer
 
What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)What Your Tech Lead Thinks You Know (But Didn't Teach You)
What Your Tech Lead Thinks You Know (But Didn't Teach You)
 
Making software
Making softwareMaking software
Making software
 
Batch File Programming
Batch File ProgrammingBatch File Programming
Batch File Programming
 
Web development Hackathon
Web development HackathonWeb development Hackathon
Web development Hackathon
 
Hackers vs developers
Hackers vs developersHackers vs developers
Hackers vs developers
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdmins
 
JavaScript Best Pratices
JavaScript Best PraticesJavaScript Best Pratices
JavaScript Best Pratices
 
3stages Wdn08 V3
3stages Wdn08 V33stages Wdn08 V3
3stages Wdn08 V3
 
Clojure class
Clojure classClojure class
Clojure class
 
HCI 3e - Ch 16: Dialogue notations and design
HCI 3e - Ch 16:  Dialogue notations and designHCI 3e - Ch 16:  Dialogue notations and design
HCI 3e - Ch 16: Dialogue notations and design
 
Houston TechFest 2014 slidedeck
Houston TechFest 2014 slidedeckHouston TechFest 2014 slidedeck
Houston TechFest 2014 slidedeck
 
Onyx data processing the clojure way
Onyx   data processing  the clojure wayOnyx   data processing  the clojure way
Onyx data processing the clojure way
 
Debugging Apache Spark
Debugging Apache SparkDebugging Apache Spark
Debugging Apache Spark
 
Debugging Spark: Scala and Python - Super Happy Fun Times @ Data Day Texas 2018
Debugging Spark:  Scala and Python - Super Happy Fun Times @ Data Day Texas 2018Debugging Spark:  Scala and Python - Super Happy Fun Times @ Data Day Texas 2018
Debugging Spark: Scala and Python - Super Happy Fun Times @ Data Day Texas 2018
 
F# Eye for the C# Guy
F# Eye for the C# GuyF# Eye for the C# Guy
F# Eye for the C# Guy
 
Mastering python lesson2
Mastering python lesson2Mastering python lesson2
Mastering python lesson2
 

More from Alesia Dvorkina

More from Alesia Dvorkina (8)

Dreamforce '23 - Master the Art of Becoming a Salesforce Security Ninja
Dreamforce '23 - Master the Art of Becoming a Salesforce Security NinjaDreamforce '23 - Master the Art of Becoming a Salesforce Security Ninja
Dreamforce '23 - Master the Art of Becoming a Salesforce Security Ninja
 
Endless Use Cases with Salesforce Experience Cloud by Dar Veverka
Endless Use Cases with Salesforce Experience Cloud by Dar VeverkaEndless Use Cases with Salesforce Experience Cloud by Dar Veverka
Endless Use Cases with Salesforce Experience Cloud by Dar Veverka
 
Women in Tech - Slack and Integrations - February 2022
Women in Tech - Slack and Integrations - February 2022Women in Tech - Slack and Integrations - February 2022
Women in Tech - Slack and Integrations - February 2022
 
Women in Tech - Salesforce Certification Journey - April 2021
Women in Tech - Salesforce Certification Journey - April 2021Women in Tech - Salesforce Certification Journey - April 2021
Women in Tech - Salesforce Certification Journey - April 2021
 
Women in Tech - Salesforce Certification Journey by Della Leahy - April 2021
Women in Tech - Salesforce Certification Journey by Della Leahy - April 2021Women in Tech - Salesforce Certification Journey by Della Leahy - April 2021
Women in Tech - Salesforce Certification Journey by Della Leahy - April 2021
 
Women in Tech - Salesforce Debug Logs Deep Dive with Jess Lopez - March 2021
Women in Tech - Salesforce Debug Logs Deep Dive with Jess Lopez - March 2021Women in Tech - Salesforce Debug Logs Deep Dive with Jess Lopez - March 2021
Women in Tech - Salesforce Debug Logs Deep Dive with Jess Lopez - March 2021
 
Technology Trends 2019 - Women in Tech, Columbia, MD
Technology Trends 2019 - Women in Tech, Columbia, MDTechnology Trends 2019 - Women in Tech, Columbia, MD
Technology Trends 2019 - Women in Tech, Columbia, MD
 
Women in Tech, Columbia MD - Women at Work
Women in Tech, Columbia MD - Women at WorkWomen in Tech, Columbia MD - Women at Work
Women in Tech, Columbia MD - Women at Work
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Women in Tech - Reuse your Flows with Subflow - May 2023

  • 1. Reuse your Flows with Subflow Salesforce Women in Tech Group - Columbia, MD, USA https://katiekodes.com/subflow-witmd23/
  • 2. What is Flow Builder? Flow Builder is a point-and-click tool for building flowchart-based code-like logic (“Flows”) that do useful things in Salesforce. There are 3 main types: 1. Screen 2. Triggered 3. Autolaunched
  • 3. #1: Screen Flows ● Run interactively. ● Run in response to human clicks & typing.
  • 5. #2: Triggered Flows ● Run in the background. ● Background. Via schedule, data edits, “platform events.”Interactive. ● Run in response to: ○ Schedules, or ○ Data edits, or ○ “Platform events”
  • 7. #3: Autolaunched Flows ● Run in the background. ● You don’t think about WHAT they’ll run in response to when you build them. (Most commonly, though, they get run from…) ○ other Flows (then it’s a “subflow!” That’s all “subflow” means.) ○ Apex code
  • 8. Why Subflow / Autolaunched Flow? To design with “modularity” (small, specialized logic clumps): “All cooking knives should live in a knife block, not mixed with the spoons.” 1. Tidiness / Readability 2. Maintenance / Reusability ○ Edit once, update everywhere Extreme Subflowing: “Build every Flow first as autolaunched” ○ Counterpoint: “D.R.Y. premature optimization” ○ Counterpoint: (Fast Field Update record-triggered flows get tricky)
  • 9. More “modularity” / reusability besides Subflow ● Fetching data (custom metadata, custom settings, or Salesforce object data) ● Packaging ○ (If you’ve ever installed something from the Unofficial Salesforce blog, that’s what they do)
  • 10. DEMO: Subflow Redesign 2 Flows into 3 Flows (2 parent Flows both calling 1 shared child Subflow)
  • 11. Recognizing Subflow (“modularity”) opportunities 1. Copying & pasting inside/between Flows 2. Save As from another Flow 3. If-Then-Else branching with nearly-identical branches I ❤ paper & 25 colors of highlighter play. ● 👍 “DRY” Flows: “Don’t Repeat Yourself” ● 👎 “WET” Flows: “Write Everything Twice” 😂 Avoiding overthinking about “DRY:” ● 1 redundancy = life happens ● 2+ redundancies = time to Subflow
  • 12. Advanced Subflow More “Refactoring,” even better “Decoupling”
  • 13. Advanced subflow: “services” Not all Autolaunched Flows / Subflows are “services.” (Not all tasty cakes are strawberry!) Only the ones that make no assumptions about how they’ll be “called” are. 1. They never edit data. 2. They avoid “record”-typed input variables (stick to text / number / etc.) ○ (Except some Custom Metadata & other very-unique “config” record types can be OK) 3. They always have >= 1 output variable(s).
  • 14. “Service” subflow benefits 1. Reuse an Autolaunched Flow in more kinds of Subflow + outside of Flow. ○ (A street-address helper should be reusable for Lead, Contact, Account, or no record at all.) ■ from a Screen Flow ■ from a Record-Triggered Flow ■ from an API-driven “find your sales rep” public website that doesn’t edit any data at all 2. Tidier testing. Separate out thinking about: ○ “Does it suggest a value correctly?” from ○ “Does it post the value to Chatter?” / “Is the value displayed beautifully in Screen Flow?”