Create variables to use across all your chatbot states in "Variables" in JennyStudio. To use them in a state, simply input the variable name surrounded by double curly brackets {} where you want it in the reply section of a state.
Variables let you keep information centralised and change it globally across all your states without needing changes in each individual state.
Example
If you use your opening hours in many chatbot answers, you don't want to change each one by hand.
Using variables, you can change your opening hours in one place and they'll change automatically wherever your chatbot mentions your opening hours in a reply.
Create Variables in JennyStudio
- Go to JennyStudio and select the "Variables" tab under "Bot".
- Select "Add Variable"
- Give the variable a short name and a description. The description tells your team members what the variable is for so keep it descriptive!
- Once you select a type for the variable, you'll get a special input depending on the type you selected.
- Enter your desired value into the input and click "Add Variable".
See It in Action
Creating a variable in JennyStudio.
Using Variables in Your Chatbot
- Go to your chatbot states and create a new state. You can also edit an existing state and use variables there too.
- In the reply section of your state configuration, a small tooltip will show you what variables are available for your to use.
- Write the state name into the place where you want it to appear in your chatbot reply. Make sure the variable name is surrounded by double curly brackets. This tells your chatbot to check this variable.
- Click save, and publish your chatbot when you're ready.
See It in Action
Using a variable in a chatbot reply in JennyStudio.
If you change the value for the variable in the "Variables" tab, the answer will change across all the state replies where you have used that variable.
So if you change opening hours, you can reflect this in all your opening hours related states with one action.