Request Demo
Request Demo

Answers your bot already knows

There is a lot that your bot already knows about a person you are chatting with. These are published as Global variables that you can call like other variables you define within the chat. Besides knowing more about the user’s details, you can use the same variables within your chatflow dialogue or pass this to webhook for further transactions. Here is a list of these global variables:

Variable How to call in chat flow Example format
IP Address vars.GLOBAL.ip (IPv4) OR 2001:0db8:0000:0042:0000:8a2e:0370:7334 (IPV6)
IP Type vars.GLOBAL.type ipv4 or ipv6
Country Name vars.GLOBAL.country_name United States
Country Code vars.GLOBAL.country_code US
Region Name vars.GLOBAL.region_name California
Region Code vars.GLOBAL.region_code CA
City Name Los Angeles
Zip Code 90001
Latitude vars.GLOBAL.latitude 11.0123
Longitude vars.GLOBAL.longitude 22.0123
Continent Name vars.GLOBAL.continent_name North America
Continent Code vars.GLOBAL.continent_code NA
Geoname ID vars.GLOBAL.location.geoname_id 5368361
Capital Washington D.C
Language* English
Native Language vars.GLOBAL.location.languages.0.native English
Language Code vars.GLOBAL.location.languages.0.code en
Country Calling code vars.GLOBAL.location.calling_code 1
Timezone Name America/Los_Angeles
Current Time vars.GLOBAL.time_zone.current_time 2018-03-29T07:35:08-07:00
Timezone code vars.GLOBAL.time_zone.code PDT
Country currency US Dollar
Currency code vars.GLOBAL.currency.code USD
Currency in Plural vars.GLOBAL.currency.plural US Dollars
Currency Symbol vars.GLOBAL.currency.symbol $
Native Currency Symbol vars.GLOBAL.currency.symbol_native $
Current URL  vars.GLOBAL.bot_url

* This is an array and more languages may appear, which can be accessed by incrementing the ordinal in the end.

Variable How to call in chat flow Example format
First Name vars.fb_user.first_name John
Last Name vars.fb_user.last_name Wick
Profile Picture URL vars.fb_user.profile_pic
Gender vars.fb_user.gender male or female
Locale vars.fb_user.locale Locale of the user on Facebook. Example: en_US. For supported locale codes, see Supported Locales.
Timezone vars.fb_user.timezone Timezone, number relative to GMT. Example -7 or 5.5
Page Specific User ID The user’s PSID

Read more about these available fields here.