Conversational AI
  • Introduction
  • Getting started
    • Getting started
    • Adding content to your bot
    • Capture information with entities
    • Capture information with input validation
    • Reusing intents with context
    • Flow navigation with variables
    • Adding new users to your account
  • Understanding users
    • Natural Language Processing (NLP)
      • NLP threshold
      • NLP Import & Export
      • Train your bot with actual user messages
      • NLP Dashboard & NLP Improve
      • Synonym entities
      • System entities
      • Supported languages
      • Intent templates
    • Expression generator
    • Context
    • Multi-language bots
  • Bot answers
    • Bot dialogs
      • Message components
      • Go To
      • Input Validation
      • Action
      • Translations
    • Conversations
    • Analytics
      • User flow
    • Publishing your bot
    • Events
    • Reuse flows
    • Settings
      • Variables
  • Integrations
    • API integration
      • Advanced API integrations
    • Chat message structure for API's
    • Retrieving data from Airtable (GET)
    • Sending data to Airtable (POST)
    • Human handover & live chat
      • #Interact
      • RingCentral Engage Digital
      • Genesys Cloud
      • Help Scout
      • Zendesk Chat
      • Intercom
      • Sparkcentral (beta)
      • Offloading Webhook
  • Channels
    • Channels
    • Facebook Messenger
      • Facebook Admin Removal
      • Facebook Webview Whitelisting
    • WhatsApp Business API
    • Google Assistant
    • Webhook Channel API
    • Chat widget
    • Phone & voice
    • Workplace from Facebook
    • Sinch Conversation API (beta)
  • Tips & Best practices
    • How to NLP
    • Creating diverse expressions
    • Why is my bot not responding the way I want it to?
    • What makes a good chatbot?
    • How to recognize a returning bot user
    • Gathering user feedback
    • Using time in your chatbot
Powered by GitBook
On this page
  • Change the introduction to a Go to
  • Identify returning users with a 'known_user_flag' variable
  • Modify flow for returning users, leveraging saved variables

Was this helpful?

  1. Tips & Best practices

How to recognize a returning bot user

PreviousWhat makes a good chatbot?NextGathering user feedback

Last updated 4 years ago

Was this helpful?

A good bot can make users feel they're talking to a real 'artificial intelligence', with a distinct personality. However, when it starts the next conversation as if you've never met before, the illusion is gone.

Chatlayer.ai enables you to treat returning users differently, using saved variables from previous sessions.

Note that not all channels save variables the same way!

Facebook Messenger saves them indefinitely, but by default, the Webwidget only keeps variables for the duration of the session - unless authentication of unique users is built in.

Change the introduction to a Go to

Every conversation starts with the introduction dialog:

By default, this is a Bot message:

However, instead of greeting the user right away, we can first check whether the bot has talked to him before by converting the introduction into a Go to:

Identify returning users with a 'known_user_flag' variable

Using a variable 'known_user_flag' (feel free to rename in line with your naming conventions), the bot can check whether it has talked to the user before, and redirect to the right dialogs accordingly.

Build an If-statement as follows:

  • If 'known_user_flag' is equal to 1, we know for certain that there has been a conversation before - else the variable would be empty - so the user can be directed to an introduction dialog appropriate for returning users.

  • Else, if 'known_user_flag' is not defined, the user must be new, and can be redirected to an introduction for new users. At the same time, you can already set the 'known_user_flag' to 1, as the user is not new anymore. Alternatively, you can only change this value later on in the conversation, but changing it here is the most simple option.

Modify flow for returning users, leveraging saved variables

Simply having a modified introduction for returning users is already of great value:

However, you can really take the bot to the next level by also using other saved variables from previous encounters.

For example, the Choo-choo bot can use previous 'origin' and 'destination' values to suggest a new journey.

You'll first want to check whether any values have been saved:

...and if so, direct to a dialog using these variables:

Used this way, saved variables can provide returning users are more personalized and efficient experience!