Teneo Developers

Adding nodes and transitions

Add nodes to the Flow

Add node buttons available in the top ribbon

It is possible to add one or more nodes to the Flow to design the dialogue as needed; this is done in the Add Node area found in the top ribbon of the Flow.

The following types of nodes are available:

  • Output (adds an Output node)
  • Script (adds a Script node)
  • Flow Link (adds a Flow link node)
  • Junction (adds a Junction)
  • Integration (only available if one or more Integrations have been defined in the solution)

Junctions allows to split the Flow of the dialogue; they are often used right after the Intent Trigger when the initial reply of the AI application depends on some string(s) in the user input.

Add node with automatically drawn transition

To add a new node to a Flow with the transition automatically drawn, follow the below steps:

  • In the Flow graph, select the node from which the new node should be connected (the new node will be added after the selected node)
  • Click the corresponding button in the top ribbon's Add Node area or alternatively right-click the selected node to select the new node from the context menu
  • The new node is added, remember to Save the Flow to preserve the changes.

Add node drawing the transition manually

To add a new node to a Flow and draw the transition manually, follow the below steps:

  • In the Flow graph, click anywhere in the white area to de-select any previously selected nodes
  • Click the corresponding button in the top ribbon's Add Node area or alternatively right-click in the white area of the Flow to select the new node from the context menu
  • The new node is added
  • Now, manually by clicking one Flow node and maintaining the mouse button pressed, draw the transition to the following node.

It is possible to undo changes performed in the Flow graph by simply clicking theUndo button in the top ribbon of the Flow.

Set Start Node

All nodes, but Intent Triggers and Prompt Triggers, can be set as the start node of the Flow. To do this, follow the below steps:

  • Add the node by clicking in the top ribbon
  • Select the node
  • Click the Set Start Node button in the top ribbon of the Flow.

Transitions

When selecting a transition in the Flow graph, the Transition panel opens in the right-side of the Flow window. If the Transition panel doesn't open automatically, simply click Transition in the right-side tabs.

Transition panel

The Transition's panel contains various configuration options allowing to define the desired behavior of the selected Transition; the below sections zoom in on each of the configurations in more details.

Transition

In the top of the Transition panel, the user can define the following properties:

  • Add name: give the transition a name; the name is displayed in the Flow graph
  • Add description: add a short description of the transition
  • Change start: allows to change the starting point of the transition by selecting another node in the Flow from the dropdown menu
  • Change end: allows to change the ending point of the transition by selecting another node in the Flow from the dropdown menu

Match Requirements

The following Match Requirements can be defined in Transitions:

  • Class: matches whenever the user input is classified with the selected class as the TOP_INTENT
  • Condition: matches based on the syntax condition (using the Teneo Linguistic Modelling Language)
  • Entity: matches if the condition of the Entity matches the user input
  • Language Object: matches if the condition of the Language Object matches the user input
  • Script: matches if the script returns a value that can be interpreted as a true Boolean value
  • Context: groups different Context conditions that can be matched for an input: Global and Flow Variables as well as Scripted Contexts.

Read more about Match Requirements.

Data Actions

The following Data Actions can be added to the Transition:

  • Entity which maps Entity variables to Flow or Global variables
  • Language Object which maps Language Object NLU variables to Flow or Global variables
  • Listener which executes a script when a condition is matched
  • Script which allows to define a Data Action that executes a script.

Read more about Data Actions.

Triggering

In the Triggering area, the user is able to configure the following properties:

  • Get input before continuing: if ticked, the user must provide an input before the Flow process continues to the next node; Match Intent will automatically be selected, the TODO label will become visible, and the user should provide Examples and define Match Requirements; learn more
  • Match Intent: if ticked, it indicates it is conditional on intents and Example will become available in the panel, allowing the user to define example intents; the Transition is marked with TODO until Match Requirements are defined learn more
  • Order: if multiple transitions have the same starting node, specify in which order they (or rather their Match Requirements) have to be evaluated
  • Advanced Options:
    • Match only once per session: indicates if the transition should be executed just once per session or may be repeated
    • Match only the selected sentence (only available when Get input before continuing is not selected): allows the user to select which part of the existing input will be used when testing the Match Requirements and executing the Data Actions of the Transition
    • Test sentences from: "Last to first"/"First to last": by default, sentences in the end-user's input are tested "Last to first", but this setting allows to set the testing from "First to last" (testing sentences in the same order as they appear in the end-user's input).
Get input before continuing

A transition is, by default, set to continue to the next node in the Flow without asking the user for an input. When it is set to Get input before continuing, the user needs to provide an input before continuing to the next Flow node; this is marked in the Flow graph with an icon of a human.

Input consuming transition

When ticking the box, the Match Intent option will also be ticked and the Examples will appear in the panel encouraging the user to add example inputs. The user should also define the desired Match Requirements, as the Transition otherwise will be marked with the TODO label.

Match Intent

When ticked, the Match Intent option indicates that there is an expectation of this Transition to act on inputs, meaning an input should be entered by the end-user to be able to continue to the next node. It also means, inside Teneo Studio, that Auto-test is available for the entered Examples, the user should add Match Requirement(s) and the Transition is expected to be conditional and therefore the Transition is marked with TODO until the user specifies the needed Match Requirements.

When Match Intent is not ticked, it means that the Transition is not expected to act on a user input, and the Transition can be unconditional, but it could also be conditional on, for example, variables or scripts (i.e. is weatherLocation set?, is the user logged in, etc.) only that this conditionality is not directly linked to the current input. Therefore, a Transition with no Match Intent but with some Match Requirement(s) allows users to have a conditional Transition that is not Auto-tested.

When the user adds new Transitions in the Flow graph, Transitions from any node but an Output node are by default unconditional and not required to match intent and therefore do not need any Match Requirements to continue to the next node in the Flow. If the user adds a new Transition from an Output node, the default however is that both Get input before continuing and Match Intent are ticked. Lastly, if a Transition leaving a node already exists, then any new Transition added from that same node will by default get the same settings pre-selected as the already existing Transition.

Metadata

Follow the below steps to add Metadata at node level (i.e. Output nodes, Flow Triggers, Transitions):

  • Select the node in the Flow and, in the right-side panel, click Add under Metadata
  • Select the wanted definition by clicking the down-arrow to display all the available definitions
  • Then, click the down-arrow below to select an appropriate value
  • Alternatively, toggle between string value / script value to add a script expression (</> button available next to the value field)
  • To assign another metadata definition to the same node, repeat the above steps
  • Remember to Save the Flow to preserve the changes.

Learn more about Metadata.

Intent Triggers
Match Requirements
Data Actions
Keyboard shortcuts
Integration manager
Scripts and Groovy