Menu Variables

When creating menus, you may want to customize the message templates of your menus and submenus to the current user. You can do this using template variables.

Currently there are three categories of variables: user, menu and  attributes. 

User Variables

User variables let you use placeholders for data we get from the messaging platform about your users (or data that you set with Update User tasks). User variables start with "user" followed by a period and the variable name, like this: {{user.user_name}}

Here are the available variables for user (not not all variables will have data for all users or an all platforms):

User Name ({{user.user_name}}
User First Name {{user.user_first_name}}
User Last Name {{user.user_last_name}}
User Timezone {{user.user_timezone}}
User Locale {{user.user_locale}}
User Gender {{user.user_gender}}

Menu Variables

Menu variables let you reference aspects of the current menu. 

Here are the available variables for menu:

Label ({{menu.label}}
External ID {{menu.external_id}}
Description {{menu.description}}
ID {{menu.id}}
Short ID {{menu.shortId}}

Attribute Variables

Attribute variables let you reference any custom attribute you have set on the user so far. This is very powerful, as it allows you to provide summary data of a users current state, update welcome messages, and more from within your flows and then show that data on your menu pages.

Attribute variables are addressed like this {{attributes.VariableName}}

For example, if you have a user attribute called Email, you can display this in a message template with {{attributes.Email}}

NOTE: To reference attributes in message templates they cannot have any spaces in the names. {{attributes.My Variable}} won't work, but {{attributes.MyVariable}} or {{attributes.My_Variable}} will.

Still need help? Contact Us Contact Us