---
schema_version: "1"
id: cd194b70b7f8ae4eeb3a51cff07f31e0d502e52d771b0d9434f229cc2ddff11c
title: Subflow Element
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_ref_elements_subflow.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_subflow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 12d8f7dfa96dec1a65aae3b1ffe43f44c49d450b63022cc084ecd98c7244b065
description: Launch another active flow that’s available in your org. A flow launched by another flow is called the referenced flow.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Subflow Element

Launch another active flow that’s available in your org. A flow launched by another flow is called the referenced flow.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

Add a Subflow element to your flow and then, using the label or API name of the flow, search for a flow to configure. The flow you select is the referenced flow. To open the referenced flow in a new window, click the action menu. You can’t reference a screen or a template-triggered prompt flow from an autolaunched flow. You can reference a template-triggered prompt or an autolaunched flow from a template-triggered prompt flow. For each flow, the list shows the label and API name of the active version. If a flow doesn’t have an active version, the list displays the label and API name of the latest version. You can’t call flows that contain wait elements.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_tip.png)

Tip Create smaller flows that perform common tasks. For example, build utility flows to capture address and credit card information or to authorize a credit card purchase amount. Then call those flows as needed from multiple product-ordering flows.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-platform_automation-264-0-0-production-enus/60568438-ec7e-4665-acd1-7c80dcbe60d5/images/icon_note.png)

Note Only flow admins can run inactive flows. For other users, the flow fails at run time if a Subflow element calls a flow with no active version.

## Set Input Values

To set the input variables for the referenced flow, use values from earlier in the flow. In the Set Input Values tab, the Subflow elements displays only input variables from the active version and the latest version of the referenced flow.

When you pass a variable in Set Input Values, use a variable API name of 40 characters or fewer. Longer variable API names cause a save error in the calling flow, such as, `Target Variable Name: data value too large: [Variable Name] (max length=40)`.

The values are assigned at run time when the flow calls the referenced flow. However, for a text, picklist, or multi-select picklist variable that isn’t a collection, a value of `null` is converted to an empty string. in the referenced flow.

## Store Output Values in Flow Types Except Prompt Flows

To use the referenced flow’s outputs later in the flow, store them in variables. The values are assigned when the referenced flow finishes running. In the Store Output Values tab, the Subflow elements show only output variables from the active version and the latest version of the referenced flow.

## Store Output Values in Prompt Flows

To use the outputs of the referenced flow later in the flow, either reference the output of the Subflow element or store them as manually assigned variables.

## Usage

- Flow Builder doesn’t display descriptions for input and output values. For details about each variable in the referenced flow, ask the admin who built the flow for more information.
- In API version 61.0 and later, screen flows and record-triggered flows call the active version of a referenced flow by default. If a referenced flow has no active version, the flow calls the latest version of the referenced flow. In previous API versions, screen flows call the latest version of a referenced flow by default. To run only the latest version of each referenced flow, you have two options.
    - In Flow Builder, click **Debug**, select **Run the latest version of each flow called by subflow elements**, and then click **Run**. This option isn’t available when you debug a flow in the Flow Builder canvas.
    - Append the URL for the parent flow with `?latestSub=true`.
- In API version 62.0 and later, the prompt flow type supports the Subflow element. The prompt flow can call the active version of a referenced prompt flow by default. If a referenced prompt flow has no active version, the flow calls the latest version of the referenced prompt flow.
- In API version 63.0 and later, the prompt flow type supports an autolaunched flow as a referenced flow in the Subflow element.

- **[Create Event Invites with a Subflow in Prompt Flow Example](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements_suflow_prompt_flow_example.htm&release=264.0.0&type=5)**  
    Use a referenced flow to create meeting invites for each marketing event generated by a sales email template-triggered prompt flow.

#### See Also

- [Flow Elements](https://help.salesforce.com/s/articleView?id=platform.flow_ref_elements.htm&release=264.0.0&type=5 "An element represents an action that the flow can run. Examples include reading or writing Salesforce data, displaying information and collecting data from flow users, runnning business logic, or manipulating data.")
- [Add and Edit Elements](https://help.salesforce.com/s/articleView?id=platform.flow_build_elements.htm&release=264.0.0&type=5 "Use elements to define actions that the flow can run. When they’re on the canvas, connect them to create the order in which they run.")
- [Customize What Happens When a Flow Fails](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_fault.htm&release=264.0.0&type=5 "Learn how fault paths customize what happens when a flow fails. Choose how to notify admins, guide users, and take a follow-up action.")
- [Move and Connect Elements to Change a Flow Route](https://help.salesforce.com/s/articleView?id=platform.flow_build_logic_route_add.htm&release=264.0.0&type=5 "Identify which elements the flow runs and in what order by connecting the elements on your canvas together. To change the run order, move elements and add or remove connectors.")
- [Flow Lightning Runtime Considerations](https://help.salesforce.com/s/articleView?id=platform.flow_considerations_lex_runtime.htm&release=264.0.0&type=5 "When running flows, keep these considerations in mind.")