ice_breakers
ReferenceIce Breakers provide a way for users to start a conversation with a business with a list of frequently asked questions. A maximum of 4 questions can be set via the Ice Breaker API.
Starting April 19th, 2022, Ice Breakers supports localization allowing businesses to set custom questions based on the user locale. The API will have a new format and we encourage developers to leverage the new format to set and retrieve Ice Breakers information. The list of supported locales can be found here.
Some profile elements, like Ice Breakers and the Get Started button, are incompatible with each other. When both are set, one will take precedence over the other. This is the order of precendence for the profile elements:
To set an Ice Breaker configuration, there are two formats for the POST request, existing and new.
One POST request can have the existing format OR the new format but not both.
curl -X POST -H "Content-Type: application/json" -d '{
"ice_breakers":[
{
"call_to_actions":[
{
"question":"<QUESTION>",
"payload":"<PAYLOAD>"
},
{
"question":"<QUESTION>",
"payload":"<PAYLOAD>"
}
],
"locale":"default" // default locale is REQUIRED
},
{
"call_to_actions":[
{
"question":"<QUESTION>",
"payload":"<PAYLOAD>"
},
{
"question":"<QUESTION>",
"payload":"<PAYLOAD>"
}
],
"locale":"en_GB"
}
]
}' "https://graph.facebook.com/v21.0
/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>"
curl -X POST -H "Content-Type: application/json" -d '{
"ice_breakers":[
{
"question": "<QUESTION>",
"payload": "<PAYLOAD>"
},
{
"question": "<QUESTION>",
"payload": "<PAYLOAD>"
},
...
]
}' "https://graph.facebook.com/v21.0
/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>"
Depending on how the Ice Breaker is setup, GET request will return a different format:
Developers should migrate to the new format as we will be deprecating the old format.
curl -X GET "https://graph.facebook.com/v21.0
/me/messenger_profile?fields=ice_breakers&access_token=<PAGE_ACCESS_TOKEN>"
{
"data": [
{
"call_to_actions" : [
{
"question": "<QUESTION>",
"payload": "<PAYLOAD>",
},
{
"question": "<QUESTION>",
"payload": "<PAYLOAD>",
},
],
"locale": "<LOCALE>",
},
{
"call_to_actions" : [
{
"question": "<QUESTION>",
"payload": "<PAYLOAD>",
},
{
"question": "<QUESTION>",
"payload": "<PAYLOAD>",
},
],
"locale": "<LOCALE>",
...
}
]
}
{ "data": [ { "ice_breakers": [ { "question": "<QUESTION>", "payload": "<PAYLOAD>" }, { "question": "<QUESTION>", "payload": "<PAYLOAD>" }, ... ] } ] }
This will delete ALL the ice breakers. Deletion of locale specific Ice Breakers will be enabled in the future.
curl -X DELETE -H "Content-Type: application/json" -d '{
"fields": [
"ice_breakers",
]
}' "https://graph.facebook.com/v21.0
/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>"
Response
{ "success": "true" }
Property | Type | Description |
---|---|---|
| String | Text that will be posted on the thread as the user asking the question. |
| String | Payload the will be returned as a postback webhook event |
API POST call to set up Ice Breakers in the New format
curl -X POST -H "Content-Type: application/json" -d '{
"ice_breakers":[
{
"call_to_actions":[
{
"question":"Where are you located?",
"payload":"LOCATION_POSTBACK_PAYLOAD"
},
{
"question":"What are your hours?",
"payload":"HOURS_POSTBACK_PAYLOAD"
}
],
"locale":"default"
},
{
"call_to_actions":[
{
"question":"What are your hours?",
"payload": "HOURS_POSTBACK_PAYLOAD"
},
{
"question":"Can you tell me more about your business?",
"payload": "MORE_POSTBACK_PAYLOAD"
},
{
"question":"What services do you offer?",
"payload": "SERVICES_POSTBACK_PAYLOAD"
}
],
"locale":"en_GB"
}
]
}' "https://graph.facebook.com/v21.0
/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN>"
MessengerプロフィールAPIへの呼び出し間隔は、10分あたり10回に制限されています。このレート制限はページごとに施行されます。