Check Flows for performance problems with Flow Health
Analyze every Flow from the last sync for risky patterns such as DML or SOQL in loops, missing entry criteria and after-save work that should be before-save, ranked by severity.
Overview
Flow Health Analysis reviews the Flow definitions in your org against a set of performance and design rules, and tells you which Flows to fix first. It analyzes all Flow XML files from the last sync — no Salesforce API call is needed, so it is fast and safe to run on production orgs.
The rules it checks:
| Rule | Severity | What it means |
|---|---|---|
| DML in Loop | Critical | A create, update or delete inside a loop — one DML per record |
| SOQL in Loop | Critical | A Get Records inside a loop — one query per record |
| Get All Fields | High | A Get Records that stores all fields instead of the ones it needs |
| No Entry Criteria | High | A record-triggered Flow that runs on every save |
| Before Save Candidate | High | An after-save Flow that only updates the triggering record, which a before-save Flow does far more cheaply |
| Action in Loop | High | An action called once per loop iteration |
| Apex in After Save | High | Apex invoked from an after-save Flow |
| Multiple Updates | Medium | Several update elements that could be combined |
| Subflow in After Save | Medium | A subflow called from an after-save Flow |
Before you start
- Sync the org first. The analysis reads Flow metadata from the last sync, so Flows changed since then are not reflected.
Steps
- Open Flow Health under Process & Flow.
- Pick the org.
- Click Run Analysis.
- Read the summary cards: Total Flows, Critical Issues, High Issues, Medium Issues, Low Issues and Clean Flows.
- Click a rule chip, such as DML in Loop, to show only Flows with that issue. Click ✕ Clear rule filter to remove it.
- Use the severity filter (All Flows, Critical, High, Medium, Clean) to focus the list.
- Expand a Flow to read each issue's description and the suggested fix.
Example
Priya, a release manager, runs Flow Health on acme-uat before a bulk data load. Two Flows show DML in Loop, including Update_Contact_Region, which updates each Contact inside a loop. She sends it back to the admin team, who collect the records in a collection variable and update them once after the loop. A re-sync and a fresh Run Analysis show the Flow under Clean.
FAQs
Does Flow Health change anything in Salesforce?
No. It only reads the metadata MetaLens360 already fetched.
Why is "Before Save Candidate" high severity?
Before-save Flows update the triggering record without an extra DML statement and run much faster. Using after-save for that work costs a DML and can re-fire automation.
How is this different from Code Analyzer?
Code Analyzer covers Apex, triggers and Flows with a tunable rule catalog and cross-component paths. Flow Health is a quick, Flow-only checklist.
Troubleshooting
Total Flows is 0
The org has not been synced, or Flow metadata was not included in the sync. Run a sync that includes Flows, then click Run Analysis again.
A Flow I fixed still shows the issue
The analysis uses the last sync. Sync the org, then run the analysis again.
A rule filter shows no Flows
That rule found nothing in this org. Click ✕ Clear rule filter to see all Flows again.
Related articles
Was this article helpful?
Related articles
- Scan Apex, triggers and Flows with Code AnalyzerRun rule-based static analysis on an org's Apex, triggers and Flows, read findings worst-first, tune the rule catalog and compare two scans to see what is new or resolved.
- Map automation and async executionSee every trigger, queueable, batch, schedulable, future method, event and callout in an org. Trace async chains, watch live jobs, and find trigger conflicts and dead code.
- Run your first syncPull an org's metadata into MetaLens360 from the Sync Center, follow its progress, and confirm it finished and was indexed so analysis pages have data.
- Explore a business process with Business Process ExplorerStart from an object and an entry point, then see the full execution graph of a business process with SOQL counts, duplicate queries, caching opportunities and AI explanations per component.