Product documentation Docs
    • English
    • Deutsch
    • 日本語
    • 한국어
    • Français
  • More Sites
    • Now Community
    • Developer Site
    • Knowledge Base
    • Product Information
    • ServiceNow.com
    • Training
    • Customer Success Center
    • ServiceNow Support Videos
  • Log in

Product documentation

  • Home
How search works:
  • Punctuation and capital letters are ignored
  • Special characters like underscores (_) are removed
  • Known synonyms are applied
  • The most relevant topics (based on weighting and matching to search terms) are listed first in search results
Topics are ranked in search results by how closely they match your search terms
  • A match on the entire phrase you typed
  • A match on part of the phrase you typed
  • A match on ALL of the terms in the phrase you typed
  • A match on ANY of the terms in the phrase you typed

Note: Matches in titles are always highly ranked.

  • Release version
    Table of Contents
    • Now Platform capabilities
Table of Contents
Choose your release version
    Home Paris Now Platform Capabilities Now Platform capabilities Flow Designer Flows Flow logic Dynamic flows

    Dynamic flows

    • Save as PDF Selected topic Topic & subtopics All topics in contents
    • Unsubscribe Log in to subscribe to topics and get notified when content changes.
    • Share this page

    Dynamic flows

    Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows.

    The Dynamic Flow flow logic calls a flow or subflow during runtime by using the data that you specify during the flow design. You can use Dynamic Flow to select which flow to run when multiple flows have similar names or purposes.

    To use Dynamic Flow, the flow designer does the following:
    1. Creates and publishes a flow or subflow to use as a template.
    2. Adds Dynamic Flow to a parent flow.
    3. Selects the flow template for Dynamic Flow.
    4. Enters the flow name for Dynamic Flow.
    5. Enters the required inputs specified by the flow template.

    Dynamic flow templates

    The template for Dynamic Flow can be a flow or a subflow. The template's inputs must match the inputs of any flow or subflow that you call dynamically. An input matches when it has the same Label and Name field values in each flow or subflow.

    After you build a template, consider copying it to create similarly named and similarly performing flows or subflows. Make sure that you name each flow or subflow with a standard naming convention that can be generated by Dynamic Flow. For more information on creating a template for Dynamic Flow, see Getting started with Dynamic Flow and Get Flow Outputs.

    Inputs

    The following inputs always appear when you add the Dynamic Flow flow logic to a flow.

    Input Description
    Flow Template Template whose inputs the dynamic flow copies and displays. The inputs for the template must match the inputs of the subflow that you want to run.
    Flow Name of the flow or subflow that you want to run. Generate a flow or subflow name dynamically by entering a string and concatenating it with data pill values.
    Note: You can call a flow or subflow that is associated with another application scope by entering a scope-name.flow-name format. The user running the flow or subflow must have access to the application scopes that you specify. If you do not specify an application scope, the dynamic flow runs in the parent flow's scope.
    Note: If the system can't find the flow or subflow, it skips the Dynamic Flow flow logic step and logs an error message.
    Wait for completion Option to force the parent flow to wait until the dynamic flow finishes running before proceeding with the next action.
    Note: You see more inherited inputs after you select a Flow Template.

    Get flow outputs

    Dynamic Flow outputs appear in the data pane as Record type data pills that are named as Context. You can use these flow contexts to derive the runtime values for dynamic flow outputs with the Get Flow Outputs flow logic. To use Get Flow Outputs, the flow designer does the following:
    1. Adds a Dynamic Flow to a flow.
    2. Adds Get Flow Outputs after the dynamic flow.
    3. Specifies the value for the Context input by clicking the data pill picker (Data pill picker) and selecting Dynamic Flow > Context.

    For more information on using Get Flow Outputs, see Getting started with Dynamic Flow and Get Flow Outputs.

    Design considerations

    Consider using dynamic flows if you have multiple subflows with similar functionality
    Dynamic flows let you compartmentalize your processes by applying a template to handle the inputs of multiple similar subflows. Compartmentalization lets you distinguish between subflows that perform similar functions, such as subflows for IntegrationHub spokes.
    Ensure dynamically called subflow inputs match template flow inputs
    If the inputs of the dynamic flow don't match the inputs of the flow template, the system throws an error and the main flow can't run properly.
    Use the correct context when getting flow outputs
    If you are using Dynamic Flow more than once within a flow, make sure to drop in the correct context data pill from Get Flow Outputs.
    • Get started with Dynamic Flow and Get Flow Outputs

      Create a sample flow that dynamically calls subflows for provisioning cloud services.

    Related concepts
    • If flow logic
    • For Each flow logic
    • Do the following until flow logic
    • Do the following in parallel flow logic
    • Make a decision flow logic
    • Wait for a duration flow logic
    • Call a workflow flow logic
    • End flow logic

    Tags:

    Feedback
    On this page

    Previous topic

    Next topic

    • Contact Us
    • Careers
    • Terms of Use
    • Privacy Statement
    • Sitemap
    • © ServiceNow. All rights reserved.

    Release version
    Choose your release version

      Dynamic flows

      • Save as PDF Selected topic Topic & subtopics All topics in contents
      • Unsubscribe Log in to subscribe to topics and get notified when content changes.
      • Share this page

      Dynamic flows

      Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows.

      The Dynamic Flow flow logic calls a flow or subflow during runtime by using the data that you specify during the flow design. You can use Dynamic Flow to select which flow to run when multiple flows have similar names or purposes.

      To use Dynamic Flow, the flow designer does the following:
      1. Creates and publishes a flow or subflow to use as a template.
      2. Adds Dynamic Flow to a parent flow.
      3. Selects the flow template for Dynamic Flow.
      4. Enters the flow name for Dynamic Flow.
      5. Enters the required inputs specified by the flow template.

      Dynamic flow templates

      The template for Dynamic Flow can be a flow or a subflow. The template's inputs must match the inputs of any flow or subflow that you call dynamically. An input matches when it has the same Label and Name field values in each flow or subflow.

      After you build a template, consider copying it to create similarly named and similarly performing flows or subflows. Make sure that you name each flow or subflow with a standard naming convention that can be generated by Dynamic Flow. For more information on creating a template for Dynamic Flow, see Getting started with Dynamic Flow and Get Flow Outputs.

      Inputs

      The following inputs always appear when you add the Dynamic Flow flow logic to a flow.

      Input Description
      Flow Template Template whose inputs the dynamic flow copies and displays. The inputs for the template must match the inputs of the subflow that you want to run.
      Flow Name of the flow or subflow that you want to run. Generate a flow or subflow name dynamically by entering a string and concatenating it with data pill values.
      Note: You can call a flow or subflow that is associated with another application scope by entering a scope-name.flow-name format. The user running the flow or subflow must have access to the application scopes that you specify. If you do not specify an application scope, the dynamic flow runs in the parent flow's scope.
      Note: If the system can't find the flow or subflow, it skips the Dynamic Flow flow logic step and logs an error message.
      Wait for completion Option to force the parent flow to wait until the dynamic flow finishes running before proceeding with the next action.
      Note: You see more inherited inputs after you select a Flow Template.

      Get flow outputs

      Dynamic Flow outputs appear in the data pane as Record type data pills that are named as Context. You can use these flow contexts to derive the runtime values for dynamic flow outputs with the Get Flow Outputs flow logic. To use Get Flow Outputs, the flow designer does the following:
      1. Adds a Dynamic Flow to a flow.
      2. Adds Get Flow Outputs after the dynamic flow.
      3. Specifies the value for the Context input by clicking the data pill picker (Data pill picker) and selecting Dynamic Flow > Context.

      For more information on using Get Flow Outputs, see Getting started with Dynamic Flow and Get Flow Outputs.

      Design considerations

      Consider using dynamic flows if you have multiple subflows with similar functionality
      Dynamic flows let you compartmentalize your processes by applying a template to handle the inputs of multiple similar subflows. Compartmentalization lets you distinguish between subflows that perform similar functions, such as subflows for IntegrationHub spokes.
      Ensure dynamically called subflow inputs match template flow inputs
      If the inputs of the dynamic flow don't match the inputs of the flow template, the system throws an error and the main flow can't run properly.
      Use the correct context when getting flow outputs
      If you are using Dynamic Flow more than once within a flow, make sure to drop in the correct context data pill from Get Flow Outputs.
      • Get started with Dynamic Flow and Get Flow Outputs

        Create a sample flow that dynamically calls subflows for provisioning cloud services.

      Related concepts
      • If flow logic
      • For Each flow logic
      • Do the following until flow logic
      • Do the following in parallel flow logic
      • Make a decision flow logic
      • Wait for a duration flow logic
      • Call a workflow flow logic
      • End flow logic

      Tags:

      Feedback

          Share this page

          Got it! Feel free to add a comment
          To share your product suggestions, visit the Idea Portal.
          Please let us know how to improve this content

          Check any that apply

          To share your product suggestions, visit the Idea Portal.
          Confirm

          We were unable to find "Coaching" in Jakarta. Would you like to search instead?

          No Yes
          • Contact Us
          • Careers
          • Terms of Use
          • Privacy Statement
          • Sitemap
          • © ServiceNow. All rights reserved.

          Subscribe Subscribed Unsubscribe Last updated: Tags: January February March April May June July August September October November December No Results Found Versions Search preferences successfully updated My release version successfully updated My release version successfully deleted An error has occurred. Please try again later. You have been unsubscribed from all topics. You are now subscribed to and will receive notifications if any changes are made to this page. You have been unsubscribed from this content Thank you for your feedback. Form temporarily unavailable. Please try again or contact  docfeedback@servicenow.com  to submit your comments. The topic you requested does not exist in the release. You were redirected to a related topic instead. The available release versions for this topic are listed There is no specific version for this documentation. Explore products Click to go to the page. Release notes and upgrades Click to open the dropdown menu. Delete Remove No selected version Reset This field is required You are already subscribed to this topic Attach screenshot The file you uploaded exceeds the allowed file size of 20MB. Please try again with a smaller file. Please complete the reCAPTCHA step to attach a screenshot
          Log in to personalize your search results and subscribe to topics
          No, thanks Login