Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
All errors
Flow

Couldn't find the subflow with name <X> or no active version

The parent flow tries to invoke a subflow that either doesn't exist in this org or has no active version. Subflows must be deployed AND activated; deploying without activating leaves a "draft" version that flows can't call.

Also seen asCouldn't find the subflow·no active version·subflow not found·inactive subflow

A flow that creates a Case, posts to Chatter, and then calls a Send_Survey subflow has been working in production for six months. Today the support team kicks off the flow and it dies at the subflow step with Couldn't find the subflow with name Send_Survey or no active version of this subflow exists. Nobody touched Send_Survey. The flow that calls it didn't change. Something else moved underneath the integration.

What the platform is checking

A subflow reference inside a parent flow is a static pointer to another flow by API name. At runtime, the flow runtime resolves that pointer to whichever version of the named flow is currently active. If no flow with that API name exists in the org, or if one exists but no version of it is marked Active, the runtime cannot resolve the pointer and throws the error.

The check is strict in three ways. First, the lookup is by exact API name match, not label. Renaming the subflow's label has no effect; renaming its API name breaks every caller. Second, the runtime requires an Active version specifically. Draft and Obsolete versions don't satisfy the lookup, even if they're the most recent thing in the flow's version history. Third, the lookup happens at runtime, not at save time. The parent flow saves and activates successfully even if the subflow it references doesn't exist; the error only surfaces when an actual execution path tries to call into the subflow.

That last point is what makes the failure mode confusing. A parent flow can sit in production with a broken subflow reference for months. The error only fires when a real record hits the branch that includes the subflow call. Test coverage that exercises every branch in the parent flow catches the issue at deploy time; coverage that misses the branch ships the bug.

The broken example

A Case-creation flow that calls a Send_Survey subflow after the Case is closed:

Case_Created_Flow (record-triggered, after save, Case)
  Decision: Status equals 'Closed'?
    YES → Subflow: Send_Survey
              Input: caseId = $Record.Id
    NO  → End

The Send_Survey subflow used to exist. Somebody, perhaps for a deactivation experiment, deactivated all versions of Send_Survey last week. The parent flow continues to save and activate. The next closed Case fires the runtime error.

A second shape: the subflow was renamed. An admin in a sandbox renamed the API name of Send_Survey to Send_Customer_Survey because the original name didn't match the team's naming convention. The sandbox deploy renamed the metadata. The parent flow in production still points at Send_Survey, which no longer exists.

A third shape: the subflow was deployed to a sandbox but never promoted to production. The parent flow was promoted because somebody included it in a deploy without checking dependencies. The subflow lookup fails in production because the dependency wasn't shipped together.

The fix, three paths

Activate the subflow. The most common cause is that all versions of the referenced subflow are inactive. Open Setup, Flows, find Send_Survey, look at the version list. If every row shows Draft or Obsolete, click into the most recent good version and click Activate. Save. The parent flow now resolves the reference on the next execution.

Restore the missing subflow. If the subflow was deleted entirely (Setup, Flows shows no row with that API name), recover it. Recently deleted flows live in the Deleted Flows view inside Setup; restore from there if the deletion happened within the retention window. If the deletion is older, redeploy the flow's metadata from version control or from a sandbox that still has it.

Fix the API name reference in the parent flow. If the subflow was renamed, edit the parent flow's subflow element and update the reference to the new API name. Save as a new version, activate. The reference resolves on the next execution.

The fixed example

After confirming Send_Survey exists with an Active version, the parent flow runs cleanly:

Case_Created_Flow (record-triggered, after save, Case)
  Decision: Status equals 'Closed'?
    YES → Subflow: Send_Survey [v3, Active]
              Input: caseId = $Record.Id
              Output: surveyId → SurveyRecordId
    NO  → End

The version qualifier in the diagram ([v3, Active]) is a habit worth picking up. Document which version of the subflow your parent expects, so the next admin looking at the dependency knows the contract.

Why subflows go inactive without warning

Salesforce has several housekeeping operations that can deactivate a flow without an explicit click. A scratch-org deploy that ships a Draft version of the flow can leave it inactive in the target org if the deploy is partial. A change-set deploy of a flow with no specified active version defaults to inactive. An admin trying to test a hotfix saves a Draft version, intends to activate after testing, and forgets.

The most subtle case is a flow named the same as one in a managed package. The package version can ship with a different active version than the unmanaged metadata expects. Reconciling this requires understanding the package's flow versioning policy.

The subflow input and output contract

When a parent flow calls a subflow, both flows must agree on the input and output variables. The parent supplies inputs in the subflow element; the subflow declares those inputs as variables with the Available for input checkbox.

If the parent passes an input that the subflow no longer declares (because somebody removed the variable in a newer subflow version), the call fails. Not necessarily with the "couldn't find subflow" message, but with a different runtime error about an unrecognized variable. Treat subflow signatures as part of the API contract between flows; changes need coordination.

Similarly, if the parent expects an output that the subflow no longer provides, the parent's downstream logic might break even if the subflow itself ran fine.

Diagnosing in production

When the error fires:

  1. Open Setup, Flows, search for the API name from the error message.
  2. If the flow exists, look at its version list. Is there an Active row?
  3. If no Active row, choose the most recent good version and activate it.
  4. If the flow doesn't exist at all, check Deleted Flows in Setup or redeploy from sandbox.
  5. If the flow exists with a different API name than the parent expects, decide whether to rename it back or update the parent to match.

Each step is two or three clicks. Most incidents resolve in under five minutes once you've found the broken reference.

Test patterns

A flow test that exercises the subflow path catches the error at deploy time, not in production. The Flow Test feature in Setup lets you create test cases for record-triggered flows. Each test case specifies an input record, an expected outcome, and runs the flow end to end. If the test case exercises the closed-case branch and Send_Survey is inactive in the deploy target, the test fails and the deploy is blocked.

Test: Case_Created_Flow_ClosedCase_TriggersSurvey
  Input record: Case (Status = 'Closed', Subject = 'Test')
  Expected: Survey record created with Case = Input.Id

The test gives you a guardrail. Every deploy of either Case_Created_Flow or Send_Survey runs the test; if either is broken, the deploy fails before any user notices.

Coordinating cross-flow deploys

Treat the parent flow and the subflow as a single deployable unit. Both should be in the same change set or both in the same deploy package. The deploy order should activate the subflow before the parent flow's new version, so the parent never sees an inactive subflow reference at activation time.

Source-driven deploys handle this implicitly because the metadata format includes a status field. Change-set deploys can lose the active status; double-check after every change-set deploy that both flows show Active in the target org.

Edge case: orphaned subflows

Sometimes a subflow exists in the org but no parent flow calls it anymore. Over time, these orphans accumulate. Deactivating them by hand is fine; they don't break anything. But before deactivating, run a where-used analysis (Setup, Flows, click the orphan flow's name, look at the Referenced By section). If any parent still references the orphan, deactivation will create the exact error this article describes.

The Salesforce Optimizer Report (Setup, Optimizer) flags orphan flows automatically. Run it monthly to catch the drift.

Edge case: managed-package subflows

A flow in a managed package can be called from your unmanaged flows by using the namespace prefix in the subflow reference. The reference looks like subscriberMyFlow for namespace subscriber. If the package is uninstalled or upgraded with a renamed flow, your unmanaged caller breaks the same way.

Before upgrading any package that owns flows your custom flows depend on, run the parent flows against a staging org with the new package version. Catch the breakage in staging, not production.

Defensive habits

Document subflow dependencies. A simple wiki page listing every parent flow and which subflows it calls helps the next person debugging a similar error. Salesforce's own dependency analyzer is good but limited to one direction at a time; a human-maintained list catches the cross-cutting picture.

Avoid renaming subflow API names. Once a subflow has callers, the API name is part of an interface, not a private implementation detail. Renaming requires coordinated updates to every caller, and a missed caller produces the runtime error this article opens with.

Set the subflow's owner to a permanent team account, not an individual admin. If the original owner leaves the company, ownership transfers smoothly without anybody having to touch the flow.

Treat Flow Tests as required for every flow that calls a subflow. The marginal cost is low and the bug-prevention value is high.

A note on autolaunched flows from Apex

The same kind of error can fire from Apex code that invokes a flow by API name:

Flow.Interview.MyNamespace.SendSurvey survey = new Flow.Interview.MyNamespace.SendSurvey(params);
survey.start();

If SendSurvey doesn't exist or has no active version, the runtime throws a similar error. The fix is the same. Apex callers should be listed alongside flow callers when evaluating where-used. Both depend on the API name resolving correctly at runtime.

Quick recovery checklist

For a production incident:

  1. Read the error message; extract the subflow API name.
  2. Setup, Flows, find the named flow.
  3. If no Active version, activate the latest good version.
  4. If no flow at all, restore from Deleted Flows or redeploy.
  5. If renamed, fix the parent flow to use the new name.
  6. Reproduce the original failure path; confirm the flow now completes.

Most incidents resolve in five minutes. The longer ones tend to involve managed packages or cross-org deploys, where the fix requires coordination with another team or another deploy.

Further reading from Salesforce

Related dictionary terms

Share this fix

Share on LinkedInShare on X

Related Flow errors