In Dialogflow CX I'm generating a series of cards in Dialogflow Messenger using a custom payload. Each card has a button that correctly triggers a custom event in the agent when clicked.
What I cannot find documentation on, is how to include parameters when the button is clicked. In Dialogflow ES I recall being able to do this with events in the messenger.
Is this even possible using Dialogflow Messenger? To pass back a unique ID based on a generated card?
I could use chips, but they wouldn't look very good with a hex ID on them eg "More details for property d4g1c9"
I've trawled through stackoverflow and other sources and not found an answer on this yet, so thank you in advance to anyone who has some insights!
Here's a snippet of the JSON I use to generate the cards and button.
{
"richContent":[
[
{
"type":"image",
"rawUrl":"https://seanmaddison.uk/images/luxury-art-deco-apartment-interior.jpg",
"accessibilityText":"Primary image"
},
{
"type":"description",
"title":"ABC Tower apartment",
"text":[
"Line 1",
"Line 2",
"Line 3",
"Line 4"
]
},
{
"type":"button",
"icon":{
"type":"chevron_right",
"color":"#FF9800"
},
"text":"More details",
"event":{
"name":"more_details_event",
"parameters":{
"selectedPropertyId":"999888"
}
}
}
],
[
{
"type":"image",
"rawUrl":"https://seanmaddison.uk/images/apartment2.jpg",
"accessibilityText":"Primary image"
},
{
"type":"description",
"title":"Torch Tower 3BR",
"text":[
"Line 1",
"Line 2",
"Line 3",
"Line 4"
]
},
{
"type":"button",
"icon":{
"type":"chevron_right",
"color":"#FF9800"
},
"text":"More details",
"event":{
"name":"more_details_event",
"parameters":{
"selectedPropertyId":"111222"
}
}
}
]
]
}```