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.
Simple explanation
| Flow type | Starts when | Typical use |
|---|---|---|
| Screen flow | A user launches it (button, action, page, utility bar, Experience site) | Guided processes, wizards, data capture with validation |
| Record-triggered: before-save | A record is created or updated, before it's saved | Fast same-record field updates (no extra DML) |
| Record-triggered: after-save | After the record is saved | Related records, actions, notifications |
| β³ Scheduled paths | A time relative to a date field or the trigger | Reminders, follow-ups, SLA checks |
| β³ Asynchronous path | Right after commit, in a separate transaction | Callouts and heavier work without slowing the save |
| Schedule-triggered | On a schedule, over a set of records | Nightly or weekly batch updates |
| Autolaunched (no trigger) | Called by Apex, REST, other flows, buttons, processes | Reusable subflows and invocable logic |
| Platform-event-triggered | A platform event is received | Event-driven integration inside Salesforce |
| Orchestration (including approval orchestrations) | Record change or invocation | Multi-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
Priorityfrom the customer tier andCategoryfrom 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
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.