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!
 
+ [*] get in touch [*]
* <get _platform> = twilio => Text me at this number anytime!
* <get _platform> = facebook => Message this url anytime!
* <get _platform> = slack => DM me @botname anytime!
- Message me here anytime!

Available Namespace Variables

Variable Name Platforms Description Example Values
_platform All Platform the user has messaged the bot from: web, Facebook, Slack, etc. facebook, slack, twilio, twitter, alexa, web, tester
_platformId All A unique identifier for the user on a platform. On Slack this is team_id or user_id. 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 (with full capitalization and punctuation.) "Incoming Text!!!""
_userFirstName Facebook, Slack Pulls first name from user's platform profile Peter
_userLastName Facebook, Slack Pulls last name from user's platform profile Chang
_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 +15551234567
_userGender Facebook only Pulls user-provided gender from user's platform profile male
_userLocale Facebook only Pulls user-provided locale from user's platform profile en_US
_userTimezone Facebook only Pulls user-provided timezone from user's platform profile -7
_teamId Slack only Slack team id T50SFT690
_teamName Slack only Slack team name company
_channelId Slack only Channel id of user's last incoming message D5NQ4EBFD
_channelName Slack only Channel name of user's last incoming message general
_firstMsgSent All UNIX epoch timestamp (ms) of the first message the user has sent to the bot 1512168059231
_lastMsgReceived All UNIX epoch timestamp (ms) of the first message the user has received to the bot 1512168059231
_lastMsgSent All UNIX epoch timestamp (ms) of the last message that the user has sent to the bot 1512168059231
_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 20.7301011,-64.0072211
_fbRefSource Facebook If param is passed through m.me link, referral source is stored in this namespace variable. (Messenger app must have messaging_referrals event. See the Facebook referrals page.) SHORTLINK, ADS, MESSENGER_CODE, DISCOVER_TAB
_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.) 6045246247433