Teneo Developers

Share to

Flow basics

Introduction

The Flow is the design of a dialogue between an end-user and the Conversational AI application; usually a Flow covers a specific topic or use case and contains at lease one User Intent trigger and a Bot Output, but the Flow can be designed to call external Integrations, link to other Flows, or contain Script nodes which execute when the Flow is triggered and the Script node reached.
This pages presents the basics related to working in a Flow, for specifics on the implementation of particular Flow node or element, please find the relevant page via the left-hand menu.

TODO label

"TODO" labels are shown in the Flow editor when an implementation is still pending, allowing the solution designer to sketch the Flow by creating the global structure before specifying the details such as the Match(es) or Output answers.
The "TODO" labels do not affect the functionality of the solution at execution time, the only purpose of the labels is to remind the solution developer of the pending implementation(s).
User Intent triggers or transitions which are input consuming but with no defined Match(es) will never match an input and hence will not be triggered.

Open

To open a Flow in read only mode, either:

  • Double-click the wanted Flow in the Solution Explorer view
  • Select the Flow and click Open in the top ribbon
  • Right-click the Flow and select Open in the context menu

Activate edit mode in the opened Flow by clicking Edit in the top ribbon of the Flow

To open a Flow in edit mode, either:

  • Press the Alt key while double-clicking the wanted Flow in the Solution Explorer view
  • Select the Flow and click Edit in the top ribbon
  • Right-click the Flow and select Edit in the context menu

Create

To create a new Flow in Teneo Studio, follow the below steps:

  • Go to the Solution Explorer in the main Teneo Studio window (Home tab)
  • Optionally, select the folder, or alternatively create a new folder, where the Flow should be added
  • In the New area of Teneo Studio's top ribbon, click the Flow button
    Clicking the lower part of the button allows to select Sub-flow or Prompt Flow while clicking the top part of the button creates an Intent trigger Flow
  • The Flow window opens on the Properties tab:
    • Give the Flow a Name
    • Optionally, add a Description and add a Resume Prompt
  • Click the green Play icon or the back-arrow in the top left corner to go to the main view
  • Select the Trigger node to define the trigger properties
    • Give the trigger a Name and a Description
    • Add Positive and Negative Examples of User Intent
    • Add the required Match(es)
    • Define any needed After Match(es)
  • Select the Output node:
    • Give the Output node a Name
    • Optionally, add a Description and Hyperlink
    • Click the Answer text field to write the answer text
    • Optionally, select an Emotion in the drop-down menu (only available if Emotions have previously been added to the solution)
  • Save the Flow to preserve the changes.

Edit

After opening the Flow in edit mode, the user is able to work on the Flow; below please find an overview of the available options.

Flow: top ribbon

Flow top ribbon

The Flow top ribbon provides a wide range of buttons and options for working with the Flow, in the below table the different buttons are listed and, when relevant links to more information are provided.

SectionButtonCommentMore information
FlowCloseClose the Flow window
SaveSave the Flow in the current state; clicking the lower part of the button allows the user to save the Flow with or without a comment
Enable/disableEnable or disable the FlowEnable or Disable documents
EditUndo/redoUndo/redo changes performed in the Flow
DeleteDelete a selected Flow node
ViewZoom to fitAllows to fit the Flow editor in the Flow window
RefreshRefresh the Flow
Top to Bottom/Left to RightAllows to view the Flow editor from (default) top to bottom or left to right
Flow EntryAdd triggerAdd a new Intent triggerIntent trigger
Add PromptAdd a new Prompt triggerPrompt trigger
Sub-flowConvert the Flow into a Sub-flowSub-flow
Set Start NodeSet the selected Flow node as the start node of the Flow (after the trigger)
Add NodeOutputAdd an Output nodeBot Output
ScriptAdd a Script nodeScript node
Flow (Link)Add a Flow Link nodeFlow Link
JunctionAdd a Junction nodeOptionally give the Junction a name and a description in the Junction panel
IntegrationAdd an Integration previously defined in the Integration managerIntegration node
Stable VersionSet/UnsetSet the current version of the Flow as stable or unset itVersion flag
BranchingInclude/ExcludeInclude or Exclude the Flow from branching when working in a Localization setupLocalization setup

Flow tab

The backstage of a Flow (Flow tab in the top of the Flow window) contains the below mentioned menu items.

Menu itemCommentMore information
PropertiesAllows to edit the name of the Flow, the description or add a Resume Prompt
HistoryLists the history or version created each time the Flow was saved, comments added at saving are displayed here. Open a previous version by clicking the version number; restore a previous version by opening the specific version and clicking Restore in the top ribbonVersion flag
MetadataAllows to set Metadata values at Flow level, by clicking Add and selecting the Metadata and it's valueMetadata
VariablesAllows to add Flow Variables which are only accessible in the Flow in which they are declaredVariables
ListenersAllows to add Flow Post-Listeners which only listens when the Flow is activatedListeners
ScriptsAdd a script (Groovy) which is executed when the Flow reaches the top of the Flow stack or when it is dropped
Auto-testTest the performance of the Flow by either selecting Run Flow test or Run Test using Flow scopeAuto-test

Flow editor

Plus icons are displayed in the Flow editor indicating where more options (nodes) can be added and - when clicked - displays the available options for that particular place in the dialogue; depending if a Plus is clicked just after the first User Intent or further down in the Flow editor the displayed options will therefore differ.

Please find an overview below of the option groups available throughout a Flow via the plusses and the implementation possibilities they provide; links to more information is provided where relevant.

Option groupSub-group/OptionOptionComments
TriggerTrigger based on end user Intent in the inputAdds a new User Intent trigger to the Flow; option only available before the raise label
Trigger after the input is processed to Prompt the userAdds a new Prompt trigger to the Flow; option only available before the raise label
MatchGenerate a draft implementation from the examples of User IntentOnly available when examples of User Intent are added to the User Intent node and the Tryout engine is running Generate the implementation of the Match; read more
when a given Class is predicted for the inputAdds a Class Match
when an Entity is recognized in the inputAdds an Entity Match
when a Language Object matches the inputAdds a Language Object Match
when a TLML syntax rule matches the inputAdds a Syntax Match
when a Scripted Context state is activeAdds a Context Match
when a Flow Variable matches a given scriptAdds a Flow Variable Context Match
when a Global Variable matches a given scriptAdds a Global Variable Context Match
when a Script returns trueAdds a Script Match
After Matchextract the value of an Entity variable (if present in the input)Adds an Entity After Match
extract the value of a Language Object variable (if it matches the input)Adds a Language Object After Match
store the words which matched as a variableAdds a Script After Match
execute a script when the input matches an additional TLML Syntax ruleAdds a Listener After Match
Continue Witha Transaction to recognize Intent and Give a ResponseAdds a Give Response label, User Intent and Bot Output
a transaction element to interact with the end userexpect an end user IntentAdds a User Intent to the transition
queue an Output to be given to the end userAdds an Output node
give all pending outputs as a ResponseAdds a Give Response label
an Integration to query or control another systemIntegrations available in the solution are listed, select the wanted integration to add it
a Flow Link to pass the dialogue to another flowAdds a Flow Link
a Script to execute an actionAdds a Script node
a Junction to split or re-join the dialogue pathAdds a Junction node
Split Path *to a Transaction to recognise Intent and Give a ResponseAdds a Give Response label, User Intent and Bot Output
to a transaction element to interact with the end userqueue an Output to be given to the end userAdds an Output node
to an Integration to query or control another systemIntegrations available in the solution are listed, select the wanted integration to add it
to a Flow Link to pass the dialogue to another flowAdds a Flow Link
to a Script to execute an actionAdds a Script node
to a Junction to split or re-join the dialogue pathAdds a Junction; optionally give it a name and a description in the Junction panel
Fork Tomultiple complete Transactions to recognise Intents and Give ResponsesSelecting the number of times to fork the element allows to add a Give Response label and the selected number of User Intents and Bot Outputs in one go
multiple transaction elements to interact with the end userqueue an Output to be given to the end userSelecting the number of times to fork the element allows to add the selected number of Bot Outputs in one go

* Split Path creates a new path in the Flow; a junction is inserted if splitting directly after the Raise label

Right-side panel

Depending on the selected node in the Flow editor, different options are available in the right-side panel of the Flow window for the developer to implement specific behaviors. The right side panel is usually opened automatically when selecting a new node in the Flow, but can also be opened manually by clicking any of the buttons available in the far right side of the Flow window after selecting a Flow node (again, the option may vary depending on the selected Flow node).

Save

To save a Flow with a comment follow the below steps:

  • Click Save in the top ribbon of the Flow
  • In the dialogue box (optionally) write a comment
  • Click OK

To save directly and bypass the comment, press the Alt key while clicking the Save button.

Keyboard shortcuts:
Ctrl+S: save with a comment
Ctrl+Alt+S: save without a comment

Close

To close a Flow, either:

  • Click the X in the top, right corner of the Flow window
  • Click the Close button available in the top ribbon
  • In the Flow backstage, click Close in the left-side menu

Should there be unsaved changes, Teneo Studio prompts the user to Save or Close without saving.

Delete

To delete a Flow from the solution, follow the below steps:

  • Select the Flow in the Solution Explorer
  • In the top ribbon of Teneo Studio, click Delete
  • A confirmation message will be displayed, click Delete again
    If the Flow is in use, an Item in Use message will appear, click Select All to delete anyhow or Continue to cancel deletion (the user can also click the X in the box to cancel the deletion).

For more information, please see Delete documents.