Salesforce Flow Builder – Complete Module - Textnotes

Salesforce Flow Builder – Complete Module


Flow Builder is Salesforce’s no-code automation tool that replaces Workflow Rules and Process Builder, used for automating complex business processes.

MENU (Flow Builder Topics)

  1. What is Flow Builder
  2. Types of Flows
  3. Flow Elements (Core Building Blocks)
  4. Record-Triggered Flows
  5. Scheduled Flows
  6. Screen Flows
  7. Subflows
  8. Flow Best Practices
  9. Flow Error Handling
  10. Flow Optimization & Limits
  11. Real-Time Automation Examples

1) What is Flow Builder

Title: Introduction to Flow Builder

Description:

Flow Builder is Salesforce’s no-code automation tool that replaces Workflow Rules and Process Builder, used for automating complex business processes.

Detailed Explanation:

  1. Flow Builder automates tasks such as record updates, emails, routing, approvals, calculations, screen interactions, etc.
  2. It works like a flow chart, with drag-and-drop elements.
  3. It is more powerful than Workflow and Process Builder because it supports:
  4. ✓ Loops
  5. ✓ Conditions
  6. ✓ Screen interactions
  7. ✓ CRUD operations
  8. ✓ Scheduled automation
  9. ✓ Apex-like functionality without coding

2) Types of Flows

Title: Flow Types

Description:

Salesforce provides different flow types for different automation needs.

Detailed Explanation with Examples:

Flow TypeWhat It DoesWhen to UseExample
Record-Triggered FlowRuns automatically when a record is created/updated/deletedAutomate business logic without user interactionAuto-update Account when Opportunity is closed
Scheduled FlowRuns at specified time intervalsTime-based automationSend renewal reminders every month
Screen FlowShows UI screens to usersGuided forms, wizardsEmployee onboarding form
Autolaunched FlowRuns in backgroundSubflows, integrationsReusable update logic
SubflowsA flow invoked from another flowModular automationCommon update logic called by multiple flows

3) Flow Elements (Building Blocks)

Title: Flow Components

Description:

Flow Builder contains three major components: Elements, Resources, and Connectors.

Detailed Explanation:

A) Elements (Actions you perform)

  1. Assignment → Assign values to variables
  2. Decision → If/Else logic
  3. Get Records → Query Salesforce data
  4. Update Records → Update existing records
  5. Create Records → Create new Salesforce records
  6. Delete Records → Delete records
  7. Loop → Iterate over lists
  8. Screen → Display UI
  9. Action → Email Alerts, Apex, Quick Actions

B) Resources (Data Holders)

  1. Variables
  2. Text templates
  3. Formula resources
  4. Record variables
  5. Collections

C) Connectors (Flow Arrows)

Decide which path the flow moves based on conditions.

4) Record-Triggered Flows (Most Used)

Title: Record-Triggered Automations

Description:

These flows trigger automatically when a record is created, updated, or deleted.

Detailed Explanation:

You can configure:

  1. Trigger When: Before Save / After Save
  2. Entry Condition: e.g., Amount > 50,000
  3. Optimize for Fast Field Updates (Before Save)
  4. Optimize for Actions & Related Records (After Save)

Examples:

Example 1: Auto-populate Account Rating when Opportunity Amount > 1,00,000

Trigger → After Update on Opportunity

Logic → If Amount > 100000 → Set Account Rating = “Hot”

Example 2: Auto-assign Case to Queue

Trigger → Before Insert on Case

Logic → If Case Type = Technical → Assign to “Tech Support Queue”

5) Scheduled Flows

Title: Time-Based Automations

Description:

Scheduled flows run automatically at a specific date/time without user input.

Detailed Explanation:

  1. Runs daily, weekly, or monthly
  2. Queries records that meet criteria
  3. Performs actions automatically

Example:

Send an email reminder 7 days before contract expiry.

6) Screen Flows

Title: User-Interactive Flows

Description:

Screen Flows create guided UI forms used inside:

  1. Lightning pages
  2. Quick Actions
  3. Community pages

Detailed Explanation:

  1. Displays fields, choice lists, picklists
  2. Can prefill data
  3. Can route users based on input

Example:

Employee Onboarding Wizard

Screen 1 → Personal details

Screen 2 → Department selection

Screen 3 → Equipment request

Screen 4 → Summary + Submit

7) Subflows

Title: Reusable Flow Components

Description:

Subflows allow one flow to call another flow.

Detailed Explanation:

Useful for:

  1. Common logic (ex: update contact preferences)
  2. Multiple teams using same logic
  3. Modular and cleaner automation

Example:

A Subflow that updates the Customer Score.

Used by:

  1. Opportunity flow
  2. Case flow
  3. Payment flow

8) Flow Best Practices

Title: Best Practices for Clean Automation

Description:

Guidelines to keep flows optimized and readable.

Detailed Points:

  1. Name elements clearly: e.g., Get_Account_By_ID
  2. Avoid unnecessary loops or nested loops
  3. Use subflows for repeated logic
  4. Use fault paths (error-handling)
  5. Avoid hardcoding IDs
  6. Use formulas instead of multiple assignments
  7. Test thoroughly before deployment

9) Flow Error Handling

Title: Error Handling in Flows

Description:

Flows must handle errors gracefully and log them.

Detailed Explanation:

  1. Use Fault Connectors for all Get/Create/Update elements
  2. Capture errors in:
  3. Custom object “Flow Errors”
  4. Email alerts to admins
  5. Use Try-Catch pattern (using Decision + Fault connector)

Example:

If flow fails to update an Account:

→ Create a “Flow Error Log” record

→ Send email to Admin

10) Flow Optimization & Limits

Title: Optimizing Flow Performance

Description:

Flows must follow Salesforce governor limits.

Detailed Explanation:

  1. Before Save flows are 10x faster
  2. Avoid multiple Get Records inside loops
  3. Use collections instead of updating one-by-one
  4. Combine updates/creates in single element
  5. Use scheduled paths instead of delays

11) Real-Time Examples (Very Useful)

Title: Real-World Flow Use Cases

Description:

Common practical flow scenarios used in interviews & projects.

Examples:

  1. Auto-update Parent Account when child Opportunities change
  2. Auto-create Task when Case Priority = High
  3. Send email alert when Lead Status = Converted
  4. Auto-fill Contact fields from Account
  5. Auto-assign Sales Rep based on territory
  6. Daily scheduled flow to identify inactive customers
  7. Screen flow for Lead qualification
  8. Subflow to update Last Activity Date