Conversation Components

Conversations are a lot more than simple text messages when you are building a bot on the Messenger Platform. In addition to text, the Platform allows you to send rich-media, like audio, video, and images, and provides a set of structured messaging options in the form of message templates, quick replies, buttons and more. This is intended to be an overview of the components that are available for you to create your Messenger experience in-conversation.

In addition to these conversation components, the Messenger Platform supports a full webview that allows you to enrich your in-conversation Messenger experience by extending it to the web. For more information on using the webview, see Webview.

Available Conversation Components

Text Messages

Simple text is the foundation of any experience on Messenger, and is one of the most important tools at your disposal if you goal is to create a conversational experience. Try processing text messages with the Messenger Platform's built-in natural language processing (NLP) feature to handle all kinds of interactions with simple text.

Sending Text →

Assets & Attachments

In addition to text, the Messenger Platform allows you to send rich media assets as standalone messages or attached to structured message templates. Supported asset types included the following:

  • Audio
  • Video
  • Images
  • Files

Assets may be sent from a URL or your file system. For assets you intend to send multiple times, you may upload them in advance with the Attachment Upload API or upload them the first time they are sent with the Send API to eliminate the time and bandwidth overhead of uploading with each send. Saved assets are sent with an attachment_id that is assigned when they are uploaded.

Saving Assets →Sending Attachments →

Message Templates

Message templates are structured message types intended to support different use cases, and are useful for presenting information in-conversation that would be difficult to render or sloppy-looking with simple text. Templates also support buttons that extend their functionality.

The following message templates are available:

Message templates also support a set of buttons that add functionality, such as opening the webview, sending a postback to your webhook, sharing content, and more.

Sending Message Templates →Using Buttons →

Quick Replies

Quick Replies allow you present a preset set of options to the message recipient, which appear prominently above the composer. When a quick reply is tapped, the set is replaced with a single text message that is sent to your webhook. You may also add an image to a Quick Reply.

Sending Quick Replies →

Sender Actions

An important aspect of creating a Messenger bot is setting expectations. Sender actions are an important tool for accomplishing this that gives you the ability to programmatically control the standard Messenger typing, and read receipt indicators in-conversation. For example, when you begin processing a message, you might set the read receipt indicator so the person interacting with your bot knows their message has been seen, then you might set the typing indicator to show them that a response is in-progress.

Using Sender Actions →

Welcome Screen

The welcome screen is the first thing people see when they start a new conversation with your Messenger bot, and includes the name, description, profile picture and cover photo from your Facebook Page. You may also set optional greeting text for the welcome screen, which can be used to introduce the purpose of your bot.

A conversation with your bot begins when the get started button is tapped.

Configuring the Welcome Screen →

Persistent Menu

The persistent menu is an always-on user interface element that helps people discover and more easily access your bot's functionality throughout the conversation. This menu should contain top-level actions that a person can enact at any point. You may also optionally make the persistent menu the only way to interact with your bot by disabling the composer.

Setting the Persistent Menu →