One frustration many Alexa skill developers have is the rigidity of the interaction model. Sometimes your skill needs to get more than one piece of information from the user in order to fire its next function. Thankfully, the new Alexa dialog management tools allow for capture of multiple utterances in a single interaction.
In his recent post on the Amazon Developer Blog, Justin Jeffress says:
During Alexa Dev Days, my colleagues and I have been leading a voice design workshop that focuses on voice-first experience design and leans on dialog management to simplify collecting a set of required slots that an intent needs to perform its task for the user.
Recently an attendee asked me, “I need to get the user’s address based on zip code or city and state. Can I do that with dialog management?” The answer is, yes!
In that case, you’re looking for the condition A and B or C, where A is the zipcode, B is the city and C is the state. You can mark all 3 slots required and then hook into the state machine and jump out of dialog management if the condition has been met by setting the dialogState to COMPLETED and returning the slots.
New to Dialog Management?
Dialog Management tools are powerful, but they can be confusing and their use often demands that the developer have a basic grounding in state management. Here are some resource links that should help get you from zero to proficient with Alexa state and dialog management.
Using State Handlers in an Alexa Skill – YouTube video from Dabble Labs, includes links to sample code on github, plus a link to Dabble Labs’ free Alexa development course.
Tips on State Management at Three Different Levels – Written by Scott Dart for the Amazon Developer Blog.
Taking Control of the Dialog Management State Machine – Written by Justin Jeffress for the Amazon Developer Blog.
Using Dialog Management to Capture A and B or C Slots – Written by Justin Jeffress for the Amazon Developer Blog.
AWS Lambda Container Lifetime and Config Refresh – Written by Frederik Willaert on his LinkedIn blog.