From the course: Developing Skills for AWS Alexa

Unlock the full course today

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

Handling interruptions by restoring intent state

Handling interruptions by restoring intent state - Amazon Web Services (AWS) Tutorial

From the course: Developing Skills for AWS Alexa

Start my 1-month free trial

Handling interruptions by restoring intent state

- [Narrator] So now it's time to put everything together and use the request interceptor to restore the state of the pizza order if we get interrupted. So here's what we're going to do. You've seen that every time that we test an intent request, all that JSON comes through that has all the information about the slots that have been filled. We want to save that information for every request. And then we're going to check every time a request comes through. Are you an intent that's incomplete? If you are, I'm going to check and see if there's saved information for the intent that we need to merge in to restore so that we can continue the dialogue that you had previously. If you look in the example files, you'll see a file called interceptor code dot text. This is a pretty big chunk of code, so rather than type it all in front of you, I'm going to copy it, and then we're going to go through it. Copy this code, and…

Contents