Shortcode: ^buttons() / ^buttonsSlack()

Adds buttons to your bot's response, giving them a list of pre-supplied options to choose from when continuing the conversation.

^buttons(label1, label2, label3...) / ^buttonsSlack(label1, label2, label3...)

Parameter Sample Value Description
label1, label2, label3... "Operating Hours", "Services", "Prices" At least one label required. Comma-separated list of buttons to present to your user.

Example Usage

+ help
- How can I help you? ^buttons("Operating Hours", "Services", "Prices")
+ operating hours
- We are open 24/7.
+ services
- We provide a wide variety of services, ranging from doodads to thingamajigs.
+ prices
- Our policy is name-your-own-price!


Before you are able to press buttons in any attachment and expect a payload to return to your bot, you must follow the linked Slack configuration steps for Interactive Messages.

How It Looks

Platform Notes How It Looks
  • Inserts Facebook Quick Replies
  • Each label can only have 20 characters
  • You can have 11 buttons max
  • Clicking a Quick Reply mimics the behavior of a user typing out the label message
  • See the below section on making use of the newly available Quick Replies in Dexter.
  • Using ^buttons() will lead to buttons represented as keywords for your users to respond with
  • Using ^buttonsSlack() will result in clickable buttons that return payloads.
  • You must follow the configuration steps for Interactive Messages for these buttons to return payloads that reach triggers.
  • Inserts Twitter Quick Reply Options
  • Learn more about Twitter integrations

Details (SMS/Twilio)

There is no concept of "buttons" over text messaging, but as seen in the screenshot above, Dexter renders these in ALL CAPS preceded with a [1] number for your users' convenience. If you are building a bot with buttons and launching over SMS, we strongly recommend that you support these numerical shortcuts in your triggers as well.

If you wanted to support SMS as a platform in the example above, it could look like:

+ help
- How can I help you? \n\n Select from the following:\n
^buttons("Operating Hours", "Services", "Prices")
+ (1|operating hours)
- We are open 24/7.
+ (2|services)
- We provide a wide variety of services, ranging from doodads to
+ (3|prices)
- Our policy is name-your-own-price!
Learn more about using \n as line breaks.

Facebook Quick-Replies

Use Facebook Quick replies to present a set of up to 11 buttons in-conversation. Dexter now supports the following quick reply types:

Text Quick-Reply

To include a text quick-reply, make use of the ^buttons() shortcode with a list of text options, like the examples above.

Additionally, you can now embed images into your text quick-reply buttons:

Images in Quick Replies

+ i want to eat
- What would you like to eat? ^buttons("hamburger", "pizza", "hot dog", {"images": {"hamburger": "", "pizza": "", "hot dog": ""}})
Location Quick-Reply

To prompt the user for their location, make use of the ^fbLocationPrompt() shortcode or use the user_location option in the ^buttons() shortcode: ^buttons(user_location).

Phone Number Quick-Reply

To prompt the user for their phone number, use the user_phone_number option in the ^buttons() shortcode: ^buttons(user_phone_number).

Email Quick-Reply

To prompt the user for their email, use the user_email option in the ^buttons() shortcode: ^buttons(user_email).

Multiple Quick-Reply Types

Easily combine multiple quick-reply types like so:

Combine Quick Reply Types

+ where is the closest bank
- For me to send you your closest bank, I need your location: ^buttons(user_location, Provide Zip Code)