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 executes 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 relevatn page via the left-hand menu.
"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 specifics 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.
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
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 click the top part of the button creates an Intent 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 as 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.
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
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.
|Flow||Close||Close the Flow window|
|Save||Save 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/disable||Enable or disable the Flow||Enable or Disable documents|
|Edit||Undo/redo||Undo/redo changes performed in the Flow|
|Delete||Delete a selected Flow node|
|View||Zoom to fit||Allows to fit the Flow editor in the Flow window|
|Refresh||Refresh the Flow|
|Top to Bottom/Left to Right||Allows to view the Flow editor from (default) top to bottom or left to right|
|Flow Entry||Add trigger||Add a new Intent trigger||Intent trigger|
|Add Prompt||Add a new Prompt trigger||Prompt trigger|
|Sub-flow||Convert the Flow into a Sub-flow||Sub-flow|
|Set Start Node||Set the selected Flow node as the start node of the Flow (after the trigger)|
|Add Node||Output||Add an Output node||Bot Output|
|Script||Add a Script node||Script node|
|Flow (Link)||Add a Flow Link node||Flow Link|
|Junction||Add a Junction node|
|Integration||Add an Integration previously defined in the Integration manager||Integration node|
|Stable Version||Set/Unset||Set the current version of the Flow as stable or unset it||Version flag|
|Branching||Include/Exclude||Include or Exclude the Flow from branching when working in a Localization setup||Localization setup|
The backstage of a Flow (Flow tab in the top of the Flow window) contains the below mentioned menu items.
|Menu item||Comment||More information|
|Properties||Allows to edit the name of the Flow, the description or add a Resume Prompt|
|History||Lists 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 ribbon||Version flag|
|Metadata||Allows to set Metadata values at Flow level, by clicking Add and selecting the Metadata and it's value||Metadata|
|Variables||Allows to add Flow Variables which are only accessible in the Flow in which they are declared||Variables|
|Listeners||Allows to add Flow Post-Listeners which only listens when the Flow is activated||Listeners|
|Scripts||Add a script (Groovy) which is executed when the Flow reaches the top of the Flow stack or when it is dropped|
|Auto-test||Test the performance of the Flow by either selecting Run Flow test or Run Test using Flow scope||Auto-test|
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.
|Trigger||Trigger based on end user Intent in the input||Adds a new User Intent trigger to the Flow; option only available before the raise label|
|Trigger after the input is processed to Prompt the user||Adds a new Prompt trigger to the Flow; option only available before the raise label|
|Match||Generate a draft implementation from the examples of User Intent||Only 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 input||Adds a Class Match|
|when an Entity is recognized in the input||Adds an Entity Match|
|when a Language Object matches the input||Adds a Language Object Match|
|when a TLML syntax rule matches the input||Adds a Syntax Match|
|when a Scripted Context state is active||Adds a Context Match|
|when a Flow Variable matches a given script||Adds a Flow Variable Context Match|
|when a Global Variable matches a given script||Adds a Global Variable Context Match|
|when a Script returns true||Adds a Script Match|
|After Match||extract 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 variable||Adds a Script After Match|
|execute a script when the input matches an additional TLML Syntax rule||Adds a Listener After Match|
|Continue With||a Transaction to recognize Intent and Give a Response||Adds a Give Response label, User Intent and Bot Output|
|a transaction element to interact with the end user||expect an end user Intent||Adds a User Intent to the transition|
|queue an Output to be given to the end user||Adds an Output node|
|give all pending outputs as a Response||Adds a Give Response label|
|an Integration to query or control another system||Integrations available in the solution are listed, select the wanted integration to add it|
|a Flow Link to pass the dialogue to another flow||Adds a Flow Link|
|a Script to execute an action||Adds a Script node|
|a Junction to split or re-join the dialogue path||Adds a Junction node|
|Split Path *||to a Transaction to recognise Intent and Give a Response||Adds a Give Response label, User Intent and Bot Output|
|to a transaction element to interact with the end user||queue an Output to be given to the end user||Adds an Output node|
|to an Integration to query or control another system||Integrations available in the solution are listed, select the wanted integration to add it|
|to a Flow Link to pass the dialogue to another flow||Adds a Flow Link|
|to a Script to execute an action||Adds a Script node|
|to a Junction to split or re-join the dialogue path||Adds a Junction|
|Fork To||multiple complete Transactions to recognise Intents and Give Responses||selecting 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 user||queue an Output to be given to the end user||selecting 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
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).
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.
Ctrl+S: save with a comment
Ctrl+Alt+S: save without a comment
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.
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.