Sub topic 2
Flow types and how each one starts
This chapter assumes you know the Salesforce data model (objects, fields, records) and can navigate Setup. It also assumes you have opened Flow Builder at least once. The goal is to tell the flow types apart by one question: what starts the flow?
The start decides the type
Every flow has a start element. The start element's trigger decides when the flow runs and what data it receives. The type you pick also limits which elements you can add. Screen elements, for example, are only available in flows that have a user interface.
| Flow type | What starts it | Needs a user? | Typical use |
|---|---|---|---|
| Screen flow | A user opens it from a button, tab, or page | Yes | Guided forms and wizards |
| Record-triggered flow | A record is created, updated, or deleted | No | Field updates, related records |
| Schedule-triggered flow | A set date, time, and frequency | No | Nightly cleanup, reminders |
| Autolaunched flow (no trigger) | A caller: another flow, Apex, or the REST API | No | Reusable logic |
How each type starts
A screen flow waits for a person. It shows screens, collects input, and runs when the user finishes each step.
A record-triggered flow runs when data changes. You choose an object and the event that fires it, such as "a record is created or updated". Salesforce starts the flow itself, once for each change.
A schedule-triggered flow runs on a timer. You choose a start date, a time, and a frequency (once, daily, or weekly). You can also choose an object and filters. Salesforce then runs the flow for each record that matches the filters. Later chapters cover this in detail.
An autolaunched flow has no trigger of its own. It does nothing until something calls it. That makes it a reusable building block. Other flows call it with a Subflow element. Apex and the REST API can also start it.
Common errors
- Looking for a Run button on an autolaunched flow. It has no screens and no trigger, so it cannot be started from the UI. You can test it with Debug in Flow Builder, but in production something must call it.
- Adding screen elements to a flow that has no screens. Screens only work in screen flows. If an autolaunched flow needs user input, pass the values in through input variables instead.
- Expecting a schedule-triggered flow to react to changes. It runs only at its scheduled time. If you need an immediate reaction to a record change, use a record-triggered flow.
- Forgetting to activate. A flow version that is not active will not run from a trigger, a schedule, or a call.
Exercise
A flow must close all cases older than 30 days every night at 2:00 AM, with no one clicking anything. Which flow type starts it, and what two settings control when it runs?
Show answer
A schedule-triggered flow. The start date and time, together with the frequency (Daily), control when it runs.
Exercise
Why can't you launch an autolaunched flow directly from a button on a record page?
Show answer
An autolaunched flow has no trigger and no screens. It must be called by another flow (Subflow), Apex, or the REST API. A button on a record page would need to launch a screen flow, which can then call the autolaunched flow as a subflow.