In this video https://youtu.be/ADD-rvsS5z4?t=927 the presenter demo the creation of a bike shop appointment booking app. The presenter uses Follow up intents to ask user what type of appointment ("Service" or "Repair"?). Can we not do this through having appointment type as a REQUIRED parameter, under the parent intent. I guess the question then becomes, what's the difference between using Follow up intent and setting a parameter as required?
They are two sides of slightly different coins. Each has uses and tradeoffs, and which one you choose to use depends on how your conversation is structured.
First - always remember that an Intent is meant to capture what the user has said. Not what we are saying or doing with that information.
Required parameters determine what needs to be included in the message from the user. If the parameter is not provided by their statement, they can include a prompt that we will give to get that information.
However, sometimes parameters are only required if other parameters are included, or aren't set. For example, you may find it useful for the user to either say "I'd like an appointment tomorrow morning" or "I'd like an appointment at 10 am tomorrow". "Morning" and "10am" are two different parameters (one is more specific than the other), but you would like one or the other expressed. This can't be done using required parameters.
But if it is omitted, we can use fulfillment to prompt the user for more information. For example, we could then ask "Do you want it in the morning, afternoon, or at a particular time?" and then have followup intents setup to capture this reply. But followup intents aren't perfect, either.
What if the user replies with a question, such as "when is available in the morning?" Could our followup intent confuse this with a reply? Quite possibly. Or there might be some additional back and forth before they specify a time. In cases like these, you don't want narrow followup intents, but you do want broader conversational intents that could be triggered at any point in the conversation, but still retain the context of the appointment that is trying to be set.
For these reasons, I tend to suggest that you not worry too much about either required parameters or followup intents. While both have some specific uses, more generally, having other intents that can handle these same questions is best. You can make sure the most appropriate ones are triggered by setting Contexts for when they will be valid. (Followup Intents use Contexts under the covers.)
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