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

Subflows are reusable Flow components that other flows invoke. They have to be both deployed and activated in the target org. Active version is what subflow callers find at runtime.

The gotcha: deploy vs activate

A flow has multiple states:

StateWhat it means
Draft (or "Inactive")Saved but not running
ActiveCurrently invokable, only one active version per flow
ObsoleteWas active, was replaced by a newer version

When you deploy a flow:

  • New version arrives in the target org
  • It lands as Draft / Inactive — the platform doesn't auto-activate
  • A previous version (if any) stays Active until you explicitly activate the new one

If your CI runs sf project deploy start and you forget the activation step, the new version arrives but doesn't replace the old. Worse: if there was no previous version, no version is active, and any caller of this subflow now fails with "couldn't find a subflow."

Activate during deploy

Two ways to ensure the deployed version becomes active:

1. The CLI flag (best)

sf project deploy start --source-dir force-app --post-destructive-changes destructiveChanges.xml

Then activate via Tooling API or admin UI. Or use the dedicated CLI:

sf flow activate --name MySubflow --target-org production

2. Manual activation in the UI

Setup → Flows → click the subflow → click Activate on the version you just deployed. Old version becomes Obsolete; new version is Active.

Diagnose

If a flow is failing with this error, check:

  1. Setup → Flows → search for the subflow name. Does it exist?
  2. If it exists, what's the Status column? Inactive = no active version → callers can't find it.
  3. Does the parent flow's "Subflow" element reference the correct flow API name?
Subflow Element: My_Subflow_v3   <-- API name

Hover the Subflow element in Flow Builder; the right-hand panel shows the referenced flow. If the name is My_Subflow_v3 but the actual flow is My_Subflow_v2, that's the issue.

A common cause: renaming a flow

If you rename a flow's API name in a deploy, every parent flow that calls it by the old name breaks. The right migration:

  1. Deploy the renamed flow
  2. Update all callers to point at the new name in the same deploy
  3. Activate the renamed flow

Don't ship the rename in isolation; coordinate with callers.

Avoiding stale subflow references

Use CommandLine Apex Tests as part of CI: write tests that invoke the parent flow programmatically and assert the subflow runs. Failure = a deployment didn't activate the subflow.

@isTest static void parentFlowFindsSubflow() {
    Flow.Interview.MyParent flow = new Flow.Interview.MyParent(new Map<String, Object>());
    flow.start();
    // ... assert outcome
}

Related dictionary terms