Hi! Im kinda new with Dialogflow CX and i'm trying to develop a chatbot with custom payload as Agent reponses when a parameter is empty.
At this moment this chat is integrated with google talk.
I have a parameter called "p_segmento" in a page that uses a created entity as entity type with the required box checked.
I added an Agent reponses with custom payload to display a button with the correct value.
Here is the full json code:
{
"cardsV2": [
{
"cardId": "seleccionsegmento",
"card": {
"sections": [
{
"widgets": [
{
"buttonList": {
"buttons": [
{
"text": "Cemento",
"onClick": {
"action": {
"function": "$session.params.p_segmento",
"parameters": [
{
"value": "Cemento",
"key": "$session.params.p_segmento"
}
]
}
}
}
]
}
}
]
}
]
}
}
],
"text": "Indique qué segmento desea consultar, puede seleccionar una opción de la lista o ingrese un texto:"
}
I need to store the selected value from the custom payload into the parameter "p_segmento" when the user clicks on it, but I don't know how to do it. It only works when I type the value.
As you can see in the json code, I tried to add some options in the "action" section, but it is not working.
Is there a way to do this ? Thanks in advance!
Are you perhaps looking for this fulfilment ?
"The info response type is a simple title card that users can click or touch."