Reputation: 9289
i am using dialogflow and using the fb messenger as a channel. the response type i am using is card.
what i am seeing is that when user taps on the button it sends the button title rather the postback text.
is it expected or a bug?
the diagnostic info looks like
{
"responseId": "8c263e39-5159-4f24-913f-e558b35e4dde",
"queryResult": {
"queryText": "contains egg",
"action": "CakeOrder.CakeOrder-custom",
"parameters": {
"CakeType": "Contains Egg"
},
"allRequiredParamsPresent": true,
"fulfillmentText": "choose a cake flavor",
"fulfillmentMessages": [
{
"card": {
"title": "Vanilla",
"imageUri": "http://homecookingadventure.com/images/recipes/caramel_mirror_cake_main.jpg",
"buttons": [
{
"text": "Customize",
"postback": "vanilla"
}
]
},
"platform": "FACEBOOK"
},
{
"card": {
"title": "Chocolate",
"imageUri": "https://food.fnr.sndimg.com/content/dam/images/food/fullset/2012/12/20/0/FNM_010113-Smores-Cake-Recipe_s4x3.jpg.rend.hgtvcom.616.462.suffix/1371611980872.jpeg",
"buttons": [
{
"text": "Customize",
"postback": "chocolate"
}
]
},
"platform": "FACEBOOK"
},
{
"text": {
"text": [
"choose a cake flavor"
]
}
}
],
"outputContexts": [
{
"name": "projects/doodlesbot/agent/sessions/1c33ba93-6b0b-4346-b20d-398400c4273c/contexts/cakeorder-caketype-followup",
"lifespanCount": 2,
"parameters": {
"CakeType.original": "contains egg",
"CakeType": "Contains Egg"
}
},
{
"name": "projects/doodlesbot/agent/sessions/1c33ba93-6b0b-4346-b20d-398400c4273c/contexts/cakeorder-followup",
"lifespanCount": 1,
"parameters": {
"CakeType.original": "contains egg",
"CakeType": "Contains Egg"
}
}
],
"intent": {
"name": "projects/doodlesbot/agent/intents/f0ba9fbd-0ac6-4683-b304-c61c44afd75a",
"displayName": "CakeOrder - CakeType"
},
"intentDetectionConfidence": 1,
"diagnosticInfo": {},
"languageCode": "en"
}
}
Upvotes: 0
Views: 525
Reputation: 335
I assume you found out, but postback is for your back-end developer to process. It isn't what the user actually sends back in text form.
The title of your quick reply is your payload, in other words what the user actually sends as a response. Your payload is something you can use to help differentiate which option the user picks and then do certain tasks like redirect to another intent or respond with a follow-up.
Upvotes: 1