Trace execution paths with Apex Flow Analyzer
Index an org's Apex, triggers and Flows, then trace what runs when a record changes — including async boundaries, per-step governor risk and duplicate queries — in plain language or by browsing.
Overview
Apex Flow Analyzer shows what actually runs in your org: which trigger calls which handler, which Flow fires next, where work moves to a Queueable or Platform Event, and how many queries each step adds. It is also where you index an org — the step that powers SOQL Risk Intelligence, Query Amplification, Performance Health and Business Processes.
The page has four tabs:
- AI Trace — ask a question in plain language and get the execution path.
- Components — browse or use a guided wizard to pick a starting component.
- Dep Graph — the dependency graph between components.
- Hot Components — the most-connected components, with the highest dependency edge count.
The old Execution Flows link (/execution-flows) opens this page.
Before you start
- The org must be synced, so its Apex and Flow metadata is available.
- AI Trace and per-node AI explanations need an AI provider in Settings → AI Providers.
Steps
- Open Apex Flow Analyzer and pick the org.
- If you see "No components indexed yet", click Index <org> Now. Otherwise click Index Org to refresh after a sync. Indexing can take 30–90 seconds for large orgs — do not navigate away.
- On AI Trace, pick a sample question such as "What happens when an Opportunity is updated?" or type your own, then click Trace Flow.
- Read the trace. Each node shows its governor risk and SOQL by object. Async boundaries (enqueued, scheduled or published work) are marked, because that work runs in a separate transaction with fresh limits. Duplicate queries are flagged.
- Click a node and choose AI Explain for a plain-language description and fix recommendations.
- To start from a known component instead, open Components. Use Browse to search, or ⚡ Wizard to pick an object and then an entry point.
- Use Export trace → Download as Text to share the result.
- Open Dep Graph or Hot Components to find the components most others depend on.
Example
Priya, a release manager, needs to know what a change to OpportunityTriggerHandler could affect on acme-uat. She asks AI Trace, "What happens when an Opportunity closes?" The trace shows the trigger, two handlers, a record-triggered Flow, and a Queueable that runs after the transaction. One handler queries Account twice. She exports the trace and attaches it to ACME-142.
FAQs
How often should I index?
After every sync that brings in Apex or Flow changes. Analysis pages read the last index, not live code.
Why does the trace split at an async boundary?
Queueable, scheduled and Platform Event work runs in its own transaction. Its queries do not count against the triggering transaction's 100-query limit.
Can I index from somewhere else?
Yes. Sync Center has an Index action per org.
Troubleshooting
Other pages say the org is not indexed
Run Index Org here and wait for it to complete before switching pages.
AI Trace or AI Explain returns an error
Check that an AI provider is configured in Settings → AI Providers. See Fix "AI provider not configured".
The trace misses a component I just deployed
Sync the org, then index it again.
Related articles
Was this article helpful?
Related articles
- Index an orgBuild or rebuild an org's analysis index from its last sync so Code Intelligence, SOQL Risk, Query Amplification and other analysis pages show current results.
- 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.
- Find SOQL 101 risks with SOQL Risk IntelligenceDetect SOQL anti-patterns, duplicate queries and transaction-level query counts that risk the 100-query governor limit, and get AI remediation advice.
- Configure AI providersAdd AI provider keys, set the fallback order and verify that AI works for your workspace, using the guided setup in Settings, AI Providers.