Skip to main content

Uniphore Customer Portal

Working with Sub-Flows

A Sub-Flow is any Flow that is referenced from within another Flow. The Flow that uses the Sub-Flow is called a parent Flow.

While building the parent Flow, you add the Sub-Flow logic step to call the Sub-Flow that you need.

On the Flow Map, the details of a Sub-Flow are hidden – only the exit elements of the Sub-Flow will appear. You can view detailed steps of a Sub-Flow at anytime by right-clicking on it and selecting Open.

SubFlowOnMapExample_060819.png
Why Use Sub-Flows

Sub-Flows are helpful for making very large or complex Flows easier to work with and understand by dividing them into smaller, more manageable parts. A Sub-Flow is often used as a workflow that is referenced by many other Flows.

You can also perform common or repetitive tasks using a Sub-Flow, for example:

  • Gathering customer contact information

  • Referencing an external product inventory or manufacturer's database

  • Performing complex processes, such as sending and verifying data with external CRM systems, or providing a cross over from one team to another

Tip

Use a Concurrent Flow if you need a Sub-Flow to perform (asynchronous) background processing, independently of the parent Flow.

Mapping Variables in Sub-Flows

When you add a Sub-Flow, all existing Session Variables will be automatically available to the new Sub-Flow. You can also map additional User Variables to enable the sharing of data between a parent Flow and a Sub-Flow.

The mapping is used at runtime to:

  • supply data from the parent Flow as input to the Sub-Flow, and

  • pass data that is output from the external Sub-Flow back to the parent Flow.

After the Sub-Flow executes, its parent Flow can then proceed with the new, updated or post-processed information.

Creating a Sub-Flow
  1. At the top left of the Flow Map, click the round Add Steps icon. The Add Steps Toolbox opens.

  2. From the Logic Elements group, select and drag the Sub-Flow element to the desired location on the Flow Map. The Sub-Flow Editor opens.

    SubFlowDialog1_170518.png
  3. In the Sub-Flow Name field, enter a unique name for the reference.

  4. From the dropdown list, select a Sub-Flow. Only Sub-Flows that are relevant to the current Flow will be available.

  5. From the Input Variables Mapping panel, click the Plus add-subflow-variable_icon.png icon to map any required User Variables from the selected Sub-Flow:

    1. From the Sub-Flow Variables field, select a variable.

      sub_interaction_input_uservariables_170517.png
    2. From the Parent Variable field, enter a hard-coded value or enter @ and then select or add a variable from the Variable list.

      sub_interaction_input_user_for_parent_170517.png

    Click the Plus add-subflow-variable_icon.png icon to map additional User Variables, as needed.

  6. From the Output Variables Mapping panel, click the Plus add-subflow-variable_icon.png icon to map any required User Variables from the selected Sub-Flow:

    1. From the Parent Variable field, enter '@' to select an existing Session Variable, or create a new User Variable select to receive the Sub-Flow value.

      sub_interaction_output_uservariables_170517.png
    2. From the Sub-Flow Variables field, select the variable that will contain the Sub-Flow value.

      sub_interaction_output_usersforSI_170517.png

    Click the Plus add-subflow-variable_icon.png icon to map additional User Variables, as needed.

  7. Click Create Sub-Flow. The Sub-Flow step appears on the Flow Map. Note: When you make changes to a Sub-Flow, you must Refresh any currently open parent Flows that reference it to update them with the new information. Use the Refresh button in the main toolbar of the X-Designer.

Testing Sub-Flows

Since a Sub-Flow is often invoked via a parent Flow during runtime, you also test a Sub-Flow via its parent Flow.

Like any X-Designer Flow, a Sub-Flow can be stored locally (e.g., when it is being developed) or published for general account access. When published, its status can be either Draft or Approved.

When a parent Flow is run or shared, the Sub-Flow version that is tested will depend on the method you use for running or sharing the parent Flow:

Test Method

Sub-Flow Version Tested

  • Run Button in X-Designer

  • Share Button in X-Designer

  • Run Button on Flow page in X-Console

The most recently edited version of the Sub-Flow. It can be unpublished or published in Draft or Approved status.

This is the development testing version and is shared internally only.

  • Share Button in X-Console

The Approved version of the published Sub-Flow.

This is the released production version and is shared publicly.

For example, if you wish to test a local draft of a Sub-Flow, running its parent Flow via the Run or Share button in the X-Designer will access the most recent local draft. If, however, you wish to test only the Approved version of the Sub-Flow, then you should run the parent Flow via its Share button in the X-Console.