Skip to main content

Junctions

Junctions help you to model the layout and logic of your Flow. Multiple transitions can point to the same junction, or a junction can be the starting point of multiple transitions.

The sections on this page provide information about the various aspects of Junctions:

Concept

Junctions help you to model the layout and logic of your Flow. Multiple transitions can point to the same junction, or a junction can be the starting point of multiple transitions.

1-junction

Junctions themselves do nothing. They don't execute scripts, nor do they display an output. They just offer an easy way to model your Flow. By following the rules below you will learn how to get the most out of junctions.

How To

Add a Junction

In the open Flow, follow the below steps to add a new Junction:

  1. Click the Plus icon and, depending on the icon's location in the Flow graph and the desired behavior, select one of the following options:

    • Continue with > a Junction to split or re-join the dialogue path

    • Split Path > to a Junction to split or re-join the dialogue path

  2. Alternatively, select the node in the Flow editor after which the new node should be added and click the Junction button in the top ribbon.

  3. Remember to Save the Flow to preserve the changes.

Delete a Junction

With the Flow open, follow the below steps to delete a Junction:

  1. Select the Junction in the Flow editor.
  2. Click Delete in the top ribbon.
  3. Remember to Save the Flow to preserve the changes.

Tips and Tricks

When do we need junctions?

Here we will describe some common cases where junctions are used in Flows.

Branching at the beginning of a flow

If you want to branch immediately after a flow trigger you can do this using a junction. This might be necessary if you have different responses for the channels your bot uses, or for different customer types, or for specialized cases of the user input. In this exercise we show you how to branch at the beginning of a Flow.

When you add a branch at the beginning of a Flow it looks something like this:

junction_in_flow

When transitions share part of a condition

In this example the transitions following the junction represent special cases of the main case that leads to the junction.

share_part_of_condition_desktop

When can we avoid junctions?

Keep in mind that you can branch directly from an output node without using a junction. Adding junctions in such cases can make your Flow harder to manage and also introduce unwanted errors. When adding a simple branch, don't use a junction.

4-avoid_junctions_desktop

Have a look at the transitions page for another example of correct branching from an output node.

How can we use junctions correctly?

You can add logical branches to your Flows using junction nodes. These branches (transitions) can be assigned condition on which an input will match, or they can be made unconditional so that any input would match. Here we describe some basic guidelines to help you use junctions in the best way possible.

Tip 1: Incoming transitions that 'get input' must include a Match

Transitions connecting an output to a junction should be set to 'Get input before continuing' and include 'Match'. If a transition has a 'Match' it could use a TLML Syntax match.

media/include_match_desktop.png

Tip 2: Use a fallback transition

When multiple transitions leave a junction, use the last transition as a fallback, and make sure it does not have a 'User Intent' in place. In this example, the first three transitions are set to 'Match', and the fourth one, which serves as the fallback transition, is not. None of the four transitions are set to 'Get input before continuing'.

media/fallback_desktop.png

Tip 3: Leaving transitions must not 'get input'

Make sure the transitions leaving a junction does not use the option 'Get input before continuing'. As junctions typically come after an input is given, doing this will force the user to repeat their input, without being prompted to do it, causing a risk for the Flow being stuck. Toggle this option with the checkbox in the Triggering section of the configuration panel. You can open the configuration panel by clicking on the transition.