Fatskills
Practice. Master. Repeat.
Study Guide: TECH **Salesforce Flows: Zero-Fluff, Hands-On Study Guide**
Source: https://www.fatskills.com/salesforce-certification/chapter/tech-salesforce-flows-zero-fluff-hands-on-study-guide

TECH **Salesforce Flows: Zero-Fluff, Hands-On Study Guide**

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~9 min read

Salesforce Flows: Zero-Fluff, Hands-On Study Guide

(For Admins Who Need to Build, Debug, and Deploy Flows in Production)


1. What This Is & Why It Matters

What it is:
Flows are Salesforce’s low-code automation engine—think of them as "if-this-then-that" on steroids. They let you: - Replace Process Builder & Workflow Rules (which are being retired).
- Automate complex business logic without writing Apex.
- Build guided user experiences (Screen Flows) or background automations (Record-Triggered, Auto-launched).

Why it matters in production:
- Process Builder is dead. Salesforce is deprecating it, so if you’re not using Flows, your automations will break.
- Governor limits bite hard. A poorly built Flow can consume all your DML statements, SOQL queries, or CPU time, crashing your org.
- Debugging is a nightmare if you don’t design for it. A Flow that works in Sandbox might fail in Production due to data volume, permissions, or race conditions.
- Users expect seamless experiences. A clunky Screen Flow = frustrated employees = manual workarounds = dirty data.

Real-world scenario:
You inherit a Salesforce org where: - Opportunities auto-create a Contract when they reach "Closed Won" (but sometimes fail due to validation rules).
- Support Cases need a guided intake form (Screen Flow) that dynamically shows fields based on the Case Type.
- Accounts must auto-update a custom "Last Activity Date" field whenever a related Task is completed (but the current Process Builder is hitting CPU limits).

If you don’t master Flows, you’ll spend hours: ✅ Manually fixing broken automations.
✅ Writing Apex to replace simple logic (wasting dev time).
✅ Explaining to users why their data isn’t updating.


2. Core Concepts & Components


? Flow Types

Type Definition Production Insight
Screen Flow A guided UI for users (e.g., a multi-step form). ⚠️ Mobile performance matters. If it’s slow on mobile, users will abandon it. Test on real devices.
Record-Triggered Flow Runs when a record is created/updated/deleted (replaces Process Builder). ⚠️ Order of execution matters. If another automation updates the same record, you might create an infinite loop.
Auto-launched Flow Runs in the background (e.g., scheduled, called from Apex, or via REST API). ⚠️ No user context. If you need to check permissions, you must pass them in as variables.
Scheduled-Triggered Flow Runs at a set time (e.g., nightly data cleanup). ⚠️ Batch size limits apply. If you process > 2,000 records, you’ll hit governor limits.
Platform Event-Triggered Flow Runs when a Platform Event is published (e.g., IoT device data). ⚠️ Not for high-volume events. If you get 10,000 events/sec, use Apex instead.

? Key Flow Elements

Element Definition Production Insight
Start Defines when the Flow runs (e.g., "When a record is updated"). ⚠️ Entry conditions are critical. If you don’t set them, the Flow runs on every record change.
Decision Branches logic (e.g., "If Amount > $10K, send to manager"). ⚠️ Null checks are mandatory. If a field is empty, the Flow will fail.
Get Records Queries Salesforce data (like SOQL). ⚠️ Governor limits apply. If you query 50,000 records, the Flow will crash.
Loop Iterates over a collection (e.g., "For each Contact on an Account"). ⚠️ DML inside loops = death. Batch updates outside the loop.
Assignment Sets variable values (e.g., Account.Description = "VIP"). ⚠️ Type mismatches break Flows. If you assign a Text value to a Number field, it fails silently.
Action Calls an Apex class, sends an email, or invokes another Flow. ⚠️ Apex actions must be "invokable." If the class isn’t annotated with @InvocableMethod, it won’t appear.
Fault Path Handles errors (e.g., "If the update fails, send an email"). ⚠️ Most admins forget this. Without fault paths, errors go unnoticed.
Subflow Reuses a Flow inside another Flow. ⚠️ Versioning is tricky. If you update the subflow, all parent Flows break unless you use "Run Latest Version."


3. Step-by-Step Hands-On: Build a Record-Triggered Flow for Opportunity Contracts


? Goal:

When an Opportunity is marked "Closed Won", automatically: 1. Create a Contract record.
2. Set the Contract Start Date to today + 30 days.
3. Link the Contract to the Opportunity.
4. If the Opportunity Amount > $50K, send an email to the Sales Manager.

✅ Prerequisites:

  • A Sandbox (never build in Production!).
  • System Admin permissions.
  • A custom field on Opportunity (if needed, e.g., Contract_Start_Date__c).


?️ Step-by-Step Build

1. Create the Flow

  • Go to SetupFlowsNew Flow.
  • Select Record-Triggered Flow.
  • Click Create.

2. Configure the Trigger

  • Object: Opportunity
  • Trigger: A record is updated
  • Condition Requirements: All Conditions Are Met (AND)
  • StageName Equals Closed Won
  • IsWon Equals True
  • Optimize the Flow for: Actions and Related Records
  • Click Done.

3. Add a Decision Element

  • Drag a Decision element onto the canvas.
  • Label: Check Opportunity Amount
  • API Name: Check_Opportunity_Amount
  • Outcome: High_Value_Opportunity
  • Condition: Amount Greater Than 50000
  • Click Done.

4. Create the Contract Record

  • Drag a Create Records element onto the canvas.
  • Label: Create Contract
  • API Name: Create_Contract
  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: Contract
  • Set Field Values:
  • AccountId{!$Record.AccountId}
  • Opportunity__c{!$Record.Id}
  • StartDate{!$Flow.CurrentDate} + 30
  • StatusDraft
  • Click Done.

5. Send Email for High-Value Opportunities

  • From the High_Value_Opportunity outcome, drag an Action element.
  • Label: Send Email to Manager
  • API Name: Send_Email_to_Manager
  • Action Type: Send Email
  • Email Addresses: [email protected] (or use a custom metadata type for dynamic emails)
  • Subject: High-Value Opportunity Closed: {!$Record.Name}
  • Body:
    ``` A high-value Opportunity has been closed:
  • Opportunity: {!$Record.Name}
  • Amount: ${!$Record.Amount}
  • Close Date: {!$Record.CloseDate} ```
  • Click Done.

6. Add a Fault Path (Critical!)

  • From the Create Contract element, drag a Fault Path.
  • Add an ActionSend Email.
  • Label: Send Error Email
  • API Name: Send_Error_Email
  • Email Addresses: [email protected]
  • Subject: Flow Error: Contract Creation Failed
  • Body:
    The Contract creation Flow failed for Opportunity: {!$Record.Name} Error: {!$Flow.FaultMessage}
  • Click Done.

7. Save & Activate

  • Click Save.
  • Flow Label: Auto-Create Contract on Closed Won
  • API Name: Auto_Create_Contract_on_Closed_Won
  • Click Activate.


? How to Test

  1. Create a test Opportunity in Sandbox:
  2. Stage: Prospecting
  3. Amount: $60,000
  4. Update the Opportunity to Closed Won.
  5. Verify:
  6. A Contract is created.
  7. The Start Date is today + 30 days.
  8. The Sales Manager receives an email.
  9. Check Debug Logs:
  10. Go to SetupDebugLogs.
  11. Filter for your user and the Flow name.

4. ? Production-Ready Best Practices


? Security

  • Use Run As for Record-Triggered Flows. If the Flow updates records, set Run As to a system user (not the triggering user) to avoid permission issues.
  • Restrict Flow access. Use Profiles/Permission Sets to control who can run which Flows.
  • Never hardcode IDs. Use Custom Metadata Types or Custom Settings for dynamic values (e.g., email addresses).

? Cost Optimization

  • Avoid "Get Records" in loops. Query once, then loop over the collection.
  • Use "Fast Field Updates" for simple record updates (no DML).
  • Batch scheduled Flows. If processing > 2,000 records, use Batch Apex instead.

?️ Reliability & Maintainability

  • Name Flows clearly. Use a prefix like RTF_ (Record-Triggered Flow) or SF_ (Screen Flow).
  • Add descriptions. Future you (or your successor) will thank you.
  • Use subflows for reusable logic. Example: A Send_Email_Alert subflow used by multiple parent Flows.
  • Version control. Always clone a Flow before editing (never edit the active version).

? Observability

  • Log errors. Always add a Fault Path with an email or custom object log.
  • Monitor Flow limits. Check SetupFlowsFlow Limits to see usage.
  • Use debug logs. Filter for FLOW_START_INTERVIEW to see Flow execution details.


5. ⚠️ Common Mistakes & Traps

Mistake Symptom Fix/Prevention
No fault path Flow fails silently; users don’t know why records aren’t updating. Always add a Fault Path with an email or custom object log.
DML inside loops Flow hits governor limits (e.g., "Too many DML statements"). Use Fast Field Updates or batch DML outside the loop.
No entry conditions Flow runs on every record change, causing performance issues. Always set entry conditions (e.g., StageName = 'Closed Won').
Hardcoded IDs Flow breaks when deployed to Production (different org ID). Use Custom Metadata Types or Custom Settings for dynamic values.
No null checks Flow fails when a field is empty (e.g., AccountId is null). Add a Decision element to check for nulls before using a field.
Infinite loops Flow triggers itself (e.g., updates a record, which triggers the Flow again). Use $Flow.Interview.IsRecursive or add a custom checkbox to prevent recursion.


6. ? Exam/Certification Focus


? Typical Question Patterns

  1. "Which Flow type should you use for a guided user form?"
  2. Screen Flow (not Record-Triggered or Auto-launched).
  3. ❌ Trap: "Auto-launched Flow" (runs in the background, no UI).

  4. "How do you prevent a Record-Triggered Flow from running on every update?"

  5. Set entry conditions (e.g., StageName = 'Closed Won').
  6. ❌ Trap: "Use a Decision element" (this runs after the Flow starts, wasting resources).

  7. "What’s the best way to update 10,000 records nightly?"

  8. Scheduled-Triggered Flow + Batch Apex (Flows alone can’t handle > 2,000 records).
  9. ❌ Trap: "Use a Record-Triggered Flow" (will hit governor limits).

  10. "How do you debug a Flow that’s not running?"

  11. Check debug logs (filter for FLOW_START_INTERVIEW).
  12. Verify entry conditions (maybe the record doesn’t meet them).
  13. ❌ Trap: "Just reactivate the Flow" (won’t fix underlying issues).

⚠️ Key Trap Distinctions

Concept Trap Why It Matters
Record-Triggered vs. Scheduled-Triggered Scheduled Flows can’t run on record changes. If you pick the wrong type, the Flow won’t trigger.
Fast Field Updates vs. DML Fast updates don’t count against DML limits. Use them for simple field changes to avoid governor limits.
$Record vs. $Flow.CurrentRecord $Record is the triggering record; $Flow.CurrentRecord is the record being processed. Mixing them up causes wrong data updates.
Subflow "Run Latest Version" If disabled, parent Flows break when the subflow updates. Always enable this unless you have a very good reason not to.


7. ? Hands-On Challenge (With Solution)


? Challenge:

Build a Screen Flow that: 1. Asks the user for an Account Name.
2. If the Account exists, shows its Annual Revenue.
3. If it doesn’t exist, creates a new Account with the given name.

✅ Solution:

  1. Create a Screen Flow (not Record-Triggered).
  2. Add a Screen element with a Text input (Account_Name).
  3. Add a "Get Records" element to query Account where Name = {!Account_Name}.
  4. Add a Decision element:
  5. If Get_Account Is Null, go to Create Account.
  6. Else, go to Show Revenue.
  7. Create Account (if not found):
  8. Use a Create Records element.
  9. Set Name = {!Account_Name}.
  10. Show Revenue (if found):
  11. Use a Screen element with a Display Text component.
  12. Show {!Get_Account.AnnualRevenue}.

Why it works:
- The Get Records element checks if the Account exists.
- The Decision branches logic based on the query result.
- The Screen dynamically shows data based on user input.


8. ? Rapid-Reference Crib Sheet

Command/Concept Key Details
Flow Types Screen (UI), Record-Triggered (automation), Auto-launched (background), Scheduled (time-based).
Entry Conditions Always set them to avoid unnecessary runs.
$Record vs. $Flow.CurrentRecord $Record = triggering record; $Flow.CurrentRecord = record being processed.
Fault Path ⚠️ Always add one (or errors go unnoticed).
DML in Loops ⚠️ Never do this (use Fast Field Updates or batch outside the loop).
Debugging Filter logs for FLOW_START_INTERVIEW.
Subflow Versioning ⚠️ Enable "Run Latest Version" unless you have a specific reason not to.
Governor Limits 2,000 DML statements, 10,000 SOQL queries per transaction.
Fast Field Updates Doesn’t count against DML limits (use for simple field changes).
Null Checks ⚠️ Always check for nulls before using a field.
Recursion Prevention Use $Flow.Interview.IsRecursive or a custom checkbox.


9. ? Where to Go Next

  1. Salesforce Flow Documentation – Official guide.
  2. Flow Best Practices (Trailhead) – Hands-on exercises.
  3. Flow Debugging Guide – How to troubleshoot Flows.
  4. Flow Limits & Considerations – Governor limits and performance tips.

? Final Pro Tip:

Flows are the future of Salesforce automation. If you’re not comfortable building them, you’ll be left behind. Start small (e.g., replace a Workflow Rule with a Flow), then gradually tackle more complex logic. Debugging is 80% of the battle—master it early.



ADVERTISEMENT