I need to add a confirmation entity so I get a 'Yes' or a 'Cancel' in the parameters of a certain operation in dialogflow (api.ai). Say a user is purchasing a coffee, I'd ask details about the coffee and the quantity and finally i need a confirmation, what entity should i apply for that? any tutorial that refers to the same will also be helpful.
DialogFlow has a concept called a follow-up intent that you could use in a case like this:
You would create a "yes" follow-up to capture if the user wants to proceed, a "no" to cancel, and a "fallback" to explain to the user what is happening and what are acceptable answers.
If you are working with Actions on Google, you could also use askForConfirmation which is done completely from within your webhook code.
You can choose the most appropriate way depending on how your code is structured.
The other way would be to create a confirmation entity and prompt for it in your intent.
Create entty: Create 2 rows, one for yes and another for no, with the appropriate synonyms.
Adding it as a parameter with the entity you just created, and add the appropriate prompt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With