Recognizing a returning user

A good bot can make users feel like they're talking to real AI (artificial intelligence) that has a distinct personality. However, when your bot starts the next conversation as if he never met that same user before, that personal connection is gone. That is why our platform enables you to treat returning users differently, by using saved variables from previous sessions.

Know 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 an 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 them 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 this), the bot can check whether it has talked to the user before, and redirect them to the right dialog accordingly.

How to build an If-statement:

  • If 'known_user_flag' is equal to 1, we know for certain that there has been a conversation before, otherwise this 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, our Choo-choo bot can reuse the values 'origin' and 'destination' from its previous user conversation 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:

This way, saved variables can provide returning users are more personalized experience.