Skip to main content
Variables are essential for capturing and utilizing the data dynamically in the conversation. With variables, you can personalize the chat experience by being able to say “Hey John!”, instead of “Hey there!”.
Image

Canvas Look

Image

Real time Example

Variable Type

There are 3 types of variable in WotNot and you can create it from 2 ways:
Used for storing temporary data that is only relevant within a single session.
  • Conversation variables are session-specific and do not persist
  • Values are reset after the conversation ends
  • Ideal for storing temporary inputs like selections, intermediate responses, or flow-specific data
  • Helps manage state within a single interaction without affecting future conversations
Image

Data Types of Variables

Creating variables

How to Create:

From Variable Setting

  1. Open your bot in Bot Builder.
  2. Open the Variables panel.
  3. Click Create Variable.
  4. Select the appropriate variable type(Contact /Conversation/secret).
  5. Enter a name, description and type for the variable.
  6. Review the configuration.
  7. Click on Create variable.
The variable is now available to use throughout the bot flow.
Image (2)
Use descriptive variable names written in lowercase with underscores. For example, use customer_name instead of Customer Name or customername. Avoid spaces and unclear names such as var1 or data. Choose the name carefully because renaming a variable later can require you to update blocks that already reference it.

From the bot builder

  1. In action blocks that allow you save user input like “Collect Input”, “Buttons” etc. you have the option to create a new variable.
  2. First, you choose the type of variable(Contact or Conversation), next you provide the details like name, description, type.
  3. Enter a name, description and type for the variable.
  4. Review the configuration.
  5. Click on Create variable.
Image (3) 1

Setting a Value

A variable can be populated in four different ways depending on where the value comes from:
Use Collect Input when the value comes directly from the user.
  1. Add a Collect Input block to your flow.
  2. Configure the question you want to ask the user.
  3. Select the variable where the response should be stored.
  4. Configure any required validation.
  5. Continue the flow after the input is captured.
The value entered by the user is stored in the selected variable and can be used in subsequent blocks.

Using a variable

You can invoke a variable by typing # to preview the variable dropdown across the bot builder.
  • In messages: Display stored values dynamically, such as a customer’s name or order ID.
  • In conditions: Use variable values to control which path the conversation takes.
  • In API requests: Pass stored or collected values to an API to retrieve or send information.
Recording2026 08 27131039 Ezgif Com Optimize

Editing variables

You can update an existing variable when its name, type, or configuration needs to change.
  • Open your dashboard
  • Go to Setting→ Account→ Variable
  • Open the Variables panel.
  • Find the variable you want to edit and click on Edit.
Image

IMPORTANT

  • You can edit description and data type from the dropdown.
  • Can not edit the Variable Name
Image

Deleting variables

Variables can only be archived and not deleted.
  • Open the Variables panel.
  • Find the variable you want to remove.
  • Click on Archive.
Image

Restoring variables

You can restore variables from the “Archived” tabs, by choosing the ‘Restore’ button on the required variable.
Image
Variables can be referenced by multiple blocks across your bot. Renaming, changing, or deleting a variable can affect every block that depends on it. Review existing references before making changes. If the bot is already live, changes to variables can also affect conversations that are currently in progress depending on where the variable is used.
  • Changing or deleting a variable can affect every block that already references it. This includes messages, conditions, API requests, JavaScript, and other actions that use the variable.

Adding default value to variables

You can add a default value to the variable, so that incase there is no value present a default value can be shown to the user. To add the default value,
  • Open the bot builder canvas
  • Add a variable on any message box
  • Click on the variable tag and define the fallback value from the popup.
Image

Customizing error messages in variables

You can customise error messages in variables.
  1. Navigate to Settings > Variables.
  2. Locate the variable with this format (Number, Boolean, Date, Email, Phone & Regex) used for validation.
  3. Click “Edit” and edit the error message field.
  4. Save the changes and test the flow to confirm the new error message is displayed.
This allows you to replace the default “Invalid! Please enter a valid input” with a custom, user-friendly error message (e.g., “Please enter a valid business email address to continue”).

Retrieving JSON objects from a variable

If you are storing JSON objects into variables and want to refer a particular field from the JSON object, you can follow the below approach:
  • Create a TEXT type variable
  • Store the JSON object in that variable
  • Use # followed by your variable name and append the field you want to refer
  • Hit enter so the variable chip is created
For example:

Troubleshooting

If a variable appears empty when displayed in a message, check whether the variable has been populated before the message is sent.Check:
  • Whether the variable is assigned a value.
  • Whether the Collect Input block successfully captured the value.
  • Whether the Set Variable block runs before the message.
  • Whether the API response contains the expected field.
  • Whether the variable reference is written correctly.
For example, if customer_name has not been populated, a message containing {{customer_name}} may not display the expected value.
If a condition does not follow the expected path, verify the actual value stored in the variable.Check:
  • The variable contains a value.
  • The value matches the expected format.
  • The comparison operator is correct.
  • The comparison value matches the variable type.
  • There are no unexpected spaces or formatting differences.
For example, a Number variable containing 100 may not behave the same way as a Text variable containing "100" in every comparison.
If a variable was populated earlier but is empty later in the conversation, check where and when the value is assigned.Make sure:
  • The variable is the same variable throughout the flow.
  • The value is assigned before it is referenced.
  • Another block is not overwriting the value.
  • The flow path actually reaches the block that populates the variable.
  • The variable has not been renamed or deleted.
If the value comes from an API or JavaScript block, also verify that the operation completed successfully before the variable is used.
A type mismatch usually occurs when the value stored in the variable does not match the type expected by the condition or another block.
  • Check the variable type.
  • Check the actual value stored in the variable.
  • Make sure numeric values are stored as numbers when required.
  • Make sure text values are stored in a text-compatible variable.
  • If the value comes from an API, check the type returned by the API.
  • Check how the variable is mapped into the HTTP request.
  • Confirm that the variable contains the expected value before the API block runs.
  • Check the variable reference used in the request.
  • Verify that the variable is mapped to the correct request field.
  • Check whether the API expects the value in the request body, header, or URL.
  • Test the API request and inspect the request payload and response.
Last modified on October 21, 2026