I'm relatively new to Dialogflow and I'm trying to create a healthcare diagnosis voice chatbot that would work as follow.
User Experience
System Setup
The Question
What is the best way to break that multiple-choice question into single "yes/no" questions? Given that I'm dealing with a voice chatbot, I can't play 10 questions to the caller in a row and expect them to answer them correctly. I have to send one question at a time to the caller.
My initial thought is that I would need to create some kind of session management in my webhook server, so that it can send one question/response at a time and keep track of their answers. However, given that Dialogflow is already doing session management, that kind of sounds redundant. My preference would be for my webhook server to remain stateless and to extract all data I need from the context object in the webhook request.
I don't want to hard code all possible triage questions as “required parameters” inside of an intent. Instead, I want the third-party API provider to handle the content/questions for obvious reasons.
An ideal solution would be if there was a way for my fulfilment webhook server to provide a dynamic list of required parameters to the intent on a per session basis. In other words, the webhook response would include a list of required parameters and a question/text for each parameter. The intent would then use this list to prompt the caller one question at a time.
I don't think this is possible, but it I guess it doesn't hurt to try... Most likely, I will have to do some session management and prompt flow control in my webhook server. However, I'm open to any new ideas or recommendations you may have.
You're on the right track. Although you can't dynamically create prompts for Dialogflow to ask, you can store the information you need to ask in a Context and, as they answer the previous question, check the Context for what else you need to ask and ask the next question on the list.
This scheme might look something like this:
Your server remains stateless - all the state it needs for the next question is in the "triage" Context
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