Teneo Developers

Theory/Core Concepts

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 don't do anything. 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.

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:

junctions-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.

most-cases-europe

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

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

How do we use junctions correctly?

You can add logical branches to your flows using junction nodes. These branches (transitions) can be assigned a language or script condition, and can also be set to unconditional. 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 language condition.

european-countries-new

Tip 2: Leaving transitions must not 'get input'

Make sure the transitions leaving a junction do 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.

Tip 3: 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'.

6-fallback

Next page
Hands-on
Was this page helpful?