Last updated: 21 April 2021 

Variables allow you to capture data from your chatbot users as they progress through conversations. 

In the advanced settings, you can tailor your variables to provide a range of extra personalisation or make use of advanced features. 

Variable scopes 

Variable scopes inform the chatbot whether the data gathered applies to all users or is unique to the chatbot user that provided it. 

You can choose from two different variable scopes, they are as follows: 

  1. Subscriber scope - the data gathered is unique to the user that provided it and shouldn't be applied to else. For example, a first name or email. 

  2. Client scope - the data gathered should be applied to all users of your chatbot. For example, if the user provides an API token. 

By default, variables are set as subscriber scope (without you needing to change anything in the advanced settings tab). 

Data types

Variables can be set as three different data types, each with unique uses and functionality. 

Store API response

This variable will store the value returned from an integration.

Let’s say you have a conversation set up to capture a user’s email address, then use the email address to look up that user in your external CRM and return their first name.

This variable type allows you to do that.

Also works with values returned from a spreadsheet integration.

Copy existing variable

This variable will store the value from another existing variable.

You can use this variable type to capture a snapshot of various existing variables at a point in time in the conversation.

Let’s say you have a customer service conversation set up and you would like to know at what time a user has requested help. This value is usually stored in an existing variable called {{current_time}}.

You can use this variable type to take a snapshot of {{current_time}} into another variable, for safe storage and reporting.

Use the current URL

This variable allows you to store the page URL the user is on.

Let’s say you are creating a lead generation conversation. You would like to know on which page the conversation resonates more with your users, example.com/pricing or example.com/service. By using this variable type, you can store that value and use this data to compare performances.