Dexter Namespace Variables

As you may recall, Dexter bots can save data to their brain and use this data in future responses. Data can be saved to any variable name, except for any names with an underscore preceding it, like _firstName.

We’ve reserved this syntax for Dexter’s use, but some of these variables are available for use within <get> directions only in your script:

Example Usage

+ whats my name
- Hi <get _userFirstName>, you’re unforgettable!

Available Namespace Variables

Variable Name Platforms Description
_platform All Platform the user has messaged the bot from: web, Facebook, Slack, etc.
_platformId All A unique identifier for the user on a platform. On Slack this is <teamid>|<userid>. On Twilio, it is a phone number. On other platforms, it is a platform specific user ID.
_rawMsgText All Original incoming user input before text is parsed to match trigger
_userFirstName Facebook, Slack Pulls first name from user's platform profile
_userLastName Facebook, Slack Pulls last name from user's platform profile
_userFullName Facebook, Slack, Twitter Pulls full name from user's platform profile or concatenates first and last name values.
_userProfilePic Facebook, Slack, Twitter Pulls url of profile image from user's platform profiles
_userScreenName Twitter Pulls the screen name of the user (Twitter only)
_userPhone Slack, Twilio Phone number of user, if available
_userGender Facebook only Pulls user-provided gender from user's platform profile
_userLocale Facebook only Pulls user-provided locale from user's platform profile
_userTimezone Facebook only Pulls user-provided timezone from user's platform profile
_teamId Slack only Slack team id
_teamName Slack only Slack team name
_channelId Slack only Channel id of user's last incoming message
_channelName Slack only Channel name of user's last incoming message
_firstMsgSent All UNIX epoch timestamp (ms) of the first message the user has sent to the bot
_lastMsgReceived All UNIX epoch timestamp (ms) of the first message the user has received to the bot
_lastMsgSent All UNIX epoch timestamp (ms) of the last message that the user has sent to the bot
_mediaUrl Facebook, Twilio URL of the most recent media attachment that a user has sent to the bot. Bot creator can choose to respond to an incoming media attachment by adding a response to the trigger with the term: __media__. Learn more about responding to media.
_mediaType Facebook, Twilio Type of latest media attachment: image, audio, video, file
_mediaTypeDetailed Twilio MIME type of latest media attachment: image, audio, video, file
_fbLatLong Facebook Stores latitude/longitude of user's location response to the ^fbLocationPrompt shortcode
_fbRefSource Facebook If param is passed through m.me link, referral source (SHORTLINK, ADS, MESSENGER_CODE, DISCOVER_TAB) is stored in this namespace variable. (Messenger app must have messaging_referrals event. See the Facebook referrals page.)
_fbRefParam Facebook If query param is passed through m.me link, param value is stored in this namespace variable. (Messenger app must have messaging_referrals event. See the Facebook referrals page.)
_fbRefAdId Facebook If param is passed through m.me link for an AD, id for incoming Facebook ad is stored in this namespace variable. (Messenger app must have messaging_referrals event. See the Facebook referrals page.)