Concept 1 of 7Lightning Flow

Flow types and when to use each

Screen flows, record-triggered flows (before-save, after-save, scheduled and asynchronous paths), schedule-triggered, autolaunched, platform-event-triggered flows and orchestrations.

Your confidence:Not rated

Simple explanation

Flow typeStarts whenTypical use
Screen flowA user launches it (button, action, page, utility bar, Experience site)Guided processes, wizards, data capture with validation
Record-triggered: before-saveA record is created or updated, before it's savedFast same-record field updates (no extra DML)
Record-triggered: after-saveAfter the record is savedRelated records, actions, notifications
↳ Scheduled pathsA time relative to a date field or the triggerReminders, follow-ups, SLA checks
↳ Asynchronous pathRight after commit, in a separate transactionCallouts and heavier work without slowing the save
Schedule-triggeredOn a schedule, over a set of recordsNightly or weekly batch updates
Autolaunched (no trigger)Called by Apex, REST, other flows, buttons, processesReusable subflows and invocable logic
Platform-event-triggeredA platform event is receivedEvent-driven integration inside Salesforce
Orchestration (including approval orchestrations)Record change or invocationMulti-step, multi-user processes with stages and work items

Rule of thumb: before-save for same-record defaults; after-save for related work; async paths for callouts; subflows for reuse; orchestration when several people and steps are involved.

Real-world analogy

Flow types are staff with different shifts. Screen flows are receptionists who talk to people. Before-save flows are proofreaders who fix a form before it's filed. After-save flows are clerks who file copies to other departments. Scheduled paths are reminder calls, schedule-triggered flows are the night shift, and orchestrations are project managers coordinating several people.

Worked example

Case management:

  • Before-save flow: set Priority from the customer tier and Category from keywords.
  • After-save flow: create a follow-up task for VIP cases; asynchronous path calls the warranty system.
  • Scheduled path: 2 hours before the SLA breach, notify the queue supervisor.
  • Screen flow in the console: a guided refund with validation and approval submission.
  • Schedule-triggered flow: every night, close cases waiting on the customer for 14 days.

Diagram

Rendering diagram…

Key points

  • Screen flows for people; record-triggered for data changes; schedule-triggered for batches.
  • Before-save for same-record fields (fast); after-save for related work.
  • Scheduled paths for time-based actions; async paths for callouts.
  • Autolaunched subflows for reuse; platform-event flows for events.
  • Orchestration for multi-step, multi-user processes (including Flow approvals).

Limits and gotchas

  • Before-save flows can't create related records, send emails or call actions; they only update the triggering record.
  • Scheduled paths run in batches and are not exact to the minute.
  • Schedule-triggered flows process each record in its own interview but share limits in batches; very large volumes may need Batch Apex.
  • Flows run in system or user context depending on type and settings; check run as settings for security.

🎀 How to say this in an interview

Name the right flow type for each requirement in a scenario, and explain why before-save is faster (no extra DML) and why async paths exist (callouts and isolation).

Common follow-ups

Why is a before-save flow faster than an after-save flow updating the same record?

Before-save changes the record in memory before it's written, so there's no second DML or re-run of triggers. After-save updating the same record causes another save cycle.

When would you use a schedule-triggered flow vs Batch Apex?

Schedule-triggered flows for moderate volumes and simple logic that admins maintain. Batch Apex for very large volumes, complex logic, callouts at scale or precise error handling.