Teneo Developers

Flow Listener

Introduction

Listeners are often used to populate variables with a certain value if a specific TLML Syntax is met in the user input; the value can be stored in the variable and used in the logic of the dialogue and it allows to provide a conversational AI application with memory and context.

Below please see how to add, edit and delete a Flow Listener.

Add Flow Listener

To add a Flow listener in Teneo Studio Desktop, simply follow the below steps:

  • Click the Flow tab in the top of the Flow window to go to the backstage of the Flow
  • Select Listeners
  • Click Add in the top right corner
  • Give the listener a name
  • Write the TLML Syntax which should be matched
  • Specify what the Execution Script (Groovy) should do
  • Select if the sentence should be tested from Last to first (default) or First to last
  • Check Limit unused words to and select the number if the number of unused words during the matching process should be limited
  • Stop after allows to select between First match, Current sentence tested and All sentences
  • Click OK when finished
  • Remember to Save the Flow to preserve the changes.

To add a Flow listener in Teneo Studio Web, simply follow the below steps:

  • In the Flow editor, click the Listener button available in the upper, left side corner of the Flow window

Flow listener button

  • Click the Plus icon to add a listener
  • Give the listener a name in the first text box
  • Now write the TLML Syntax needed for If Input Matches
  • Then Execute should be filled out with the Groovy code to execute
  • Click Confirm to close the listener editor
  • Remember to Save the Flow to preserve the changes.

Edit Flow Listener

To edit a Flow listener, follow the below steps:

  • Click the Flow tab in the top of the Flow window to go to the backstage of the Flow
  • Select Listeners
  • Select the listener to edit and click Edit in the top right corner
  • Now modify the wanted specifications
  • Click OK
  • Remember to Save the Flow to preserve the changes

To edit a Flow listener, follow the below steps:

  • Click the Listener button
  • Next to the name of an existing listener, click the pencil icon
  • Now, modify the wanted specifications
  • Click Confirm
  • Remember to Save the Flow to preserve the changes.

Delete Flow Listener

To delete a Flow listener, follow the below steps:

  • Click the Flow tab in the top of the Flow window to go to the backstage of the Flow
  • Select Listeners
  • Select the listener to delete and click Delete in the top right corner
  • Remember to Save the Flow to preserve the changes

To delete a Flow listener, follow the below steps:

  • Click the Listener button
  • Next to the name of an existing listener, click the x icon
  • Remember to Save the Flow to preserve the changes.