- Your project library contains all of the variables in your project. You can view it by clicking on the book icon on the left side of the editor.
- A dialogue variable is used to capture information from the user during the conversation (similar to a slot or entity).
- A dialogue variable type is similar to a slot type or entity type. Types contain specific values that are associated with them. Types can be reused for multiple dialogue variables. Ex. dialogue variables "departure city" and "arrival city" can share the type "city" which contains a list of city names.
- A context variable is used to track any external information that may influence the conversation (ex. user type, time of day, prior interaction history, information from a database, etc.)
- A condition node is added to your turn when you add any dialogue or context variable and is removed automatically when all dialogue and context variables are removed
- Variables can be referenced in both user and response nodes but, new dialogue variables can only be created in user nodes.
Adding and removing dialogue variables and types
To add a new dialogue variable use # and then begin typing the variable name. If the variable already exists in your library, a list of suggested options will appear as you type. You can select an existing variable or choose to create a new one.
When you create a new dialogue variable, you can choose to create a new type or use an existing type. You can also leave the type blank and add one later.
To remove a dialogue variable from a node you can simply click into the node and use the delete key. If you'd like to remove a variable or variable type from the project, you can go into your library and remove it. Any variables deleted from the library will automatically be removed from all scripts.
Using context variables
To add a new context variable click the + icon between any user and response nodes. (If a condition node already exists, you can simply click + context variable) You can select an existing variable or choose to create a new one.
When you create a new context variable you must choose a source for the data. We will be providing direct integrations in the future that allow you to actually import data directly into VoiceXD.
Using conditions and variables
For both dialogue and context variables, you can set a specific value for them within the condition node to define the conditions for continuing down the current flow. You can set a variable to a value you have defined, any value, or no value.
1) Any value is useful when you want to continue the conversation as long as your variable has a valid value
2) Setting a specific value is useful when you want to handle a conversation differently based on the specific value of a dialogue or context variable
3) No value is useful when you want to design a scenario where one or more variables do not have an appropriate value.