Introduction
Salesforce Flow is a powerful declarative automation tool that lets administrators and developers build complex business processes without code. Understanding the different types of flows is essential to choosing the right type for your use case, optimizing performance, and staying within platform limits.
1. Screen Flow
Screen Flows provide a guided, interactive experience for users. They include screens (UI elements) where users can enter or review data. Screen Flows are used for:
- Guided data entry (wizards)
- Complex, multi-step forms
- In-app guidance embedded in Lightning pages or via Flow Actions
2. Autolaunched Flow (No Trigger)
Autolaunched Flows run in the background without any screens. They are typically invoked by:
- Apex (invocable)
- Another flow (Subflow)
- Process Builder or external systems via REST API
Use Autolaunched flows for reusable logic, complex calculations, or when you need an invocable unit of automation.
3. Record-Triggered Flow
Record-Triggered Flows run when a record is created, updated, or deleted. There are two main modes:
- Before-Save (Fast Field Updates) — Runs before the record is saved and is ideal for simple field updates. It’s faster and consumes fewer resources.
- After-Save — Runs after the record is saved and can perform actions that require the record Id, callouts, create related records, or trigger other processes.
Record-Triggered Flows can replace many use cases previously covered by Workflow Rules and Process Builder.
4. Schedule-Triggered Flow
Schedule-Triggered Flows run at scheduled intervals and process batches of records that meet defined criteria. Use them for:
- Nightly processing
- Recurring updates or notifications
- Mass data operations that shouldn’t run in real-time
5. Platform Event-Triggered Flow
Platform Event-Triggered Flows respond to platform events published to the Event Bus. They are useful for:
- Event-driven architectures
- Integrations where external systems publish events
- Asynchronous processing decoupled from source systems
6. Flow Orchestrator & Orchestration Flows
Flow Orchestrator (a separate capability) coordinates multi-step, multi-user business processes across different flows (orchestration). It helps with:
- Long-running approvals with assignments
- Human tasks involving multiple participants
- Complex stateful processes
7. Auto-Layout vs. Free-Form
This is not a flow type but an authoring experience. Auto-Layout enforces a linear, responsive layout especially for record-triggered and autolaunched flows, while Free-Form allows more visual flexibility for complex screen flows.
Choosing the Right Flow
Consider the following when selecting a flow type:
- Does the process require user interaction? → Use Screen Flow.
- Does it need to run on record save? → Use Record-Triggered Flow (Before or After depending on action).
- Is timing important or should it run on a schedule? → Use Schedule-Triggered Flow.
- Is it initiated by external systems? → Consider Platform Event or Autolaunched Flow invoked via API.
- Do you need orchestration across users and steps? → Flow Orchestrator.
Best Practices
- Prefer Before-Save Record-Triggered Flows for simple field updates (faster and consumes fewer limits).
- Keep screen flows short and intuitive — break into multiple screens if required.
- Use subflows to reuse logic and reduce duplication.
- Monitor flow performance and governor limits: avoid DML in loops and excessive SOQL.
- Use fault paths and error handling to capture exceptions and notify admins.
Quick Example (Pseudo)
<Record-Triggered Flow>
Trigger: Account (When: After Create)
Actions:
- Lookup: Find related Opportunities
- Decision: If Opportunity Amount > 100k
- Create Task for Account Owner
- Send Email Alert
Flow types in Salesforce provide a flexible, low-code way to automate nearly any business process. Choosing the right flow type improves performance, maintainability, and user experience.
Leave a Reply