The welcome screen is the first thing people see when they encounter your Messenger bot, and includes information that allows a person to learn about your bot and what it offers. The welcome screen displays the the name and responsiveness of your bot, the profile picture and cover photo from your Facebook Page, an optional greeting message, and the 'get started' button.
The welcome screen includes a 'get started' button, which starts a conversation with your Messenger bot when it is tapped. When a person taps the 'get started' button, the message 'get started' will be posted into the conversation, and your bot is then granted permission to send messages.
When the button is tapped, your webhook will receive a messaging_postbacks
event that contains a string specified by you in the get_started
property of your bot's Messenger profile. This postback should be used to trigger your initial welcome message, such as a set of quick replies, or a text message that welcomes the person.
To set the postback payload, send a POST
request to the Messenger Profile API:
curl -X POST -H "Content-Type: application/json" -d '{
"get_started": {"payload": "<postback_payload>"}
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>"
For complete details, see the get_started
property reference.
The greeting text on the welcome screen is your first opportunity to tell a person why they should start a conversation with your Messenger bot. Some things you might include in your greeting text might include a brief description of what your bot does, such as key features, or a tagline. This is also a great place to start establishing the style and tone of your bot.
You may provide default and localized greeting text.
To set the greeting text, send a POST
request to the Messenger Profile API:
curl -X POST -H "Content-Type: application/json" -d '{
"greeting": [
{
"locale":"default",
"text":"Hello!"
}, {
"locale":"en_US",
"text":"Timeless apparel for the masses."
}
]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>"
For complete details, see the greeting property
reference.
You can personalize the greeting text using the person's name. You can use the following template strings:
{{user_first_name}}
{{user_last_name}}
{{user_full_name}}
"greeting":[
{
"locale":"default",
"text":"Hello {{user_first_name}}!"
}
]