Arrange a tailored demo with our DevOps experts. Kick off the process with a 15-minute call to discuss your requirements.

What are Salesforce Flows?
Salesforce Flows allow you to create and run automated business processes without writing code. They’re called Flows because they’re structured like flowcharts.
Flows aren’t the only option for automation in Salesforce. You can also use formulas, validation rules, quick actions, and Apex triggers. But for most common scenarios, Flow Builder’s visual, drag-and-drop interface lets you build sophisticated logic without writing custom code.
Flow types
There are lots of different Flows, but they all fall into two main categories:

Screen Flows are interactive automations that guide users through a process using custom screens. They collect information, offer choices, and update records based on user input — using text fields, picklists, and checkboxes. Designed for use cases where human input is needed, Screen Flows streamline tasks like data entry, guided forms, or approval steps.
Autolaunched Flows are automations that run behind the scenes without needing user input. This flow type is best suited for background tasks like updating records or sending notifications.
Within Autolaunched Flows, there are also some sub types that handle different kinds of tasks, depending on an a specific in-Flow trigger:
- Record-Triggered Flows run when a record is created, edited, or deleted — useful for keeping related records in sync without manual data entry. For example, when an opportunity is marked as “Closed Won,” a Record-Triggered Flow could create a new onboarding task for the account manager and update the customer’s status in a related custom object.
- Schedule-Triggered Flows run on a scheduled time and frequency — great for regular tasks like batch updates, data clean-up, or scheduled reports.
- Platform Event-Triggered Flows respond to platform events — typically triggered by systems outside of Salesforce — and run when an event is received. For example, if a payment gateway sends an event when a transaction is complete, the Flow could update the related opportunity, mark it as paid, and notify the account owner.
- Data Cloud-Triggered Flows run when data changes in Data Cloud — making them a great fit for reacting to real-time updates in customer profiles. If a customer’s engagement score suddenly drops, the Flow could automatically create a follow-up task for the account team or trigger a targeted email journey.
A purely autolaunched Flow, with no trigger defined within the flow, runs when it’s initiated by something else. You have much more control over when it runs because it’s not limited to a schedule, record change, or platform event.
New to Data Cloud?
Learn how it connects real-time customer data with automation in our complete guide.
Template-Triggered Prompt Flows are a new way to power generative AI in Salesforce. They kick off when a prompt template is triggered by a record change or a user action and run an Autolaunched Flow that includes the prompt. These are ideal for weaving AI-generated content into your workflows, like drafting an email or summarizing a record based on real-time context.
Use cases for Flows
Salesforce Flows can support everything from simple productivity improvements to complex business processes. Here are some common use cases:
Auto-assign and convert leads
Set up Flows to handle lead assignment automatically — based on territory, industry, or round-robin rules. Once a lead hits a certain score or stage, another Flow can convert it into an opportunity. This means less manual admin for sales teams and fewer delays between handoff and follow-up.
Case escalation and routing
Need urgent cases to jump the queue? Record-Triggered Flows can update statuses, ping managers, or fire a Slack alert. Pair with a Screen Flow to guide support agents through a triage script to standardize intake.
Bulk updates and maintenance tasks
Autolaunched and Scheduled Flows can take care of mass updates, whether you’re cleaning up old tasks, updating contacts when an account changes region, or standardizing fields across records — no spreadsheets or data loader required.
User onboarding and offboarding
You can build Flows to provision permissions sets, assign training tasks, and send welcome emails — or revoke access when someone leaves.
Integrated user experiences
Build responsive, step-by-step support workflows that adapt to your customer and case context — whether that’s guiding users through resolution checklists, or triggering actions from Data Cloud events like loyalty milestones. Because it’s all declarative, your team can adapt and improve processes without touching code.
Agentforce
Agentforce agents can use prebuilt Flows to automate business processes and can be configured to run Flows in response to customer prompts, case context, or Data Cloud events. They can also be embedded within a Flow to handle parts of a process automatically — for example, elevating the priority of a case when certain conditions are met.
By embedding Flow logic directly into the Agentforce experience, Salesforce gives support teams a flexible, low-code way to improve service quality, reduce handle times, and adapt fast to changing processes — without rebuilding their support UI from scratch.
Looking to go further with intelligent automation across your business? See how Salesforce Agentforce helps teams deliver smarter, more dynamic agent experiences.
Sage streamlined complex Flow deployments
Having all those tools together just makes life so much easier for us!
Sage’s configuration team transformed their deployment process by switching from change sets to Gearset — saving around 10 days of manual work on a single project. With better control over Flows and permissions they’ve been able to speed up delivery, reduce risk, and scale their automation with confidence.
Creating Flows
While Flows can handle complex logic, they’re designed to be accessible to build using Flow Builder’s click-based interface. Each Flow is made up of elements that are connected to define the order of execution. How you combine and configure these elements determines the automation’s behavior.
Flow components and features
All Flows are made up of three main components:
Elements are the actions the Flow will carry out. Elements fall into three categories:
- Interaction elements involve users (like screens or choices).
- Data elements fetch or update records.
- Logic elements control the flow’s path, for example by making decisions, repeating actions in a loop, or pausing until a condition is met.
Connectors are the lines between elements, defining the order the Flow follows and what happens next based on user input or logic.
Resources store things like variables, formulas, or choice sets that your Flow refers to as it runs.
Flow Builder basics
Flow Builder is your visual workspace for designing automations — it has a declarative interface so there’s no code needed. To open Flow Builder in Salesforce, from Setup search ‘Flows’. In the Flows panel, click New Flow.
Flow Builder is split into a few key areas:
- Toolbox: Where you’ll find all your elements and resources, ready to drag onto the canvas.
- Flow canvas: The working area where you’ll build and visualize your Flow
Button Bar: This contains tools for controlling and running Flows. Use the Debug button to simulate how the Flow will behave using real data — ideal for catching issues early. When you’re ready to deploy, Activate makes your Flow live.

Learn more about building and deploying different Flow types
These guides show you the ins and outs of building and deploying Flows that match your use case — whether you’re kicking off a process when a record changes, on a schedule, or with the click of a button.
Create a record triggered Flow →
Best practices for Flow design
Building great Flows takes more than dragging a few elements onto the canvas. To get the most from Flow — and keep your automations reliable, scalable, and easy to manage — it’s worth following some tried-and-tested practices.
Design and planning
Start with a clear understanding of what your Flow is solving for. Map the process end to end and break down what logic belongs where and build naming conventions that make Flows easy to find and understand later.
It’s also worth agreeing a versioning approach from the outset. Every time you make a change to a Flow and save it, Salesforce creates a new version. Only one version can be active at a time, but older versions remain in your org so you can reactivate them if needed. This is handy for rollback, but it also means it’s easy to lose track of which version is live — or to accidentally overwrite someone else’s changes if you’re both editing different versions. Good version management helps keep deployments smooth and avoids restoring outdated logic by mistake.
Structure
Keep Flows simple and readable. Salesforce lets you break large automations into subflows — smaller Flows you can call from a main Flow — so you can keep each one focused and easier to maintain. Avoid deeply nested decisions (lots of “if this, then that” branches inside branches) and add short descriptions to your elements so future users can quickly follow the logic.
Performance and scalability
Avoid hard-coded IDs or unnecessary DML and SOQL operations. DML, or Data Manipulation Language, covers database actions like creating, updating, or deleting records and SOQL is Salesforce’s query language for fetching records. Each of these consumes resources and counts toward Salesforce’s governor limits — the built-in limits that prevent a single automation from overloading the system. Check the Salesforce General Flow limits to see where you might run into restrictions that affect your flow’s design or behavior.
Bulkify Flows where possible. Flows often run on more than one record at a time — for example, when a scheduled Flow processes everything that meets certain criteria. If your Flow handles each record individually inside a loop, it can repeat the same database action hundreds of times. That slows things down and risks hitting Salesforce’s governor limits.
Instead, design your Flow to work with collections (groups of records) so it can process them in a single step. For instance, gather all the records you want to update into a collection and use one “Update Records” element on that collection, rather than looping through them one by one. This makes your Flow faster, reduces database operations, and keeps it well within system limits.
Security and governance
Even though Flows run behind the scenes, they can still have major implications for security and data access. Always validate that Flows respect org-wide defaults, role hierarchies, and field-level security — especially when using system context or working with sensitive records. Consider who can trigger or edit Flows, and use permission sets or profiles to keep access tightly scoped. It’s also worth reviewing your Flows regularly as part of wider compliance checks to make sure they still align with security policies and business rules.
Maintenance and optimization
Flows aren’t something you set up once and never touch again. Over time, requirements change, dependencies evolve, and performance can drift. Keep Flows healthy by scheduling regular reviews to clean up unused versions, refactor complex logic, and archive old automations.
Poorly performing Flows can tempt teams to add quick fixes or build extra Flows to handle specific edge cases, while well-performing Flows can sometimes get overloaded with too many additional steps or branches as new requirements come in. Both patterns can lead to automation sprawl — either more Flows scattered across your org, or single Flows that grow unwieldy and hard to maintain. Tracking performance trends helps you spot when it’s better to optimise or consolidate what you have, rather than adding another Flow or bolting more logic onto an existing one.
Flows and the DevOps lifecycle
DevOps has become the gold standard in the Salesforce ecosystem. All development on the platform — including creating or updating Flows — benefits from being managed with DevOps tools and practices. That means it’s important to consider how each Flow fits into the wider DevOps lifecycle, from version control and testing to monitoring and maintenance.
What is the DevOps lifecycle (and where do Flows fit in?)

The DevOps lifecycle is often shown as an infinity loop, illustrating how DevOps is a continuous cycle of planning, building, validating, releasing, operating, and observing. For Salesforce teams looking to level up how they build and deliver, the DevOps lifecycle brings the structure needed to improve speed, quality and security all at once.
Let’s take Flows as an example and work through the DevOps lifecycle:
- Plan. Get clear on what end users are trying to achieve, then design a first or next iteration of the Flow to meet those needs.
- Build. In Flow Builder, put the right elements in place and commit your changes to version control as you go.
- Validate. Test that the Flow behaves as expected — and keeps doing so at every stage of the release pipeline. Catch issues with security, quality, or team standards early.
- Release. Promote the Flow along the release pipeline, and deploy to production.
- Operate. Make sure Flows are included in your backups and archive obsolete data that might impact your Flows’ performance.
- Observe. Proactively monitor for Flow errors and feed what you learn back into the next round of planning.
Done right, DevOps turns developing and deploying Flows from a risky, manual chore into a reliable, repeatable process that helps your team move faster and deliver smarter automation.
Overcoming common Flow challenges with DevOps done right
Testing
Testing should be a core part of your Flow development process, from validating logic with different user profiles to checking behavior at scale. Common pitfalls like missing fault paths, multiple record-triggered Flows on the same object, excessive complexity, and missing descriptions can quickly make automation brittle if they go unnoticed.
Validating Flows, confirming that everything works correctly, securely, and reliably before it’s deployed to production, isn’t always straightforward. Because Flows can combine complex logic, user interactions, and data operations, issues might only appear under certain conditions — for example, when run with specific user permissions, unusual data inputs, or in combination with other automations. Without a structured review process, it’s easy for problems to slip through.
Catching these issues early, before a Flow reaches production, saves significant time and disruption. Reviewing logic, testing with realistic data and multiple user profiles, and running checks in a safe environment all reduce the risk of broken processes or data integrity issues. The earlier you find these problems, the less costly they are to fix — and the smoother your releases will be.For a deeper dive into best practices across all aspects of Salesforce testing, including automated testing and Flow validation strategies, take a look at our guide to Salesforce testing best practices.
Code Reviews
Gearset’s Code Reviews is an end-to-end quality and security solution for Salesforce. It proactively finds, blocks, and fixes issues in both code and configuration — helping you prevent security vulnerabilities, data breaches, and costly downtime. With customizable quality gates, you can block non-compliant changes from being promoted and shift left (moving testing and quality checks earlier in the development process) to catch problems early and minimize risk.

Code Review’s Salesforce-specific metadata checks include Flows. It highlights performance anti-patterns such as nested loops, inefficient SOQL, and excessive DML and surfaces dependency issues and metadata mismatches that could derail deployments. You can automate reviews for your Flows using pre-configured rules and policies tailored to your team’s needs, and use Autofix to automatically resolve common issues.
Digitall catches Flow issues early with Code Reviews
In the past we saw a lot of issues that we can now easily solve with Code reviews — like missing entry criteria and fault paths in Flows. You can easily miss these in an implementation project because it needs to be finished quickly.
Digitall’s team has seen major improvements in how they build and review flows thanks to Code Reviews. In fast-paced implementation projects, it’s easy to miss things like entry criteria or fault paths — but with Gearset, those issues are much easier to catch and resolve before they become problems.
Deployments
Getting Flows into production can be one of the trickiest parts of the process. Flows are highly visual, and without a clear way to compare changes before deploying, it can be easy to miss something important. Comparing raw Flow XML isn’t much help: location changes and reordered elements create noise, hiding what’s actually changed.

On top of that, versioning can be a constant headache. It’s easy to lose track of which Flow version is active, accidentally overwrite a teammate’s work, or deploy an outdated iteration without realising. Dependencies add another layer of complexity, with Flows often relying on other metadata that must be deployed in the right order. Even deleting a Flow carries risk if you can’t see where it’s used and what might break as a result.
Deploying data when you have Flows in your target org? Active automations in your target org can cause your deployment to fail — or worse, trigger unexpected actions like sending real emails. Learn how to safely deactivate Flows during data deployments without losing track of versions in this guide: How to deactivate Flows within your data deployments.
Flow Navigator
Flow Navigator is a visual UI that helps teams get more value from Flows without needing to decode complex XML. It gives you a visual, side-by-side comparison that looks just like Flow Builder. You can see exactly what’s new, changed, or removed, and switch between versions in seconds to understand differences instantly. That visibility makes version control and rollback far simpler, and gives teams the confidence to deploy the right Flow every time.

Level up your Salesforce Flow deployments
Cristine Moret-Otero from MathWorks outlines how she uses Gearset’s Flow Navigator to deploy Flows successfully.
wistia-player[media-id=’g4xyac7m76′]:not(:defined) { background: center / contain no-repeat url(‘https://fast.wistia.com/embed/medias/g4xyac7m76/swatch’); display: block; filter: blur(5px); padding-top:56.25%; }Problem analyzers in Gearset add another safety net, checking for missing dependencies and warning you about the potential impact of deleting a Flow before you hit deploy. Together, these tools remove much of the uncertainty from Flow deployments, making the process faster, more predictable, and far less risky.
For a closer look at how to navigate Flow deployment pitfalls, and how Gearset can help, check out our guide to deploying Flows in Salesforce.
Flow Error Monitoring
That’s why more Salesforce teams are building observability into their DevOps processes. Observability helps teams spot issues earlier, fix them faster, and maintain stable automations at scale. Gearset’s Flow error monitoring does exactly this. Helping you surface the most important problems, understand what’s gone wrong, and fix them before your users even notice.
“Bugs caused a Salesforce outage at 21% of businesses in 2024. Teams with an observability solution are 50% more likely than other teams to catch bugs within a day and 48% more likely to fix them within a day.”
Gearset’s Flow error dashboard gives you one place to track key metrics and see exactly what happened, where, and why. Instead of sifting through an inbox full of alerts, you can see your Flow errors in a visual timeline, send notifications straight to Slack or Microsoft Teams, and set custom rules so only the most important issues reach you. That way, you know their impact and can resolve them before they escalate. For more on how to monitor and respond to Flow errors effectively, read our guide to Salesforce Flow error monitoring.

Dig deeper into how observability supports a healthy Salesforce DevOps process: Salesforce observability: Unlocking visibility for high-performing teams.
Or download the full whitepaper: Salesforce observability.
Flow Error Monitoring in action
What actually happens when Flows fail — and how can you catch issues faster? In this DevOps Quick Bites episode, Rob Cowell, Salesforce DevOps Advocate at Gearset, walks through the pain points of traditional error alerts, explores how Gearset’s Flow Error Monitoring helps teams stay ahead of issues.
Choose Gearset for smarter Flow management
Flows are a critical part of how modern Salesforce teams build — but without the right tools, they can become a source of friction and failure. From complex deployments to hidden errors and brittle logic, Flow development needs the same rigor and visibility as the rest of your DevOps process. With the right strategy and tooling, you can test confidently, deploy safely, and keep automations running smoothly — even as your org grows and changes.