Chatlayer Documentation
Get in touchAbout Chatlayer
  • Welcome
  • What's new
  • Send feedback
  • start quickly
    • Leadzy tutorial
      • 0. Introduction
      • 1. New bot, new block
      • 2. Understand your users
      • 3. Collect and display user input
      • 4. Steer the conversation with Conditions
      • 5. Empower your bot with Actions
      • 6. Set up a channel and publish your bot
    • Templates
      • Banking
      • E-Commerce Returns
      • E-Bike Shop
      • E-Scooter Support
      • Feedback
      • Find Nearest Location
      • GPT
      • 🆕Gym
      • Job applications
      • Knowledge base AI template
      • Lead generation
      • 🆕NPS
      • Restaurant
      • Retail
  • navigation
    • Analytics
      • Dashboard
      • Customers
      • Conversations
      • User flow
      • Intents
      • 🆕Funnels [Beta]
    • Bot builder
      • Flows
        • Canvas functionalities
        • Collaborate with team members
        • Manage your flows
        • 🆕[Beta] Export and import flows
      • Bot dialogs view
      • Translations
      • Events
    • NLP
      • Dashboard
      • Intents
      • Expressions
      • Entities
      • Train
      • NLP settings
      • Improve
    • Knowledge base AI
      • Add content to your KBAI
      • Build your KBAI flow
      • Use your KBAI source URL in a button
      • Use tags to limit your KBAI content
      • 🆕Use Tables to store your KBAI questions
      • 🆕Manage handover where KBAI is unsatisfactory
    • History
      • Conversations
      • Execution logs
      • Versions
    • Channels
    • Tables
      • Create a table with records
      • Column types
      • Operate on your records
        • Insert record
        • Update record
        • Retrieve record
        • Delete record
      • API
    • Settings
      • Bot settings
      • Offloading
      • Variables
      • Voice
      • Import/Export
  • build your bot
    • Conversation design
      • Plan your bot
      • Conversation design workflow
    • Flow logic
      • Blocks
        • Message
        • Condition
        • Collect input
        • Action
      • Go-to connections
    • 🆕Emulator
    • Tips & best practices
      • Route your flow depending on the time
      • Improve the Not understood block
        • How to create better not understood messages
        • Not understood counter
        • Not understood Google search
      • Go to previous block
      • Recognizing a returning user
      • Skip introduction message
      • Route your flow depending on the channel
      • Reuse flows
      • Connect two bots to each other
  • understand users
    • Natural language processing (NLP)
      • Basic NLP concepts
      • Detect information with entities
        • Match entities
        • Contextual entities
        • System entities
        • Composite entities
      • NLP best practices
        • Word order and diversity of expressions
      • AI intent booster
      • Train your NLP
      • Context
      • NLP import & export
      • Sentiment analysis
    • Languages
      • Supported languages
      • Make your bot multilingual
      • Change language within the conversation
  • set up channels
    • Add a channel to your bot
    • All channels
      • 🚨Facebook Messenger [Deprecated soon]
        • Facebook Admin Removal
        • Facebook Webview Whitelisting
        • Facebook Messenger API updates for Europe
      • 🚨Google Assistant [Deprecated soon]
      • Webhook
      • Web
        • 🚨Web V1 [Deprecated]
          • Customize web widget
          • Live example web widget
        • 🆕Web V2
          • 🆕From Web V1 to V2
          • 🆕Web V2 methods and options
    • Sinch Conversation API
      • Configure your Sinch Conversation API
      • 🆕 Make the most of RCS with Carousels
      • WhatsApp Business API
  • integrate & code
    • API calls
      • Configure your API integration
      • Advanced API features
      • V1 API Reference
      • Custom integrations 101
    • Code editor
      • [Example] Sending data to Airtable (POST)
      • [Example] Retrieving data from Airtable (GET)
      • [Example] Making SOAP requests
    • App integrations
      • Airtable
      • Freshdesk
      • Freshdesk Messaging
      • 🆕Gmail
      • Intercom
      • Mailgun
      • OpenAI: GPT-3, ChatGPT and GPT-4
      • Salesforce
      • 🆕Slack
      • Topdesk
      • Zendesk Support
      • Zendesk Sunshine (beta)
    • 🆕Expression syntax
    • Human handover & live chat
      • Sinch Contact Pro
      • #Interact
      • Genesys Cloud
      • Offloading Webhook
      • Salesforce Service Cloud
      • Sparkcentral by Hootsuite
      • Zendesk Chat
    • Chatlayer messages specifications
  • Publish
    • Publish your bot
      • Publish a flow
  • Analyze & maintain
    • Analytics definitions
    • Data retention
    • Maintenance
    • Session
    • Track events for analytics
  • VOICE
    • 🆕Send bot response as audio
    • Voicebots
      • Create a voicebot
      • Voicebot-specific actions
      • Test your voicebot
      • From chat to voice
  • access & support
    • Identity & Access
      • Single Sign-On (SAML SSO)
    • Billing & subscription
    • Get in touch
    • Chatlayer glossary
    • SaaS Regions & IP Ranges
    • Status
    • Debug your bot
      • No correct response
      • Collect input not working
      • Video isn't working
Powered by GitBook
On this page
  • Create a variable
  • Set a variable as sensitive
  • Operations on variables
  • Increment
  • Change the case

Was this helpful?

  1. navigation
  2. Settings

Variables

The Variables page is where you have an overview of all your variables.

PreviousOffloadingNextVoice

Last updated 11 months ago

Was this helpful?

Variables are used to store any information the bot knows about a user. This can be their preferred language, or the channel they're using, but also information coming from external data sources like, for example, an API.

All variables used in a single conversation are stored in what is called a .

Create a variable

To create a variable from the Variables page:

  1. Click on Create variable at the top right corner of the screen.

  1. A window pops up. Fill in the Name, Default value and Description.

For example, a default value can be used for URL path ensures the chatbot can always fetch data or interact with external services correctly.

Note that default values are:

  • Limited to string data types.

  • Exported with the bot export. It means that variables along with their default values will be overwritten at import.

  • If a variable has a default value on the LIVE version, publishing won't change it. If not, the DRAFT version's default value will be copied to the LIVE version.

  1. Click on Create variable.

Set a variable as sensitive

Chatlayer allows you to make sure that some variables are processed differently. This is useful when the conversation between a bot and a user contains sensitive information, such as the user's bank account number or anything GDPR-sensitive.

To define a variable as sensitive:

  1. Toggle on the Sensitive switch if you don't want this variable to be saved in the conversation history.

  2. Click on Create variable.

Operations on variables

You can perfom operations on your variables.

Increment

If you want to incrementally increase the value of a variable, you can use the following steps:

  1. Define a variable, for example variableName, and give it a numeric value such as 0

  2. At the point in the flow where you want to increment the value of variableName, enter variableName as the variable and {variableName|increment} as the value

This method will increase the value of counter by 1 each time, for example when a specific block is passed or a button is clicked.

Change the case

Variables and values are case-sensitive.

For example, capitalVariable will be regarded as a separate variable fromCapitalVariable.

You can transform a value from upper case to lower case and vice versa by adding these modifiers to the value name:

{name|toUpperCase}
{name|toLowerCase}
{name|capitalize}

If you use a action, the value for a variable will be reset to its default value if it had been modified during the session.

If you set your variable as sensitive, its value will never be shown in Chatlayer. Instead, users will see a placeholder. The real variable value can only be retrieved through an .

or edit it using the Edit button.

Incrementing a variable can be typically useful when you want to count how many times the user wasn't understood by the bot. Learn how to build a Not Understood Counter .

The same goes for values. If you check in a block if a value for variableX is equal to valueY it will not be triggered if the value for variableX is equal to valuey

Note that allows you to get the flexibility to use code syntax functions in your bot without the need of extensive coding skills.

API request
here
Condition
Expression syntax [Beta]
Create a variable
user session
Clear session
The Variables pageL
Create a variable from the Variables page
Example of a variable with a default value to call an API endpoint.
Create a sensitive variable from the Variables page.