Reputation: 3703
I'm building an action for AoG using Dialogflow, using node.js as the fulfillment webhook.
I use suggestions and carousels in my app and want to respond to when a user clicks. My current implementation uses dialoglow's fallback, and then I check the payload manually for rawInputs.inputType="TOUCH"
for suggestions and intputs.intent=actions.intent.OPTION
for carousels. I'm looking for a more elegant way to do so with dialogflow and the webhook.
Does anyone know if there's a way to either:
Upvotes: 4
Views: 374
Reputation: 50701
Suggestion chips cannot be detected through Dialogflow directly - they are treated just like the user said or typed the chip that was selected.
However, you can detect that a carousel option has been selected. You can't determine which carousel item is selected in Dialogflow, you need to do that in your fulfillment webhook.
You can create an Intent which does not have any training phrases set, but which will trigger on an Event named actions_intent_OPTION
(based on the native Intent name, but with the periods replaced by an underscore).
Upvotes: 5