Teneo Developers

Variables

Introduction

Variables are placeholders for changeable values and can be used to store text strings, Booleans, Lists, Maps (key/value pairs) and numbers, in Teneo there are several types of variables: Global Variables and Flow Variables as well as the variables in Language Objects and Entities.

Naming conventions

The name of a variable should be unique and written in camelCase; it is recommended to use a short, yet meaningful name which easily shows the purpose of its use to the reader; see also naming conventions.

Add or edit Variable

NLU Variables

To add a NLU Variable to the Language Object, follow the below steps:

  • If not open, click NLU Variables in the right side of the window to open the panel
  • Under NLU Variables, click Add
  • Write the Variable Name
  • Specify the Evaluation Script
  • Remember to Save the Language Object to preserve the changes

LO Variables

Language Object Variables are deprecated as of Teneo Platform 7.0 and users are encouraged to use NLU Variables instead

To add a LO Variable to the Language Object, follow the below steps:

  • If not open, click LO Variables in the right side of the window to open the panel
  • Under LO Variables. click Add
  • Writhe the Variable Name
  • Specify the Value or leave the default _USED_WORDS
  • Remember to Save the Language Object to preserve the changes

_USED_WORDS allows to return the words from the user input that matched the TLML syntax of the Language Object and implies that the value will be dynamically set to the matched word(s)

To add a Variable to the Language Object, follow the below steps:

  • In the left side of the Language Object, click the >> (double greater-than sign) to open the Variables panel
  • Click the Plus icon to add a new variable
  • Give the variable a name
  • Add the variable value
  • Remember to Save the Language Object to preserve the changes

Delete Variable

To delete a Variable, follow the below steps:

  • In the Language Object window, expand the Variables tab in the right side of the view
  • Select the variable to delete and click Delete
  • Remember to Save the Language Object to preserve the changes.