SlideShare a Scribd company logo
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

E3 chap-16
E3 chap-16E3 chap-16
E3 chap-16
Welly Dian Astika
 
Creative Data Analysis with Python
Creative Data Analysis with PythonCreative Data Analysis with Python
Creative Data Analysis with PythonGrant Paton-Simpson
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developer
Anton Kirillov
 
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)
Chris Riccomini
 
Making software
Making softwareMaking software
Making softwarenaeemullah530
 
Batch File Programming
Batch File ProgrammingBatch File Programming
Batch File Programming
Frz Khan
 
Web development Hackathon
Web development HackathonWeb development Hackathon
Web development Hackathon
Al Sayed Gamal
 
Hackers vs developers
Hackers vs developersHackers vs developers
Hackers vs developers
Soumyasanto Sen
 
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?
FromDual GmbH
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdmins
Puppet
 
JavaScript Best Pratices
JavaScript Best PraticesJavaScript Best Pratices
JavaScript Best Pratices
ChengHui Weng
 
3stages Wdn08 V3
3stages Wdn08 V33stages Wdn08 V3
3stages Wdn08 V3
Boris Mann
 
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
Alan Dix
 
Houston TechFest 2014 slidedeck
Houston TechFest 2014 slidedeckHouston TechFest 2014 slidedeck
Houston TechFest 2014 slidedeck
Matt Keas
 
Onyx data processing the clojure way
Onyx   data processing  the clojure wayOnyx   data processing  the clojure way
Onyx data processing the clojure way
Bahadir Cambel
 
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
 
Debugging Apache Spark
Debugging Apache SparkDebugging Apache Spark
Debugging Apache Spark
Joey Echeverria
 
F# Eye for the C# Guy
F# Eye for the C# GuyF# Eye for the C# Guy
F# Eye for the C# Guy
gueste3f83d
 
Mastering python lesson2
Mastering python lesson2Mastering python lesson2
Mastering python lesson2
Ruth Marvin
 

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 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
 
Debugging Apache Spark
Debugging Apache SparkDebugging Apache Spark
Debugging Apache Spark
 
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

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
Alesia Dvorkina
 
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
Alesia Dvorkina
 
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
Alesia Dvorkina
 
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
Alesia Dvorkina
 
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
Alesia Dvorkina
 
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
Alesia Dvorkina
 
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
Alesia Dvorkina
 
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
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

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

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?”