From the course: Developing Skills for AWS Alexa

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Handling yes/no questions

Handling yes/no questions - Amazon Web Services (AWS) Tutorial

From the course: Developing Skills for AWS Alexa

Start my 1-month free trial

Handling yes/no questions

- [Instructor] Now that we know how to save user data permanently, let's put that ability to good use. When the user has finished a pizza order, we want to follow up with a question: "Do you want to save this order as the usual?" So let's go to the OrderPizzaIntentHandler. The first part's easy. Go to the end of the speech text and add a question: Would you like to save this order as, do double quotes, the usual, question mark. Okay, now at this point, all we want is for the user to answer yes or no. And there are a few ways we could do this. One you might consider is slot elicitation. We can add a single intent whose only purpose is to save the user's favorite pizza order. It could have a single slot which is their response and in the handler, we check that slot, and we'd see: is it yes or is it no? However, having a single slot as a sample utterance for an intent is going to get you into trouble. If for no other…

Contents