Loading
Salesforce now sends email only from verified domains. Read More
Automate Your Business Processes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Subflow Element

          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

          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
          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
          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.
           
          Loading
          Salesforce Help | Article