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

A variable needs to have a unique name and usually starts with a lowercase character, indicating the type of information that the variable contains (i.e. s for string, b for Boolean, etc.). When using multiple words, the words should be concatenated with no separating characters between them; the first letter of each word should be capitalized, for example: sUserName, sCompanyName, nHour and iHour.

Global variables coming with Teneo Conversational Modules are prefixed withLib_

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