Sub-flow Overview

Subflows are reusable 'Functions' within a skill that perform a specific task as part of a conversation. These promote reusability by allowing these functions to be utilized across multiple skills, thereby enhancing efficiency and consistency in the development process. Using sub-flows aids advance skill creation in the following ways:

  • Efficiency: Subflows eliminate the need to branch to different skills conditionally, allowing for conditional execution of actions within the main skill and then continuing with the remaining steps.

  • Reusability: They promote the reuse of functionalities across various skills, reducing redundancy in development efforts.

  • Consistency: By using subflows, developers can ensure consistency in executing specific tasks across different parts of the conversation.

For example, if the main skill is 'Create a new account in AD,' corresponding sub flows such as 'Check for Existing User,' 'Generate Unique ID,' and 'Create Account' can be created. Each sub-flow executes a specific task without branching out of the main skill.

SubSkill vs. Subflow

Sub Skills and Sub Flows are crucial in improving the modularity, reusability, and efficiency of Skills. They enable developers to break down complex functionalities into smaller, manageable units, fostering consistency and scalability in conversational experiences. Here are the key differences between Sub Skills and Sub Flows:

  1. Control Flow: When branching to a sub-skill, control permanently shifts from the main skill to the sub-skill, and the main skill doesn't regain control automatically. In contrast, a sub-flow functions like a subroutine within the main skill. After the Sub Flow's execution, control returns to the main skill, allowing the conversation to resume where the Sub Flow was invoked.

  2. Execution Behavior: A Sub Skill can execute another Sub Skill, Skill, or Sub Flow, permanently branching the conversation flow. On the other hand, a subflow cannot execute another subflow but can branch permanently to a Skill or Sub-skill.

  3. Reusability: While both Sub Skills and Sub Flows can be reused across different skills, they differ in their execution and control flow. Sub Skills achieve reusability by creating modular components usable across various conversational scenarios, while Sub Flows promote reusability by encapsulating specific functionalities or tasks within a skill.

  4. Invoking: Sub Skills cannot be triggered independently using user phrases. Instead, it's invoked programmatically based on predefined conditions or from a Card or Quick Reply Message during the conversation. Similarly, sub-flows are not triggered independently by user phrases but are invoked within the main skill's flow based on the conversation context. Unlike Sub Skills, Sub Flows cannot be invoked from a Card or Quick Reply Message.

Creation and Management

Subflows can be managed under the Subflows section within Bot Builder. The creation process is similar to creating a skill in Visual Designer, with all the controls available for skill building also applicable to subflow creation. For more information on subflow controls refer to Building Conversation in Visual Designer

Create a New Subflow

Subflow creation is essentially similar to Skill creation. It uses the visual designer to connect various conversation items and create a conversation flow within the subflow.

To create a SubFlow, do the following:

  1. On the Skill Builder page, Navigate to Subflow, and click Create Subflow.

  2. Specify the Subflow Name, Description, and Category. The system automatically suggests an Identifier, which can also be edited.

  3. Build the conversation flow in the visual designer canvas. Drap and drop the controls from the palette and connect to build a conversation between the user and the bot. To learn how to build a conversation flow, see Create Skills.

  4. Click Save.

The Subflow is created.

Another way to create a subflow is by using the steps in an existing skill:

  1. Navigate to the skill builder and open the required skill.
  2. Select one or more steps in the skill using Ctrl+Select or Shift+select.
  3. Click on the Create Subflow option.
  4. On the pop, Specify the Subflow Name, Description, and Category. The system automatically suggests an Identifier, which can also be edited.
  5. Click Create.

  6. The steps are copied to the canvas. Connect the steps to the START control to build the flow.

  7. Click Save.

The Subflow is created.

  • Execution of a Subflow from a subflow is not allowed. 'Execute Subflow' step is not available in the palate within a Subflow.
  • When copying steps to create a subflow, START and Execute Subflow steps are not copied.

Execute Subflow

This action is used within a skill to execute a subflow, allowing for executing specific functionalities defined as part of the Subflow.
Use the Conversation step and execute Subflow in Visual Designer. For more information, refer to Execute-Subflow

  • SubFlows can only be triggered by other skills and not by user phrases.
  • Permissions and Reprompting behavior are inherited from the main skill. If the user has permission to use the parent skill, they can use the Subflow.
  • Once the Subflow execution is complete, the control returns to the main skill, resuming execution from the branching step.

Export Subflows

In addition to the Bot Export, All/Specific sub-flows can be exported in the Skills Builder on the Subflows tab

To export the sub-flows, follow the below steps:

  1. Click Skill Builder on the Bots menu on the left navigation panel. The Subflow list screen will appear as shown below:


  2. Select one or more subflows by clicking the checkbox or all subflows by clicking the checkbox on the header grid. Click the more options icon  on the right side of the grid. Click Export to continue.


  3. A pop-up window appears as shown below. Select the required option to confirm whether you want to export the selected Skills or All Skills. Else, you can cancel the process also by clicking Cancel.


  4. The selected subflows/all subflows will be downloaded to your local computer in .zip format.
  • When a set of sub flows are exported, all related entities used in the skills like Attributes, Integrations, and Custom User Attributes are also exported to the zip folder. This ensures that the subflows are not broken when imported into another tenant.

Other Actions

Click on the START step in the subflow to view workflow usage. Here, you can view the list of skills and the number of occurrences i.e. number of times the subflow is used in each of the skills.

© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com