What Is Flow Builder?
Flow Builder is a point-and-click tool for automating business processes in Salesforce. It replaced Workflow Rules and Process Builder as Salesforce's primary automation engine. Flows can create and update records, send emails, call Apex, make API callouts, and display interactive screens to users — all without writing a single line of code.
The Five Flow Types
Screen Flow — Presents a guided UI to users step by step. Ideal for data entry wizards, onboarding checklists, or guided sales processes embedded in pages or Experience Cloud sites.
Record-Triggered Flow — Runs automatically when a record is created, updated, or deleted. This is the modern replacement for Workflow Rules and most Process Builder automations. Runs before or after the record save.
Scheduled Flow — Runs at a set time or on a recurring schedule. Use it for batch operations like sending weekly digest emails or closing overdue cases.
Platform Event-Triggered Flow — Fires when a Platform Event message is received. Used in event-driven integrations.
Autolaunched Flow — Has no trigger of its own. Called from Apex, another flow, a REST API, or a process. Acts as a reusable sub-flow.
Key Flow Elements to Know
Get Records — Queries Salesforce records. Equivalent to a SOQL SELECT. Always filter to the smallest dataset you need.
Decision — Branches logic based on conditions, like an if/else statement.
Assignment — Sets or updates variable values.
Loop — Iterates over a collection, similar to a for-each loop.
Create / Update / Delete Records — Performs DML operations. Batch these outside loops to avoid hitting DML limits.
Best Practices
Always use one flow per object per trigger event — just like the one-trigger-per-object rule in Apex. Use sub-flows for reusable logic. Add fault paths to every element that performs DML or callouts so failures are handled gracefully. Test with the Flow debugger before activating in production.
When to Use Apex Instead
Flow handles the vast majority of automation needs. Reach for Apex when you need complex data transformations, complex collection manipulation beyond basic loops, or integrations requiring advanced error handling and retry logic.