Alexa Blogs Alexa Developer Blogs /blogs/alexa/feed/entries/atom 2018-11-15T15:44:56+00:00 Apache Roller /blogs/alexa/post/17c3452a-34fd-414e-8577-ba56ca64716c/insider-s-guide-to-alexa-at-aws-re-invent The Insider’s Guide to Alexa at AWS re:Invent Jennifer King 2018-11-15T15:00:00+00:00 2018-11-15T15:00:00+00:00 <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/reInvent-2018_blog.png._CB481776984_.png" style="height:480px; width:1908px" /></p> <p>Whether you’re attending AWS re:Invent in person or following re:Invent activities from home, here’s a short insider’s guide to help you get the most out of Alexa.</p> <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/reInvent-2018_blog.png._CB481776984_.png" style="height:480px; width:1908px" /></p> <p>In less than two weeks, <a href="https://reinvent.awsevents.com/" target="_blank">AWS re:Invent</a> will kick off in Las Vegas. If you’re attending re:Invent in person, check out these top <a href="https://developer.amazon.com/blogs/alexa/post/77eed6f6-b755-47f0-8395-781e9ba5cf95/alexa-sessions-you-won-t-want-to-miss-at-aws-re-invent-2018">Alexa sessions you won't want to miss</a> and <a href="https://developer.amazon.com/blogs/alexa/post/e0e1bf71-a8ae-4c08-b983-ee1ddf8efe29/what-the-alexa-team-is-looking-forward-to-at-aws-re-invent">tips from the Alexa team</a> on how to get the most from the re:Invent experience.</p> <p>There’s something for anyone at re:Invent who’s interested in voice technology, with <a href="https://www.portal.reinvent.awsevents.com/connect/search.ww#loadSearch-searchPhrase=&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;p=&amp;i(10042)=10487">more than 50 Alexa technical sessions</a> that include hands-on workshops, interactive chalk talks, and technical breakout sessions. Attendees will learn to design voice experiences and dive deep into the technology behind the Alexa Skills Kit, Alexa Voice Service, and Alexa smart home. In addition to the technical sessions, there will be a variety of re:Invent activities for you to experience Alexa at the event.</p> <p>Here’s a short insider’s guide to help you get the most out of Alexa at re:Invent, whether you’re attending re:Invent in person or following re:Invent activities from home.</p> <h2>#ExperienceAlexa at the Alexa Stations</h2> <p>This year the Alexa team will delight attendees and encourage them to experience Alexa skills throughout the conference. Meet the Alexa team and participate in our #ExperienceAlexa activities at each station:</p> <ul> <li><strong>Giant Echo Stations:</strong> Visit the Giant Echo stations, located at the Aria, Venetian, and MGM, to play with new Echo devices and engage with Alexa skills. For a chance to earn exclusive developer perks, attendees can tweet about their most memorable Alexa experience and include a selfie with the Giant Echo and the #ExperienceAlexa hashtag.</li> <li><strong>Alexa Booth:</strong> Stop by the Alexa Booth in the Exhibit Hall for the opportunity to talk with Alexa team members, <a href="https://developer.amazon.com/alexa-skills-kit/multimodal">try popular multimodal skills</a>, and engage with a variety of Alexa devices. To participate in the #ExperienceAlexa activity at the event, try an Alexa skill on our newest devices and share your feedback with the Alexa team at the booth.</li> <li><strong>Alexa Kiosk:</strong> Visit the Alexa Kiosk in the AWS Village to meet the Alexa team. AWS re:Invent attendees can participate in the #ExperienceAlexa activity by completing a questionnaire at the kiosk to tell us about their skill-building experience.</li> </ul> <p>Learn more about the #ExperienceAlexa activities <a href="https://developer.amazon.com/alexa-skills-kit/alexa-at-aws-reinvent">here</a> and follow us on <a href="https://twitter.com/alexadevs?lang=en" target="_blank">Twitter</a> and <a href="https://www.facebook.com/AlexaDevs/" target="_blank">Facebook</a> for live updates.</p> <h2>Participate in Alexa Hack Day</h2> <p>In addition to attending the technical sessions, attendees can participate in <a href="https://reinvent.awsevents.com/learn/hackathon/" target="_blank">Alexa Hack Day</a>,<strong> </strong>an 8-hour hackathon that challenges developers and designers to build voice-driven experiences. Participants can build whatever type of voice experience they’d like–it can be a voice-first game, a personal life hack, an Alexa skill that helps a community, or a voice experience specific for businesses. Integrate the skill with your favorite AWS service and other APIs. The opportunities for what you can build are endless. All you need is an Amazon developer account (sign up for one for free <a href="https://developer.amazon.com/" target="_blank">here</a>), an AWS account, and your laptop.</p> <p>If you've never built an Alexa skill, our team will help you get started with skill-building basics. You can also follow this <a href="https://developer.amazon.com/blogs/alexa/post/a1080dd9-2a28-46b8-8fce-1dfd556b50ff/how-to-build-your-first-alexa-skill-5-steps-to-get-started">step-by-step guide</a> to create your first Alexa skill and check out our <a href="https://developer.amazon.com/alexa-skills-kit/sdk">software development kits</a> for Java, Node.js, and Python. If you’re attending AWS re:Invent and want to participate in the hackathon, register <a href="https://www.portal.reinvent.awsevents.com/connect/search.ww?trk=www.google.com,www.google.com#loadSearch-searchPhrase=&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;sessionTypeID=1040&amp;p=" target="_blank">here.</a></p> <h2>Sign Up for an Alexa Builders Session</h2> <p>The Alexa team is also hosting 60 <a href="https://reinvent.awsevents.com/learn/builders-sessions/" target="_blank">Builders Sessions</a>, which are 60-minute small group sessions with up to five customers and one AWS/Alexa expert who is there to help, answer questions, and provide skill-building guidance. Below are a few general Builders Session topics to choose from, but Alexa experts can cover any subject you may have questions about:</p> <ul> <li><a href="https://www.portal.reinvent.awsevents.com/connect/search.ww#loadSearch-searchPhrase=ALX307&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;sessionTypeID=1781&amp;p=&amp;i(10042)=10487" target="_blank">Build Your First Alexa Skill</a></li> <li><a href="https://www.portal.reinvent.awsevents.com/connect/search.ww#loadSearch-searchPhrase=ALX308&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;sessionTypeID=1781&amp;p=&amp;i(10042)=10487" target="_blank">Add Screen Support to an Alexa Skill</a></li> <li><a href="https://www.portal.reinvent.awsevents.com/connect/search.ww#loadSearch-searchPhrase=ALX309&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;sessionTypeID=1781&amp;p=&amp;i(10042)=10487" target="_blank">Add In-Skill Purchasing to an Alexa Skill</a></li> <li><a href="https://www.portal.reinvent.awsevents.com/connect/search.ww#loadSearch-searchPhrase=ALX310&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;sessionTypeID=1781&amp;p=&amp;i(10042)=10487" target="_blank">Speed Up Alexa Skill Development with the ASK Command-Line interface (CLI)</a></li> <li><a href="https://www.portal.reinvent.awsevents.com/connect/search.ww#loadSearch-searchPhrase=ALX311&amp;searchType=session&amp;tc=0&amp;sortBy=abbreviationSort&amp;sessionTypeID=1781&amp;p=&amp;i(10042)=10487" target="_blank">Designing the Voice User Interface for an Alexa Skill</a></li> </ul> <h2>Get the AWS re:Invent Experience at Home</h2> <p>If you’re not planning to attend AWS re:Invent but want to get in on the experience, tune into the <a href="https://www.twitch.tv/amazonalexa" target="_blank">Amazon Alexa Twitch channel</a> throughout the conference. Each day Alexa evangelists will be streaming live interviews with professional skill builders, session recaps with speakers, and live coding sessions to bring the re:Invent experience to developers at home. Follow our <a href="https://www.twitch.tv/amazonalexa" target="_blank">Twitch channel</a> to get notified when our streams go live.</p> <p>In addition to following along on Twitch, connect with Alexa on <a href="https://twitter.com/alexadevs?lang=en" target="_blank">Twitter</a>, <a href="https://www.facebook.com/AlexaDevs/" target="_blank">Facebook</a>, and <a href="https://www.linkedin.com/showcase/amazon-alexa-developers/" target="_blank">LinkedIn</a>. Join the conversation at AWS re:Invent using the #ExperienceAlexa hashtag.</p> <h2>Related Content</h2> <ul> <li><a href="https://developer.amazon.com/blogs/alexa/post/e0e1bf71-a8ae-4c08-b983-ee1ddf8efe29/what-the-alexa-team-is-looking-forward-to-at-aws-re-invent">What the Alexa Team Is Looking Forward to at AWS re:Invent</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/77eed6f6-b755-47f0-8395-781e9ba5cf95/alexa-sessions-you-won-t-want-to-miss-at-aws-re-invent-2018">Alexa Sessions You Won’t Want to Miss at AWS re:Invent 2018</a></li> </ul> /blogs/alexa/post/96ed32e8-64de-4630-aac0-961bdd5d7cbc/why-writing-a-script-is-the-best-way-to-design-for-conversation Why Writing a Script Is the Best Way to Design for Conversation Jennifer King 2018-11-14T15:00:00+00:00 2018-11-14T16:16:53+00:00 <p>In the new Designing for Conversation course, we explain why scripting is a valuable step when designing any voice experience.</p> <p>Conversational design hinges on customers being able to easily interact with your skill to get information in a way that makes sense for them. Doing this right requires you to think about the many ways a customer could interact with your skill and then identify the way to facilitate the best interaction possible.</p> <p>To do this, your options are to:</p> <ol> <li>Go the route of the phone tree, or create flowcharts to try to capture the ways customers might interact with your skill.</li> <li>Start with a script.</li> </ol> <p>You might be thinking that flowcharting sounds like a more comprehensive way to <a href="https://developer.amazon.com/ask-resources/guided/conversational-design-workshop" target="_blank">design for conversation</a>, but that's actually not the case. Let me show you why:</p> <p>SCENE — <em> Jed's living room. There are bills all over the coffee table and cat toys strewn across every other surface. Jed stands in the middle of the chaos holding his phone up on speaker phone.</em></p> <p style="margin-left:40px"><strong>Recording:</strong> Hello! Please listen carefully as our options have changed ...</p> <p style="margin-left:40px"><strong>Jed (internally)</strong>: Oh no.</p> <p style="margin-left:40px"><strong>Recording: </strong>To hear every individual bank employee's name in alphabetical order, press 1.</p> <p style="margin-left:40px"><strong>Jed's wife (speaking over the recording from other room): </strong>Honey, did you call the bank yet?</p> <p style="margin-left:40px"><strong>Recording:</strong> For our banking schedule for Tuesdays, Thursdays, and every other Friday, please press 2.</p> <p style="margin-left:40px"><strong>Recording:</strong> If you want to open our new extra-awesome, triple-exclusive credit card, press 3.<br /> <br /> <strong>Jed (shouting over recording to wife)</strong>: Doing it now!</p> <p style="margin-left:40px"><strong>Recording:</strong> To hear these options again press 4 ...</p> <p style="margin-left:40px"><strong>Jed (saying to himself):</strong> None of those options are helpful. How do I talk to an actual person? <em>*presses 4*</em></p> <p style="margin-left:40px"><strong>Recording:</strong> Hello! Please listen carefully as our options have changed ...</p> <p>END SCENE</p> <p>You get the idea. From the second we hear the robotic voice on the other end of a call, most of us are smashing the zero button hoping to reach a person and circumvent what will inevitably end in frustration and wasted time. We know what we want and don't want to have to do is guess the right number based on options that don't really fit our needs.</p> <p>The same issue pertains to conversational design, but times 1,000. In a conversation, whether with a friend or Alexa, we expect the flow of information to be fluid and responsive. Consider the fact that, when speaking with a friend, you have the ability to change subjects at will. You can even respond to a question with another question:</p> <p style="margin-left:40px"><strong>Jed:</strong> What should we get for lunch?</p> <p style="margin-left:40px"><strong>Jed's wife:</strong> I don’t know. What do you want?</p> <p>This kind of variability and agency on the part of the user makes designing branching pathways for conversation extremely difficult because the possible branches are endless. In the above conversation between Jed and his wife, what happens later when, after making a decision on Mexican food, Jed changes his mind? If you were designing a branching conversation with him about his restaurant choices, the branch of the conversation for what type of food he wants now needs to be duplicated and subtly changed to account for the new possibility. There just isn't enough time or paper out there to chart all the conversational possibilities!</p> <p>On the other hand, there are several benefits to starting with scripts when designing for conversation. First, a script represents the simplest “happy path” interaction your users can have. This is the scenario where they say exactly what you hope they'll say and you're able to help them accomplish whatever task they've set out on. You need to know this in order to shape your skill conversationally.</p> <p>Second, a script allows you to read out your skill's dialog. The written word is vastly different from the way we speak. Grab a friend or colleague and read your script aloud to expose awkward sounding words or phrases.</p> <p>Third (and most relevant), scripts enable you to prepare for the unexpected. With your happy-path script written out, you can read through it to identify places where users might want to say something different and plan accordingly.</p> <p>As you read through your script, put yourself in the shoes of different people who might use your skill (your personas) and read the script with their situations and motivations in mind. Chances are, you'll identify how assumptions change the conversation based on each persona. Each time this happens, write what the persona said in the margins.</p> <p>With a happy path script covered in flow-breaking utterances, your next task will be leveraging the conversation-enabling features of the <a href="https://developer.amazon.com/alexa-skills-kit">Alexa Skills Kit</a> to handle them. With the <a href="https://developer.amazon.com/alexa-skills-kit">Alexa Skills Kit</a>, designers and developers have the ability to tap into natural language understanding and entity resolution, enabling users to just say what they want to get from the skill, rather than selecting a number from a branching menu.</p> <p>To learn more about <a href="https://developer.amazon.com/ask-resources/guided/conversational-design-workshop#/lessons/4ayCJLArlkBW5eVc_0EVP7hXjXh321vs?_k=9j4n9s">script writing</a> and adding flexibility to your voice experiences, visit the <a href="http://alexa.design/4conversation" target="_blank">designing for conversation</a> course. Take a look today and get started designing the next big idea for voice!</p> <h2>Related Content</h2> <ul> <li><a href="https://developer.amazon.com/blogs/alexa/post/b0609d07-1e60-44a1-bcd8-cd3eff29f014/new-alexa-skills-training-course-designing-for-conversation">New Alexa Skills Training Course: Designing for Conversation</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/d0b80741-ae85-4b75-b8ba-9c9c009c35c3/a-primer-on-communication-creating-conversational-transactions-when-designing-for-voice">A Primer on Communication: Creating Conversational Transactions When Designing for Voice</a></li> <li><a href="https://developer.amazon.com/alexa-skills-kit/dialog-management">Build Advanced Alexa Skills Using Dialog Management</a></li> <li><a href="https://www.codecademy.com/learn/alexa-conversational-design" target="_blank">Codecademy: Conversational Design with Alexa</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/3c36c980-665a-4afc-974d-86797281a5cc/why-conversational-design-matters-4-hallmarks-of-conversational-skills">Why Conversational Design Matters: 4 Hallmarks of Conversational Skills</a></li> </ul> <h2>Build Skills, Earn Developer Perks</h2> <p>Bring your big idea to life with Alexa and earn perks through our <a href="https://developer.amazon.com/alexa-skills-kit/alexa-developer-skill-promotion">milestone-based developer promotion</a>. US developers, publish your first Alexa skill by October 31, 2018, and earn the new Echo Dot. Publish a skill for Alexa-enabled devices with screens and earn an Echo Spot. Publish a skill using the Gadgets Skill API and earn a 2-pack of Echo Buttons. If you're not in the US, check out our promotions in <a href="https://developer.amazon.com/alexa-skills-kit/alexa-developer-skill-promotion-canada">Canada</a>, the <a href="http://developer.amazon.com/en-gb/alexa-skills-kit/alexa-developer-skill-promotion" target="_blank">UK</a>, <a href="http://developer.amazon.com/de/alexa-skills-kit/alexa-developer-skill-promotion" target="_blank">Germany</a>, <a href="https://developer.amazon.com/ja/alexa-skills-kit/alexa-developer-skill-promotion">Japan</a>, <a href="https://developer.amazon.com/fr/alexa-skills-kit/alexa-developer-skills-promotion">France</a>, <a href="https://developer.amazon.com/alexa-skills-kit/anz/alexa-developer-skill-promotion">Australia</a>, and <a href="http://developer.amazon.com/alexa-skills-kit/alexa-developer-skill-promotion-india" target="_blank">India</a>. <a href="https://developer.amazon.com/alexa-skills-kit/alexa-developer-skill-promotion">Learn more</a> about our promotion and start building today.</p> /blogs/alexa/post/ca34b954-1c5d-4a59-b326-f45c8df7c89c/alexa-skill-tech-for-good-challenge-winners Announcing the Winners of the Alexa Skills Challenge: Tech for Good Jennifer King 2018-11-13T22:21:39+00:00 2018-11-13T22:21:39+00:00 <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/TechForGood_blog._CB472139295_.png" style="height:480px; width:1908px" /></p> <p>After more than three months of hard work from Alexa developers around the world, the Alexa Skill Challenge: Tech for Good has concluded.&nbsp;Last week, we held our final judging event to determine the grand prize winner of this challenge from the 10 finalists selected.</p> <p><a href="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/TechForGood_blog._CB472139295_.png"><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/TechForGood_blog._CB472139295_.png" style="height:480px; width:1908px" /></a></p> <p>After more than three months of hard work from Alexa developers around the world, <a href="https://alexatechforgood.devpost.com/">the Alexa Skill Challenge: Tech for Good</a> has concluded. The challenge invited developers to build Alexa skills that would have a positive impact on the environment, local communities, and the world. Last week, we held our final judging event to determine the grand prize winner of this challenge from the <a href="https://developer.amazon.com/de/blogs/alexa/post/be927fa4-eb4f-464b-b0fa-97de225fc18c/tech-for-good-challenge-finalists">10 finalists selected</a>.</p> <p>All of the skills we reviewed addressed a wide range of customer problems through the creative use of community engagement, specific calls to action, third-party resources, and more. On top of the great work everyone accomplished, the grand prize winner will also have the opportunity to direct a $20,000 donation from Amazon to <a href="https://alexatechforgood.devpost.com/details/nonprofits">one of 11 non-profit organizations</a>.<em> </em></p> <p>Ultimately, our panel of judges chose the winners based on their creativity and originality, a great voice-first user experience, and the skill’s potential impact for engagement and habitual use. The judging committee was comprised of five Amazon employees and two external community members:</p> <p><u>Judges from Amazon included:</u></p> <ul> <li><a href="https://www.linkedin.com/in/beatricegeoffrin/">Beatrice Geoffrin</a>, Director, Alexa Experience and Devices; and</li> <li><a href="https://www.linkedin.com/in/karahartnetthurst/">Kara Hurst</a>, Director, Worldwide Sustainability;</li> <li><a href="https://www.linkedin.com/in/carlettaooton/">Carletta Ooton</a>, VP, Health, Safety, Sustainability, Security, and Compliance;</li> <li><a href="https://www.linkedin.com/in/alice-shobe-6167476/">Alice Shobe</a>, Director, Amazon in the Community (AITC); and</li> <li><a href="https://www.linkedin.com/in/aaronlamar/">Aaron Wilson</a>, Principal Product Manager, Alexa Skills Kit.</li> </ul> <p><u>Judges from the community included:</u></p> <ul> <li><a href="https://www.linkedin.com/in/vgriffith/">Victoria Griffith</a>, Senior Program Officer, Bill &amp; Melinda Gates Foundation; and</li> <li><a href="https://www.linkedin.com/in/juan-lozano-27a3822/">Juan Lozano</a>, Career and Technical Education lead at Highline School District and Professional Development Facilitator at Code.org.</li> </ul> <h2>And the Winners Are…</h2> <p><strong>Grand Prize&nbsp;($10,000 and direct a $20,000 donation to <a href="https://alexatechforgood.devpost.com/details/nonprofits">one of 11 non-profit organizations</a>):</strong> <strong><a href="https://devpost.com/software/world-mathematics-league">World Mathematics League</a></strong> creates a global, interactive mathematics league. Customers from around the world can participate in 15 minutes of daily math questions to contribute to the score for their state or country. <a href="https://www.amazon.com/Shanthan-Kesharaju-World-Mathematics-League/dp/B07HH96SWZ">Try World Mathematics League</a>.</p> <p><strong>Bonus Prize – Best Circular Economy Skill ($5,000):</strong> <strong><a href="https://devpost.com/software/recycling-center-finder">Recycling Center</a></strong> allows customers to easily find local recycling centers for specific items they may want to discard such as batteries or lightbulbs. <a href="http://www.amazon.com/gp/product/B07HLZJFJ6">Try Recycling Center</a>.</p> <p><strong>Bonus Prize – Best Sustainable Transportation Skill ($5,000):</strong> <a href="https://devpost.com/software/transportme"><strong>Transport Me</strong></a> allows you to search for nearby bike shares across multiple providers within a 1.25-mile radius. <a href="http://www.amazon.com/gp/product/B07HH952RV">Try Transport Me</a>.</p> <p><strong>Bonus Prize: Best Natural Resource Efficiency Skill ($5,000):</strong> <a href="https://devpost.com/software/cool-my-house"><strong>Cool My House</strong></a> taps into the National Weather Service API to let customers know if windows can be open to cool their house rather than using powered AC. <a href="https://www.amazon.com/Nibroc-Productions-Cool-My-House/dp/B07HF9SXYV/">Try Cool My House.</a></p> <p><strong>Bonus Prize – Best Disaster Relief Skill ($5,000):</strong> <a href="https://devpost.com/software/alexa-safe-and-well"><strong>Safe and Well</strong></a> allows anyone to check on the status of close relatives or friends they may know in impacted areas. The skill ties in directly with <a href="https://safeandwell.communityos.org/cms/index.php">American Red Cross’ Safe and Well API</a>. <a href="https://www.amazon.com/MMCR-Safe-and-Well/dp/B07HVHSP6W">Try Safe and Well</a>.</p> <p><strong>Bonus Prize – Best STEM Education Skill ($5,000):</strong> <a href="https://devpost.com/software/code-by-voice"><strong>Voice Coder</strong></a> allows you to discover computer science by building your own mini game by creating new rules through Alexa and seeing the results on a computer display. <a href="https://www.amazon.com/Jimmy-Dickinson-Voice-Coder/dp/B07HFWQPKN/">Try Voice Coder</a>.</p> <p><strong>Bonus Prize – Best Skill by University or High-School Students in US or Canada ($2,000):</strong> <a href="https://devpost.com/software/gluco-buddy"><strong>Gluco Buddy</strong></a> integrates with <a href="https://developer.dexcom.com/">Dexcom API</a> to let customers receive a daily and weekly summary of their blood glucose levels to let them better manage their daily lives. <a href="https://www.amazon.com/TECH-MATTERS-INC-Gluco-Buddy/dp/B07HLT4KC6/">Try Gluco Buddy.</a></p> <p><strong>Bonus Prize – Best Use of Open-sourced Data ($2,000):</strong> <a href="https://devpost.com/software/cool-my-house"><strong>Cool My House</strong></a> taps into the <a href="https://www.weather.gov/">National Weather Service API</a> to let customers know if windows can be open to cool their house rather than using powered AC. <a href="https://www.amazon.com/Nibroc-Productions-Cool-My-House/dp/B07HF9SXYV/">Try Cool My House.</a></p> <p><strong>Bonus Prize – Best Skill for Echo Show &amp; Echo Spot ($2,000):</strong> <a href="https://devpost.com/software/the-recycle-game"><strong>The Recycle Game</strong></a> allows you to compete for the title “Champion of the Environment” among friends and family by tracking of your recycling practices. <a href="https://www.amazon.com/DaysFly-The-Recycle-Game/dp/B07GB7YCZ7/ref=sr_1_1?s=digital-skills&amp;ie=UTF8&amp;qid=1542128083&amp;sr=1-1&amp;keywords=recycle+game">Try The Recycle Game.</a></p> <p><strong>Bonus Prize – Best Alexa Voice Service (AVS) Integration ($2,000): <a href="https://devpost.com/software/compost-professor">Compost Professor</a> </strong>allows customers to manage their composting efforts by tracking the temperature. Users can supplement the skill with build-it-yourself sensors and an AVS-enabled tablet that reads results at the press of a button. <a href="https://www.amazon.com/Darian-Johnson-The-Compost-Professor/dp/B07HM58P8L/">Try Compost Professor</a>.</p> <p><strong>Bonus Prize – Best Use of Advanced Alexa Developer features ($2,000):</strong> <a href="https://devpost.com/software/my-talking-newspaper-l0ewfy"><strong>My Talking Newspaper</strong></a> gives voice access to more than 500 talking newspapers and magazines in the UK, providing spoken-word local news and information to anyone who may be blind, partially sighted, or have any kind of print impairment. <a href="https://www.amazon.com/Talking-Newspaper-Services-Ltd-My/dp/B0798S22FS">Try My Talking Newspaper</a>.</p> <p><strong>Bonus Prize – Best Global English Skill ($2,000):</strong> <a href="https://devpost.com/software/evie-assistant"><strong>EVIE Assistant</strong></a> allows you to search for electric charging stations nearby using a city name in the US, UK, and Canada.&nbsp;<a href="https://www.amazon.com/Smart-Home-Bloke-Evie-Assistant/dp/B07GWBDR93">Try EVIE Assistant</a>.</p> <p>Congratulations, everyone!</p> <h2>Stay Connected with the Alexa Developer Community</h2> <p><a href="https://build.amazonalexadev.com/Get_the_Latest_Alexa_Developer_News.html?&amp;sc_category=Owned&amp;sc_channel=WB&amp;sc_campaign=Blog&amp;sc_publisher=Alexa_Blog&amp;sc_content=Content&amp;sc_funnel=Discover&amp;sc_country=WW&amp;sc_medium=Owned_WB_Blog_Alexa_Blog_Content_Discover_WW_Unknown&amp;sc_segment=Unknown" target="_blank">Sign up to receive announcements from Amazon Alexa</a> to learn about upcoming challenges and Alexa developer news. You can also read more on our website about <a href="https://www.aboutamazon.com/sustainability" target="_blank">Amazon's Sustainability</a> efforts and <a href="https://www.aboutamazon.com/our-communities" target="_blank">Amazon In the Community</a>.</p> /blogs/alexa/post/80d6dbee-87cc-4ba6-906e-aa17ff1d4a5c/use-new-slot-validation-to-simplify-dialog-management Use New Slot Validation to Simplify ASK Dialog Management BJ Haberkorn 2018-11-13T18:46:39+00:00 2018-11-13T19:00:38+00:00 <p><img alt="" src=" https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/slot_validation_blog.png._CB479730393_.png" style="height:480px; width:1908px" /></p> <p>Now Alexa can automatically re-prompt your users who provide unacceptable slot values in delegated dialogs.</p> <p><img alt="" src=" https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/slot_validation_blog.png._CB479730393_.png" /></p> <p>We’re excited to announce slot validation, a new Alexa Skills Kit (ASK) dialog management feature available for developers to use in all ASK locales. When you enable slot validation for dialogs that you delegate to Alexa, Alexa will check slot values collected against an acceptable set you define, and automatically re-prompt users who provide a response outside that set. As a result, you can eliminate validation and re-prompting code in your skill back end. This simplifies your development and results in a more consistent experience for customers.</p> <h2>Use Dialog Management to Manage Multi-Turn Conversations</h2> <p>Dialog management makes it easier for your skill to handle variations of conversation, conditional collection of data, and context switching, without losing track of what’s being said. Dialog management keeps track of the slots that you tell it to collect, and uses a state machine to manage the state of the conversation, including what information has and hasn’t been collected. You can either delegate the dialog to Alexa, using the Dialog.Delegate directive, or control each step of the dialog yourself, using Dialog.ElicitSlot, Dialog.ConfirmSlot, and Dialog.ConfirmIntent. You can learn more in the <a href="https://build.amazonalexadev.com/alexa-skill-dialog-management-guide-ww.html">Alexa Skill Builder’s Guide: Advanced Skill Building with Dialog Management</a>.</p> <h2>Let Alexa Validate Slots for You</h2> <p>The new slot validation feature is available for dialogs that you delegate to Alexa. With slot validation, you define rules that specify the acceptable values for a slot, along with specific prompts for eliciting a new value. You can set relative and absolute range validations for number and date/time slots, and enumerated lists of values to allow or exclude for list and custom slots. For custom slots, you can also allow only values specifically enumerated in your custom values and synonyms. When a user speaks a slot value that does not meet your validation criteria, the prompts you define will be used by ASK dialog management to ask for a new value.</p> <p style="text-align:justify">For example, if your skill has a list of color options that includes “red,” “green,” and “blue,” you can configure slot validation to only accept these colors from the user. If a user tells your skill, “I want the color orange,” slot validation will reply with the prompt you provide for this rule, such as, “We only have red, green, and blue. Which of these would you like?” When the user replies with an acceptable color option, the dialog will proceed to the next step. If the user fails to provide a valid slot after two re-prompts, the skill session will end.</p> <h2>Learn More and Get Started Today</h2> <p>Slot validation is available in all locales supported by Alexa, and is available through the skill builder in the Alexa Developer Console and Skill Management API (SMAPI). To learn how to use slot validation in your skills, read the&nbsp;<a href="https://developer.amazon.com/blogs/alexa/post/c605b7d1-9953-4c90-b049-1ad7b86ef816/building-conversational-alexa-skills-validating-slots-with-dialog-management">Building Conversational Alexa Skills: Validating Slots with Dialog Management</a>&nbsp;blog and our <a href="https://developer.amazon.com/docs/custom-skills/validate-slot-values.html">Validate Slot Values documentation</a>.</p> <h2>Related Resources</h2> <ul> <li><a href="https://developer.amazon.com/docs/custom-skills/validate-slot-values.html">Validate Slot Values</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/dbceb5dd-3c4d-40f1-be22-172f4050fbcb/building-conversational-alexa-skills-how-to-dynamically-elicit-slots-based-on-a-previous-answer-using-dialog-management">How to Dynamically Elicit Slots Based on a Previous Answer Using Dialog Management</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/efd1fd50-84fe-4e48-97e2-a61ad0612bc3/building-conversational-alexa-skills-confirming-slots-with-dialog-management">Confirming Slots with Dialog Management</a></li> <li><a href="https://developer.amazon.com/alexa-skills-kit/dialog-management">Build Advanced Alexa Skills Using Dialog Management</a></li> <li><a href="https://build.amazonalexadev.com/alexa-skill-dialog-management-guide-ww.html">Guide: Advanced Skill Building with Dialog Management</a></li> </ul> /blogs/alexa/post/c605b7d1-9953-4c90-b049-1ad7b86ef816/building-conversational-alexa-skills-validating-slots-with-dialog-management Building Conversational Alexa Skills: Validating Slots with Dialog Management Jennifer King 2018-11-13T18:45:41+00:00 2018-11-13T18:49:04+00:00 <p>In this technical post, I build upon the coffee shop skill and share how you can simplify dialog management with the new slot validations feature.</p> <p>In my previous post <a href="https://developer.amazon.com/blogs/alexa/post/efd1fd50-84fe-4e48-97e2-a61ad0612bc3/building-conversational-alexa-skills-confirming-slots-with-dialog-management">on confirming slots with dialog management</a>, I walked through extending our coffee shop sample skill to dynamically confirm a slot with the <strong>Dialog.ConfirmSlot</strong> directive. If the customer orders <strong>coffee</strong>, our skill's back end returns the <strong>Dialog.ElicitSlot</strong> directive to elicit the <strong>flavor</strong> slot. The <strong>flavor</strong> costs $0.50 so we use the <strong>Dialog.ConfirmSlot</strong> directive to seek confirmation of the additional charges.</p> <p>At the end of the post, I pointed out that there could be a potential problem. What if the user asked for water? That's still a drink, but what if they asked for baseball, unicorns, or lamp? We're going to have to reprompt the customer to provide us with valid value.</p> <p>We're going to need to do something to validate the data. I also encouraged you to think about how you would solve the problem on your own. I asked, what handlers would you need? How would you re-elicit the slot? What dialog directives would you need?</p> <p>To solve this problem, I would have created a helper function that given a slot and a set of rules returns true if the slot value is valid. Then I would have created a handler that would determine if a given slot value was invalid and, if so, re-elicit the slot using the <strong>Dialog.ElicitSlot</strong> directive. However, earlier this week, <a href="https://developer.amazon.com/blogs/alexa/post/80d6dbee-87cc-4ba6-906e-aa17ff1d4a5c/use-new-slot-validation-to-simplify-dialog-management">we announced slot validations for dialog management</a>, which means we actually don't need to write any code as long as our skill is returning the <strong>Dialog.Delegate</strong> directive. What line of code never breaks, never needs to be tested and never needs to be rewritten? Answer: the line of code you never wrote!</p> <p>Before we go too deep into slot validation with dialog management, let's recap the coffee shop skill.</p> <h2>Recap: The Coffee Shop Skill</h2> <p>Our coffee shop skill allows the customer to order <strong>coffee</strong> or <strong>tea</strong>. Based upon their <strong>drink</strong> of choice, the skill either asks what kind of coffee roast (<strong>coffeeRoast</strong>) or type of tea (<strong>teaType</strong>) they want. Furthermore, if they ordered coffee, the skill uses the <strong>Dialog.ElicitSlot</strong> directive, to ask the customer if they want to add a <strong>flavor</strong>. They can turn down a flavor by saying, &quot;no thanks.&quot; But if they choose a flavor, the skill uses the <strong>Dialog.ConfirmSlot</strong> directive to seek confirmation of an additional $0.50 for adding the flavor.</p> <p>Let's take a look at how we would update our coffee shop skill to automatically validate and prompt for our drink slot if the customer choose an invalid option without any additional code.</p> <h2>Setting Up Your Skill’s Interaction Model</h2> <p>Now that the slot validation feature has been released, the build tab in the <a href="https://developer.amazon.com/alexa/console/ask">developer portal</a> has been updated so you can add turn on validations. From the <strong>OrderIntent</strong>, select the <strong>drink</strong> slot and you'll see two tabs labeled, one labeled <strong>Dialogs</strong> and the other <strong>Validations</strong>. Click on the <strong>Validations</strong> tab and you will be able to create validations rules for your slot.</p> <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/slot_validation_interaction_model_image.png._CB479978418_.png" style="display:block; height:379px; margin-left:auto; margin-right:auto; width:1000px" /></p> <p>There are three validation rules you can choose from:</p> <ol> <li>Accept only a set of values</li> <li>Reject only a set of values</li> <li>Accept only Slot Type's values and synonyms</li> </ol> <p>These rules help you dictate how to validate the slot value. For our coffee shop skill, we'll use the third option, &quot;Accept only Slot Type's values and synonyms.&quot; This option allows us to define synonyms and have the validator use those in addition to the values to validate what our customer has said.</p> <p>Upon selecting that option, we'll need to draft some prompts that Alexa will say to re-elicit the slot. To do that, let's think about what Alexa would say if the <strong>drink</strong> slot was <strong>shoes</strong>:</p> <ul> <li><code>I'm sorry but shoes is not something we offer. Which would you like coffee or tea?</code></li> <li><code>Whoops. I'm afraid we don't serve shoes. Which would you like coffee or tea?</code></li> <li><code>Oops! Shoes is not an option. Which would you like, coffee or tea?</code></li> <li><code>Sorry but shoes is not an option. Which would you like, coffee or tea?</code></li> </ul> <p>While looking through the examples, you may have noticed that each example includes, &quot;Which would you like, coffee or tea?&quot; We include this as the prompt that Alexa will ask the customer when re-eliciting the <strong>drink</strong> slot. The other thing that these examples have in common is the mention of &quot;shoes.&quot; This is a best practice since we are using an implicit confirmation to communicate to the customer that we heard what they asked for, but it's not a valid choice. When we define our samples, how do we repeat our customer's invalid selection without knowing what they'll say ahead of time? Simple: we use the slot. In this case we are validating the <strong>drink</strong> slot so we'll use that in our sample utterances:</p> <ul> <li><code>I'm sorry but {drink} is not something we offer. Which would you like, coffee or tea?</code></li> <li><code>Whoops. I'm afraid we don't serve {drink}. Which would you like, coffee or tea?</code></li> <li><code>Oops! {drink} is not an option. Which would you like, coffee or tea?</code></li> <li><code>Sorry but {drink} is not an option. Which would you like, coffee or tea?</code></li> </ul> <p>Now that we've converted the sample utterances and added them to our model, we'll save and build the model.</p> <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/dm_slots_second_image.png._CB479978380_.png" style="display:block; height:749px; margin-left:auto; margin-right:auto; width:800px" />While we don't have to write any additional code to do the validation checks, our skill needs to return the <strong>Dialog.Delegate</strong> directive in order to have the Alexa service automatically validate and re-elicit the slot if the slot is invalid.</p> <h2>Updating Your Skill’s Back End</h2> <p>We need to return the <strong>Dialog.Delegate</strong> directive. Our skill's handler functions check for a variety of use cases. Remember our <strong>StartedInProgressOrderIntentHandler</strong> handler? It's <strong>canHandle</strong> function returns true if:</p> <p>request.type <strong>equals</strong> IntentRequest request.intent.name <strong>equals</strong> OrderIntent request.dialogState <strong>not equals</strong> COMPLETED</p> <p>The handle function returns the <strong>Dialog.Delegate</strong> directive, which is exactly what we need to have Alexa handle validating the <strong>drink</strong> slot for us. Therefore, our back end is complete and we don't need to update our code.</p> <p>Translated to code, our <strong>StartedInProgressOrderIntentHandler</strong> appears below:</p> <pre> <code class="language-javascript">const StartedInProgressOrderIntentHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.dialogState !== 'COMPLETED'; }, handle(handlerInput) { return handlerInput.responseBuilder .addDelegateDirective() .getResponse(); } }</code></pre> <p><strong>Note: </strong>Dialog management validations only support the <strong>Dialog.Delegate </strong>directive, so if you return a <strong>Dialog.ElicitSlot</strong> directive, the validations won’t be run on the slot that was elicited. For example, since we use <strong>Dialog.ElicitSlot</strong> to elicit flavor after we receive a value for <strong>coffeeRoast</strong>, validations will not be run on <strong>Dialog.ElicitSlot</strong>.</p> <p>Now that you've read through this post, try to think about how you can put these techniques and features to use in your own skills. Let's continue the discussion online! You can find me on Twitter <a href="https://twitter.com/sleepydeveloper">@SleepyDeveloper</a>.</p> <h2>Related Resources</h2> <ul> <li><a href="https://developer.amazon.com/docs/custom-skills/validate-slot-values.html">Validate Slot Values</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/80d6dbee-87cc-4ba6-906e-aa17ff1d4a5c/use-new-slot-validation-to-simplify-dialog-management">Use the Slot Validation to Simplify Dialog Management</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/dbceb5dd-3c4d-40f1-be22-172f4050fbcb/building-conversational-alexa-skills-how-to-dynamically-elicit-slots-based-on-a-previous-answer-using-dialog-management">How to Dynamically Elicit Slots Based on a Previous Answer Using Dialog Management</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/efd1fd50-84fe-4e48-97e2-a61ad0612bc3/building-conversational-alexa-skills-confirming-slots-with-dialog-management">Confirming Slots with Dialog Management</a></li> <li><a href="https://developer.amazon.com/alexa-skills-kit/dialog-management">Build Advanced Alexa Skills Using Dialog Management</a></li> <li><a href="https://build.amazonalexadev.com/alexa-skill-dialog-management-guide-ww.html">Guide: Advanced Skill Building with Dialog Management</a></li> </ul> /blogs/alexa/post/5d08880b-2a89-44e3-b5c2-8ebed1b0511d/steven-arkonovich-adds-in-skill-purchasing-to-personalize-alexa-skills-and-boost-his-voice-business Steven Arkonovich Adds In-Skill Purchasing to Personalize Alexa Skills and Boost His Voice Business Jennifer King 2018-11-13T16:00:00+00:00 2018-11-13T16:00:00+00:00 <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/Steve_A_Blog_Header.png._CB479747321_.png" /></p> <p>With over 60,000 active monthly users, Big Sky has earned Steven Arkonovich both income and publicity. But when in-skill purchasing became available, he saw the opportunity to build a sustainable revenue stream by selling&nbsp; premium, personalized content to customers.</p> <p style="text-align:center"><iframe allowfullscreen="" frameborder="0" height="360" src="//www.youtube.com/embed/w3ZZF0b6HeQ" width="640"></iframe></p> <p>When philosophy and ethics professor Steven Arkonovich first experienced voice technology, he never imagined he’d create one of <a href="https://www.cnet.com/how-to/the-first-alexa-skills-you-should-enable/" target="_blank">CNET's seven “must-have” Alexa skills</a>. With over 60,000 active monthly users, that skill—<a href="https://www.amazon.com/Philosophical-Creations-Big-Sky/dp/B01GU4MBM4/" target="_blank">Big Sky</a>—has earned the <a href="https://developer.amazon.com/alexa/champions/steven-arkonovich">Alexa Champion</a> both income and publicity. But when <a href="https://developer.amazon.com/alexa-skills-kit/make-money/in-skill-purchasing">in-skill purchasing</a> became available, he saw the opportunity to build a sustainable revenue stream by selling &nbsp;premium, personalized content to customers.</p> <p>“Allowing users to customize their experience fits so naturally with what people expect from voice technology,” says Arkonovich. “Being able to monetize such features gives developers even more incentive to take their skills and their business to the next level.”</p> <p>His Big Sky skill provides “better weather for Alexa,” according to Arkonovich, delivering personalized weather information with just the amount of detail the customer asks for. With in-skill purchasing, Arkonovich saw an opportunity to offer a monthly subscription that unlocks premium features to let customers personalize their experience even further. And the customer response to the subscription has been positive—50% of Big Sky customers opt to purchase the premium experience when offered. In the week after the CNET article recommended Big Sky, Arkonovich’s week-over-week subscriptions jumped by 486%.</p> <p>“The success I’ve had so far in offering my customers premium features and content via in-skill purchasing has renewed my motivation to make the very best product I can,” says Arkonovich. “I can now see myself turning my passion for building Alexa skills into a real business.”</p> <h2>Premium Content Makes a Popular Skill Even Better Through Personalization</h2> <p>Arkonovich first created Big Sky because he didn’t want to listen to an entire weather report just to hear a specific bit of information. His idea was to let each customer decide whether they want to hear a detailed report or just the current temperature, humidity, chance of precipitation, and so on. He also allows the customer to personalize their default location, report type (detailed or basic), units of measure, and more, which further customizes their weather experience to their own taste.</p> <p>“What makes the skill so engaging is that the customer doesn’t get a one-size-fits-all canned response every time they use it,” says Arkonovich. “They’re in the driver’s seat and can choose exactly which information they hear, making the experience very personal.”</p> <p>This high level of personalization led to Big Sky becoming one of the most popular weather skills in the Alexa Skills Store—and significant payouts from the <a href="https://developer.amazon.com/alexa-skills-kit/rewards">Alexa Developer Rewards program</a>, which rewards developers based on their skill engagement.</p> <p>“When Big Sky started bringing in developer rewards, I began thinking of starting a voice business of my own,” says Arkonovich. “But in-skill purchasing puts more control in my own hands to create a very predictable, sustainable income.”</p> <p>Big Sky’s popular features inspired Arkonovich to offer additional personalization as a premium experience via an in-skill purchase. With the basic experience, the user can get a weather report for their default location. Customers opting to purchase the monthly subscription can set up additional addresses, each with its own nickname, such as “Mom’s House” or “The Beach.” That way, customers can ask Alexa for weather information at their favorite locations, without having to spell out the whole address.</p> <p>The subscription also unlocks a number of other premium features, including customized weather alerts. Severe weather alerts are available in the basic experience, but subscribers can enable five different kinds of weather alerts and set the time of day they want to hear each one. And Arkonovich is planning to add new features, like radar imagery, to the subscription regularly.</p> <p>Arkonovich reports that customer feedback on the new premium features has been positive, pointing out that 70% of Big Sky reviewers in the Alexa Skills Store awarded the skill five stars.</p> <p>“Personalizing the experience was always key to Big Sky’s success,” says Arkonovich. “Unlocking even more personalized content via the premium purchase adds substantial value to the skill, and customers are more than happy to buy it.”</p> <h2>Making the Right Offer to the Right Customer at the Right Time</h2> <p>Arkonovich says that getting customers to purchase your in-skill product requires delivering the right upsell message at the right time.</p> <p>“The strength of voice is that it is a very personal experience,” says Arkonovich. “Just as personalizing the experience to each user sets your skill apart from the rest, tailoring your upsell message and its timing to what your customer is looking for at that very moment is key to higher conversion rates.”</p> <p>For example, Arkonovich makes customers aware of his premium features right from the beginning. To enable Big Sky, customers complete account linking in the Alexa app, which is where they also set up their personal preferences. Alongside the standard user preferences, Arkonovich describes the benefits of the premium features and invites customers to enjoy a free seven-day trial. In preparation for the trial, customers are encouraged to enter the nicknames and addresses of one or more “favorite places” to be used in the premium experience.</p> <p>Customers receive different upsell messages at different times, based on their engagement with the skill. For example, entering “favorite places” during setup indicates an interest in the premium features from the beginning. When the customer next invokes the skill, Alexa immediately describes the free trial, subscription period, cost, and cancellation terms, and then asks customers if they want to sign up. For customers who haven’t entered their “favorite places,” Alexa waits until after they’ve used Big Sky a while before offering the premium version. By presenting the right offer message at just the right time, Arkonovich reports that 50% of people who are offered convert to premium subscribers.</p> <h2>In-Skill Purchasing Expands the Possibilities for Developers</h2> <p>For now, Arkonovich is focused on making Big Sky the best weather skill he can and continuing to innovate his premium content and offers, knowing that he is now building a sustainable voice business.</p> <p>“The Alexa team is always innovating to help developers build great experiences and their voice business,” says Arkonovich. “Building Alexa skills may take up a lot of my free time, but it’s something that I really enjoy doing. With capabilities like in-skill purchasing, I’m excited to see just how far I can take my voice business.”</p> <h2>Related Content</h2> <ul> <li><a href="https://developer.amazon.com/alexa-skills-kit/make-money/in-skill-purchasing">Sell Premium Content to Enrich Your Skill Experience</a></li> <li><a href="https://developer.amazon.com/alexa-skills-kit/rewards">Earn Money with Alexa Developer Rewards</a></li> <li><a href="https://build.amazonalexadev.com/alexa-skill-monetization-guide-ww.html">Guide: Make Money with Alexa Skills</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/156b211e-355f-4bc8-b1dc-fde19d9acaad/in-skill-purchasing-takes-volley-s-thriving-voice-business-to-the-next-level">In-Skill Purchasing Takes Volley’s Thriving Voice Business to the Next Level</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/7da88ba2-8091-460b-a034-a2d3257c0106/with-in-skill-purchasing-gal-shenar-sets-his-growing-voice-business-up-for-long-term-success">With In-Skill Purchasing, Gal Shenar Sets His Growing Voice Business Up for Long-Term Success</a></li> </ul> <h2>Make Money by Creating Engaging Skills Customers Love</h2> <p>You can make money for eligible skills that drive some of the highest customer engagement with <a href="https://developer.amazon.com/alexa-skills-kit/rewards">Alexa Developer Rewards</a>. You can also make money with Alexa skills using <a href="https://developer.amazon.com/alexa-skills-kit/make-money/in-skill-purchasing">in-skill purchasing</a> or <a href="https://developer.amazon.com/alexa-skills-kit/make-money/amazon-pay">Amazon Pay for Alexa Skills</a>. <a href="https://build.amazonalexadev.com/alexa-skill-monetization-guide-ww.html?&amp;sc_category=Owned&amp;sc_channel=WB&amp;sc_campaign=wb_acquisition&amp;sc_publisher=ASK&amp;sc_content=Content&amp;sc_detail=vod-webinar&amp;sc_funnel=Convert&amp;sc_country=WW&amp;sc_medium=Owned_WB_wb_acquisition_ASK_Content_vod-webinar_Convert_WW_visitors_makemoney-page_CTA-graphic&amp;sc_segment=visitors&amp;sc_place=makemoney-page&amp;sc_trackingcode=CTA-graphic" target="_blank">Download our introductory guide</a> to learn more.</p> /blogs/alexa/post/2af6851b-0216-4e82-9aba-6fa2aec755d5/how-to-get-started-with-the-new-alexa-presentation-language-to-build-multimodal-alexa-skills How to Get Started with the Alexa Presentation Language to Build Multimodal Alexa Skills Jennifer King 2018-11-09T17:09:10+00:00 2018-11-09T17:09:10+00:00 <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/1blog.png._CB480627403_.png" style="height:240px; width:954px" /></p> <p>Learn how to use the Alexa Presentation Language (APL), Amazon’s new voice-first design language, to create rich, interactive displays for Alexa skills and tailor the experience for tens of millions of Alexa-enabled devices.</p> <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/1blog.png._CB480627403_.png" /></p> <p>Voice is the most natural form of interaction. But in a voice-first world, visuals can enhance interactions with Alexa-enabled devices. By combining visual elements with voice experiences, developers can expand the possibilities of what their skills can do. Alexa-enabled devices have varying display sizes and shapes, purposes, and hardware limitations. For example, while using a skill on an Echo Spot or Fire TV may have similar spoken interactions for a customer, interactivity and information rendered on the screen may vary drastically depending on the device features.</p> <p>The <a href="https://developer.amazon.com/blogs/alexa/post/1dee3fa0-8c5f-4179-ab7a-74545ead24ce/introducing-the-alexa-presentation-language-preview">Alexa Presentation Language (APL)</a> is Amazon’s new voice-first design language you can use to create rich, interactive displays for Alexa skills and tailor the experience for tens of millions of Alexa-enabled devices. Using APL, you can easily build customized, robust displays that coincide with your personal brand and the context of your voice experience.</p> <p>Building voice user interfaces with APL borrows concepts you find in traditional web development, specifically with regards to styling, component nesting, and document hierarchy, but it also maintains security, scalability, and renderability across all Alexa-enabled devices.</p> <p>In this blog post, we will dive into the technical details behind the new design language and explain how to build voice-first, visual experiences with APL.</p> <h2>What Is the Alexa Presentation Language?</h2> <p>APL is, very simply, JSON that is compiled into a visual experience. It is comprised of conditional layouts based upon both user and system-defined variables, and incorporates information from your skill code using data binding.</p> <p>Your graphical user interface is defined by an APL document. When the speech response is sent to a user, a developer can optionally include an APL document to send to the device with a collection of data relevant to that document. The document may also include import packages of existing APL content, including common resource properties, component styles, or pre-defined layouts to be used throughout your document.</p> <p>Below is a RenderDocument directive you would add in your response builder in your skill code to display the APL document. In this case, the APL document is empty, and would thus show a blank display.</p> <pre> <code class="language-javascript">{ &quot;type&quot;: &quot;Alexa.Presentation.APL.RenderDocument&quot;, &quot;datasources&quot;: {}, &quot;document&quot;: { &quot;type&quot;: &quot;APL&quot;, &quot;version&quot;: &quot;1.0&quot;, &quot;import&quot;: [], &quot;resources&quot;: [], &quot;styles&quot;: {}, &quot;layouts&quot;: {}, &quot;mainTemplate&quot;: {} } }</code></pre> <h2>How to Enable APL in Your Skill</h2> <p>To allow an APL document to be a part of your skill’s response, you need to enable the Alexa Presentation interface in the Alexa Developer Console. Navigate to your skill and scroll to interfaces. Once there, toggle “Alexa Presentation Language,” save and build your skill. This will enable the ability to render APL in your skill and automatically add all of the required intents to your interaction model.</p> <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/APL_image_1.PNG._CB479717482_.png" style="display:block; height:249px; margin-left:auto; margin-right:auto; width:800px" /></p> <p>If you are working outside of the developer console, you can do this in your skill.json. When you create a skill that will incorporate visuals built with APL, you need to assure that you first include ALEXA_PRESENTATION_APL under apis.custom.interfaces in your skill manifest.</p> <pre> <code class="language-javascript">&quot;apis&quot;: { &quot;custom&quot;: { &quot;endpoint&quot;: { &quot;sourceDir&quot;: &quot;lambda/custom&quot; }, &quot;interfaces&quot;: [ { &quot;type&quot;: &quot;ALEXA_PRESENTATION_APL&quot; } ] } },</code></pre> <p>It is important to note that we recently updated all skills to include the built-in intent <a href="https://developer.amazon.com/docs/custom-skills/standard-built-in-intents.html">AMAZON.NavigateHomeIntent</a>. With this update, skills will now handle requests like “go home,” “return to the home screen,” “return home,” and so on. While these commands will mostly benefit multimodal skills, they are also supported on Echo devices without displays. The AMAZON.NavigateHomeIntent exits the skill and returns customers to the Home screen. &nbsp;For skills that have utterances that overlap with AMAZON.NavigateHomeIntent, the overlapping utterances will continue to invoke your custom intent. Either way, no action is needed by you.</p> <h2>How to Build an APL Document</h2> <p>Each entity within the main APL template is called a Component. The current list of primitive components can be found in the <a href="https://developer.amazon.com/docs/alexa-presentation-language/apl-reference.html">APL Reference</a>. The mainTemplate is comprised of components containing text, graphical images, scrolling regions, and several types of layout components that position child components.</p> <p>To customize your APL document, there is a new <a href="https://developer.amazon.com/alexa/console/ask/displays">APL authoring tool</a> available in the developer console. We provide seven samples built entirely in APL that are based upon the <a href="https://developer.amazon.com/docs/custom-skills/display-template-reference.html">Body and List display directive templates</a>. You can choose to build off of any of these APL documents, start your own from scratch, or upload existing APL code.</p> <p><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/APL_image_2.png._CB479717477_.png" style="display:block; height:355px; margin-left:auto; margin-right:auto; width:800px" /></p> <h2>How to Incorporate an APL Document into a Response Using the ASK SDK</h2> <p>In your skill code, navigate to the intent to which you’d like to incorporate your visuals. These visuals are sent via an Alexa.Presentation.APL.RenderDocumentdirective. In the Alexa Skills Kit (ASK) Software Development Kit (SDK) for Node.js, you can add this in your response builder.</p> <pre> <code class="language-javascript">return handlerInput.responseBuilder .speak(speechResponse) .reprompt(repromptResponse) .addDirective({ type : 'Alexa.Presentation.APL.RenderDocument', document : document, datasources : data }) .getResponse();</code></pre> <h2>Start Learning with 3 New APL Skill Samples and More</h2> <p>To help you get started, we’ve created three new sample skills using APL: <a href="https://github.com/alexa-labs/skill-sample-nodejs-level-up-riddles" target="_blank">Level Up Riddles</a>, <a href="https://github.com/alexa-labs/skill-sample-nodejs-movie-quotes-quiz" target="_blank">Movie Quote Quiz</a>, and <a href="https://github.com/alexa-labs/skill-sample-nodejs-pager-karaoke" target="_blank">Pager Karaoke</a>. We plan on building upon these skills in the future to incorporate more APL features. We have also updated <a href="https://github.com/alexa/skill-sample-nodejs-petmatch/tree/petmatch-with-apl" target="_blank">Pet Match</a> to include a branch with a version of the skill that includes APL.</p> <p>Visit our <a href="https://developer.amazon.com/alexa-skills-kit/multimodal#See%20What%20Others%20Have%20Built%20with%20APL">website</a> to see how others are using APL to create engaging multimodal skills and get inspired to start building your own voice-first, visual experiences. To get started with APL, check out our <a href="https://developer.amazon.com/docs/alexa-presentation-language/apl-overview.html?&amp;sc_category=Owned&amp;sc_channel=WB&amp;sc_campaign=APLpublicbeta&amp;sc_publisher=blogannouncement&amp;sc_content=Content&amp;sc_funnel=Discover&amp;sc_country=WW&amp;sc_medium=Owned_WB_APLpublicbeta_blogannouncement_Content_Discover_WW_all&amp;sc_segment=all">technical documentation</a> and the <a href="https://developer.amazon.com/docs/alexa-design/intro.html?&amp;sc_category=Owned&amp;sc_channel=WB&amp;sc_campaign=APLpublicbeta&amp;sc_publisher=blogannoucnement&amp;sc_content=Content&amp;sc_funnel=Discover&amp;sc_country=WW&amp;sc_medium=Owned_WB_APLpublicbeta_blogannoucnement_Content_Discover_WW_all&amp;sc_segment=all">Alexa Design Guide.</a></p> <h2>Register for an APL Webinar</h2> <p>Watch our <a href="https://build.amazonalexadev.com/get-started-with-the-apl-on-demand-registration-ww.html" target="_blank">on-demand webinar on how to get started with APL</a>. We cover how to use the new APL authoring tool, how to incorporate a template into your skill, and best practices for building multimodal skills. To dive deeper into APL, register for our next webinar on <a href="https://build.amazonalexadev.com/layouts-styling-best-practices-ww.html?&amp;sc_category=Owned&amp;sc_channel=VLE&amp;sc_campaign=APLpublicbeta&amp;sc_publisher=webinar2&amp;sc_content=Content&amp;sc_funnel=Discover&amp;sc_country=WW&amp;sc_medium=Owned_VLE_APLpublicbeta_webinar2_Content_Discover_WW_all&amp;sc_segment=all" target="_blank">Advanced Template Building with the Alexa Presentation Language</a> to learn about template styling and layout best practices.</p> <p>We can’t wait to see what you build!</p> <h2>Related Content</h2> <ul> <li><a href="https://developer.amazon.com/blogs/alexa/post/1dee3fa0-8c5f-4179-ab7a-74545ead24ce/introducing-the-alexa-presentation-language-preview">Introducing the Alexa Presentation Language (Preview)</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/0d2ad283-b7c3-48ba-8313-40f2b5fdc19d/alexa-presentation-language-now-available">Now Available: Alexa Presentation Language (Public Beta) for Multimodal Experiences</a> <a href="https://developer.amazon.com/blogs/alexa/post/7861710b-fcab-4a5c-917a-265854c3b30c/how-voice-and-graphics-working-together-enhance-the-alexa-experience">How Voice and Graphics Working Together Enhance the Alexa Experience</a></li> </ul> <p>&nbsp;</p> /blogs/alexa/post/af4b0637-c473-4768-bdf5-cc2b56eec0d1/now-available-test-multi-turn-conversations-beta-using-the-ask-cli-and-smapi Now Available: Test Multi-Turn Conversations (Beta) Using the ASK CLI and SMAPI BJ Haberkorn 2018-11-08T20:05:30+00:00 2018-11-09T20:55:05+00:00 <p><img src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/SMAPI_blog_(1)(1)._CB517727736_.png" /></p> <p>Now you can now test multi-turn conversations) using the new dialog command (beta) in the ASK CLI and the updated simulation API (beta) in SMAPI.</p> <p>&nbsp;</p> <p><img src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/SMAPI_blog_(1)(1)._CB517727736_.png" /></p> <p>We’re excited to announce that Alexa developers worldwide can now test multi-turn conversations using the new dialog command (beta) in the Alexa Skills Kit (ASK) Command Line Interface (CLI) and the updated simulation API (beta) in the Skill Management API (SMAPI). Previously, you could only simulate multi-turn conversations using the Alexa Developer Console. If you use the CLI, SMAPI, or the ASK plugin for Visual Studio Code for skill development, you can use this new testing capability to improve your skill conversations and deliver a better experience to your customers.</p> <h2>Simulate a Conversation on the Command Line</h2> <p>Using the new dialog command in the CLI, you can simulate a conversation with your skill on the command line. As shown below, the simulation supports multi-turn conversations. You can test multiple paths through your skill, and vary your responses to confirm how your skill will respond.</p> <p><img alt="" src=" https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/AlexaSkillsKit/DialogCLI.png._CB481222856_.png" style="display:block; margin-left:auto; margin-right:auto" /></p> <h2>Capture Utterances and Skill Responses for Debugging and to Streamline Future Testing</h2> <p>The output option of the dialog command captures all utterances, skill responses, and the associated JSON elements to a file. You can use the information in these output files to help you debug your backend service logic. At any time during a session, you can use the record command to capture your text utterances since the start of the session or your last recording point to a file. You can use the recorded files to automate the execution of frequently used tests. Simply record the sets of utterances needed to test your skill, and play these conversations back in the future using the replay function.</p> <h2>Use the Development Option That Works Best for You</h2> <p>The <a href="https://developer.amazon.com/docs/smapi/ask-cli-command-reference.html#dialog-command">dialog command in the CLI</a> takes advantage of updates to the <a href="https://developer.amazon.com/docs/smapi/skill-simulation-api.html">simulation API</a> in SMAPI, and is available in the <a href="https://marketplace.visualstudio.com/items?itemName=ask-toolkit.alexa-skills-kit-toolkit">ASK Toolkit for Visual Studio Code</a>. Now, you can test multi-turn conversations regardless of which development tool you prefer.</p> <p>&nbsp;</p> /blogs/alexa/post/efd1fd50-84fe-4e48-97e2-a61ad0612bc3/building-conversational-alexa-skills-confirming-slots-with-dialog-management Building Conversational Alexa Skills: Confirming Slots with Dialog Management Jennifer King 2018-11-08T15:00:00+00:00 2018-11-09T16:14:42+00:00 <p>In this technical post, I build upon the coffee shop skill that I introduced in the blog about how to dynamically elicit slots based on a previous answer using dialog management.</p> <p>I've spent a lot of time deep diving into <a href="https://developer.amazon.com/alexa-skills-kit/dialog-management">dialog management</a>. It is a great tool for building complex multi-turn conversational skills. As I continue to share my learnings with the community, I'm often asked about eliciting slot confirmations.</p> <p><a href="https://developer.amazon.com/alexa-skills-kit/dialog-management">Dialog management</a> simplifies creating a multi-turn conversational skill. When you set at least one of your slots <strong>required to fulfull the intent</strong>, the Alexa voice service will keep track of the dialog state and the required slots that have yet to be collected and send this information to your back end. At each turn, your skill can return a <strong>dialog</strong> directive to determine what Alexa will do. Returning a <strong>Dialog.Delegate</strong> directive will have the Alexa voice service automatically prompt for the next slot. Returning the <strong>Dialog.ElicitSlot</strong> directive will allow you to determine what slot Alexa will prompt next. Returning the <strong>Dialog.ConfirmSlot</strong> directive will allow you ask your customer to confirm a slot value.</p> <p>In this technical post, I build upon the coffee shop skill that I introduced in the blog about <a href="https://developer.amazon.com/blogs/alexa/post/dbceb5dd-3c4d-40f1-be22-172f4050fbcb/building-conversational-alexa-skills-how-to-dynamically-elicit-slots-based-on-a-previous-answer-using-dialog-management">how to dynamically elicit slots based on a previous answer using dialog management</a>.</p> <h2>Recap: The Coffee Shop Skill</h2> <p>Our coffee shop skill allows the customer to order <strong>coffee</strong> or <strong>tea</strong>. Based on their <strong>drink</strong> of choice, the skill either asks what kind of coffee roast (<strong>coffeeRoast</strong>) or type of tea (<strong>teaType</strong>) they want. In my previous post, I walked through the steps to dynamically elicit the <strong>coffeeRoast</strong> and <strong>teaType</strong> slots based upon the <strong>drink</strong> using the <strong>Dialog.ElicitSlot</strong> directive.</p> <h2>Enhancing the Coffee Shop Skill</h2> <p>Let's say we want to add the ability to add some flavor to our coffee. Our coffee shop charges an extra $0.50 to add a <strong>flavor</strong>, so we'll use the <strong>Dialog.ConfirmSlot</strong> directive to ask if the customer is willing to except the additional charges. First, we only want to upsell the <strong>flavor</strong> when <strong>drink</strong> is <strong>coffee</strong>, so we will use <strong>Dialog.ElicitSlot</strong> to dynamically elicit our new <strong>flavor</strong>. Second, we will confirm the slot with <strong>Dialog.ConfirmSlot</strong>, but what if our customer doesn't want to add any <strong>flavor</strong> from the start? We'll add &quot;no thanks&quot; as one of our <strong>flavor</strong> slot values and we will only return the <strong>Dialog.ConfirmSlot</strong> directive when the customer chooses a <strong>flavors</strong>.</p> <p>The two steps will be:</p> <ol> <li>Dynamically elicit <strong>flavor</strong> when <strong>drink</strong> is <strong>coffee</strong> with <strong>Dialog.ElicitSlot</strong></li> <li>Confirm the $0.50 upsell if a <strong>flavor</strong> is given with <strong>Dialog.ConfirmSlot</strong></li> </ol> <p>Last, we will need to handle what to do next based on if the customer <strong>confirms</strong> or <strong>denies</strong> the extra cost for adding a <strong>flavor</strong>.</p> <p>Follow along as I walk you through the process.</p> <h2>Updating the Voice Model</h2> <p>We'll start by updating our voice model. At this point, our coffee shop skill has three custom slots, <strong>drink</strong>, <strong>coffeeRoast,</strong> and <strong>teaType.</strong> The values are:</p> <table cellspacing="0" style="height:273px; width:445px"> <tbody> <tr> <td> <p><strong>drink</strong></p> </td> <td> <p><strong>coffeRoast</strong></p> </td> <td> <p><strong>teaType</strong></p> </td> </tr> <tr> <td> <p>coffe</p> </td> <td> <p>light</p> </td> <td> <p>black</p> </td> </tr> <tr> <td> <p>tea</p> </td> <td> <p>medium</p> </td> <td> <p>green</p> </td> </tr> <tr> <td> <p>&nbsp;</p> </td> <td> <p>medium dark</p> </td> <td> <p>white</p> </td> </tr> <tr> <td> <p>&nbsp;</p> </td> <td> <p>dark</p> </td> <td> <p>oolong</p> </td> </tr> </tbody> </table> <p>When interacting with our skill, a customer may say one of the the following utterances to tell us their order.</p> <p><code>Start my order<br /> I'll have {drink}<br /> I want to drink {drink}<br /> I want {coffeeRoast} {drink}<br /> I want {drink} to drink<br /> I want {teaType} {drink}<br /> {teaType} {drink} sounds great<br /> {drink} please</code></p> <p>To enable our customer to be able specify their desired flavor we'll need to update our utterances and create a new custom slot. For example, they may say something like:</p> <p><code>I want a medium roast coffee with a shot of vanilla<br /> I want to drink coffee with hazelnut<br /> I want a shot of caramel in my coffee<br /> Coffee with vanilla</code></p> <p>These utterances will use our new slot which we'll call <strong>flavor</strong>. Using our <strong>drink</strong>, <strong>coffeeRoast</strong> and <strong>flavor</strong> slots we will replace the values we want to capture with our slots.</p> <p><code>I want a {coffeeRoast} {drink} with a shot of {flavor}<br /> I want to drink {drink} with {flavor}<br /> I want a shot of {flavor} in my {drink}<br /> {drink} with {flavor}</code></p> <p>The table below shows our flavor slot's custom values.</p> <table border="1" cellpadding="1" cellspacing="1" style="height:119px; width:157px"> <tbody> <tr> <td><strong>flavors</strong></td> </tr> <tr> <td>no thanks</td> </tr> <tr> <td>vanilla</td> </tr> <tr> <td>hazelnut</td> </tr> <tr> <td>caramel</td> </tr> </tbody> </table> <p>The <strong>no thanks</strong> value will allow our customer to decline a <strong>flavor</strong> add-on which we will prompt for using the <strong>Dialog.ElicitSlot</strong> directive if their <strong>drink</strong> is <strong>coffee</strong>. If any other value is given, we will ask if it's ok to charge $0.50 extra to add a flavor.</p> <p>Now that we understand how our voice user interaction model will change. Let's take a look at our back-end code.</p> <h2>Eliciting and Confirming Slots From Our Back End</h2> <p>Similar to our <strong>coffeeRoast</strong> and <strong>teaType</strong> slots, our <strong>flavor</strong> slot is dynamic. We will only ask our customers if they want to add flavors if their <strong>drink</strong> is <strong>coffee</strong>. So we will be using <strong>Dialog.ElicitSlot</strong> to elicit the <strong>flavor</strong> slot and <strong>Dialog.SlotConfirmation</strong> to elicit a confirmation. To acheive this we'll define two more handlers. These handlers will represent the various situations of our skill and we will use them to <em>elicit</em> and <em>confirm</em> the <strong>flavor</strong> slot. Our handlers are:</p> <ul> <li>CoffeeRoastGivenPromptFlavorOrderIntentHandler</li> <li>FlavorGivenConfirmSlotOrderIntentHandler</li> </ul> <h3>CoffeeRoastGivenPromptFlavorOrderIntentHandler</h3> <p>This handler will use the <strong>Dialog.ElicitSlot</strong> directive to dynamically elicit the <strong>flavor</strong> slot. The <strong>canHandle</strong> function will return <strong>true</strong> if:</p> <ul> <li>request.type <strong>equals</strong> IntentRequest</li> <li>request.intent.name <strong>equals</strong> OrderIntent</li> <li>request.intent.slots.drink.value <strong>is not empty</strong></li> <li>request.intent.slots.drink.value <strong>equals</strong> coffee</li> <li>request.intent.slots.coffeeRoast.value <strong>is not empty</strong></li> <li>request.intent.slots.flavor.value <strong>is not empty</strong></li> </ul> <p>For example, this will occur if the user says, &quot;I want dark coffee.&quot;</p> <pre> <code class="language-javascript">canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value === &quot;coffee&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.coffeeRoast.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.value !== &quot;no thanks&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.confirmationStatus === &quot;NONE&quot;; },</code></pre> <p>The handler will then use the <strong>Dialog.ElicitSlot</strong> directive to elicit the <strong>flavor</strong> slot.</p> <pre> <code class="language-javascript">handle(handlerInput) { return handlerInput.responseBuilder .speak(&quot;I can add some flavor to your coffee. Which would you like, caramel, hazelnut, or vanilla? You can also say no thanks.&quot;) .reprompt(&quot;What flavor would you like added to your coffee, caramel, hazelnut, or vanilla? You can also say no thanks.&quot;) .addElicitSlotDirective(&quot;flavor&quot;) .getResponse(); }</code></pre> <p>Below is the the whole handler at a glance:</p> <pre> <code class="language-javascript">const CoffeeRoastGivenPromptFlavorOrderIntentHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value === &quot;coffee&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.coffeeRoast.value &amp;&amp; !handlerInput.requestEnvelope.request.intent.slots.flavor.value; }, handle(handlerInput) { return handlerInput.responseBuilder .speak(&quot;I can add some flavor to your coffee. Which would you like, caramel, hazelnut, or vanilla? You can also say no thanks.&quot;) .reprompt(&quot;What flavor would you like added to your coffee, caramel, hazelnut, or vanilla? You can also say no thanks.&quot;) .addElicitSlotDirective(&quot;flavor&quot;) .getResponse(); } };</code></pre> <p>Now that we're able to dynamically elicit the <strong>flavor</strong> slot if the order <strong>coffee</strong>, we will move to the next handler.</p> <h3>FlavorGivenConfirmSlotOrderIntentHandler</h3> <p>Our <strong>FlavorGivenConfirmSlotOrderIntentHandler</strong> will use the <strong>Dialog.ConfirmSlot</strong> directive. Its <strong>canHandle</strong> function will return <strong>true</strong> if:</p> <ul> <li>request.type <strong>equals</strong> IntentRequest</li> <li>request.intent.name <strong>equals</strong> OrderIntent</li> <li>request.intent.slots.drink.value <strong>is not empty</strong></li> <li>request.intent.slots.drink.value <strong>equals</strong> coffee</li> <li>request.intent.slots.coffeeRoast.value <strong>is not empty</strong></li> <li>request.intent.slots.flavor.value <strong>is not empty</strong></li> <li>request.intent.slots.flavor.value <strong>is not equal to</strong> no thanks</li> <li>request.intent.slots.flavor.confirmationStatus <strong>equals</strong> NONE</li> </ul> <p>The last condition, <strong>request.intent.slots.flavor.confirmationStatus equals NONE</strong>, is super important. Without it the skill will continuously pester our customer to confirm the <strong>flavor</strong> slot. Before a slot has been confirmed the <strong>confirmationStatus</strong> is <strong>NONE</strong>. Once the customer provides an answer it will be either <strong>DENIED</strong> or <strong>CONFIRMED</strong>, so before we confirm the <strong>flavor</strong> slot, we should check the <strong>confirmationStatus</strong>.</p> <pre> <code class="language-javascript">canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value === &quot;coffee&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.coffeeRoast.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.value !== &quot;no thanks&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.confirmationStatus === &quot;NONE&quot;; },</code></pre> <p>Our <strong>handle</strong> function builds the confirmation prompt and returns the <strong>Dialog.ConfirmSlot</strong> directive.</p> <pre> <code class="language-javascript">handle(handlerInput) { const flavor = handlerInput.requestEnvelope.request.intent.slots.flavor.value; const speechText = `Adding ${flavor} will cost $0.50 extra. Would you like me to add it?`; return handlerInput.responseBuilder .speak(speechText) .reprompt(speechText) .addConfirmSlotDirective(&quot;flavor&quot;) .getResponse(); }</code></pre> <p>Zooming out you can see how the handler's <strong>canHandle</strong> and <strong>handle</strong> functions fit together:</p> <pre> <code class="language-javascript">const FlavorGivenConfirmSlotOrderIntentHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.drink.value === &quot;coffee&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.coffeeRoast.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.value &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.value !== &quot;no thanks&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.slots.flavor.confirmationStatus === &quot;NONE&quot;; }, handle(handlerInput) { const flavor = handlerInput.requestEnvelope.request.intent.slots.flavor.value; const speechText = `Adding ${flavor} will cost $0.50 extra. Would you like me to add it?`; return handlerInput.responseBuilder .speak(speechText) .reprompt(speechText) .addConfirmSlotDirective(&quot;flavor&quot;) .getResponse(); } };</code></pre> <p>Once the slot has been either confirmed or denied it's up to you to determine what to do next. Since we don't need to collect anymore slots and our <strong>FlavorGivenConfirmSlotOrderIntentHandler</strong> only happens after we've collected all of our <strong>coffee</strong> related slots, we'll handle the aftermath of the confirmation in our <strong>CompletedOrderIntentHandler</strong>.</p> <h3>CompletedOrderIntentHandler</h3> <p>This handler runs after the dialog has completed. The <strong>canHandle</strong> will return <strong>true</strong> if:</p> <ul> <li>request.type <strong>equals</strong> IntentRequest</li> <li>request.intent.name <strong>equals</strong> OrderIntent</li> <li>request.dialogState <strong>equals</strong> COMPLETED</li> </ul> <p>The <strong>canHandle</strong> translates to three simple checks.</p> <pre> <code class="language-javascript">canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.dialogState === &quot;COMPLETED&quot;; },</code></pre> <p>The <strong>handle</strong> function includes our logic to handle the <strong>confirmationStatus</strong>. If <strong>drink</strong> is <strong>coffee</strong>, our logic checks the <strong>confirmationStatus</strong>. If it's <strong>DENIED</strong> we let our customer know that we've removed the flavor from their order. If it's <strong>CONFIRMED</strong> then we let them know that they made a great choice. At this point our sample skill ends, but if we were building a real coffee shop skill, we would plug our logic to add the item to their shopping cart and ask if they want to, &quot;check out or add another item to their shopping cart?&quot;</p> <pre> <code class="language-javascript">handle(handlerInput) { const slots = handlerInput.requestEnvelope.request.intent.slots; const drink = slots.drink.value; let type = ''; let speechText = &quot;Awesome! &quot;; if (drink === 'coffee') { type = slots.coffeeRoast.value; if(slots.flavor.confirmationStatus === &quot;DENIED&quot;) { speechText = `Ok, I've removed ${slots.flavor.value} from your order. `; } else if (slots.flavor.confirmationStatus === &quot;CONFIRMED&quot;) { speechText = `Yummy. ${slots.flavor.value} is an excellent choice. `; } } else if (drink === 'tea') { type = handlerInput.requestEnvelope.request.intent.slots.teaType.value; } speechText += `I've added ${type} ${drink} to your shopping cart.`; return handlerInput.responseBuilder .speak(speechText) .getResponse(); } </code></pre> <p>You can see what the handler looks like put together below.</p> <pre> <code class="language-javascript">const CompletedOrderIntentHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === &quot;IntentRequest&quot; &amp;&amp; handlerInput.requestEnvelope.request.intent.name === &quot;OrderIntent&quot; &amp;&amp; handlerInput.requestEnvelope.request.dialogState === &quot;COMPLETED&quot;; }, handle(handlerInput) { const slots = handlerInput.requestEnvelope.request.intent.slots; const drink = slots.drink.value; let type; let speechText = &quot;Awesome! &quot;; if (drink === 'coffee') { type = slots.coffeeRoast.value; if(slots.flavor.confirmationStatus === &quot;DENIED&quot;) { speechText = `Ok, I've removed ${slots.flavor.value} from your order. `; } else if (slots.flavor.confirmationStatus === &quot;CONFIRMED&quot;) { speechText = `Yummy. ${slots.flavor.value} is an excellent choice. `; } } else if (drink === 'tea') { type = handlerInput.requestEnvelope.request.intent.slots.teaType.value; } else { type = 'water'; } speechText += `I've added ${type} ${drink} to your shopping cart.`; return handlerInput.responseBuilder .speak(speechText) .getResponse(); } }</code></pre> <p>After all that, you may be asking, what should I do if the customer doesn't provide a valid option for <strong>drink</strong>. What if they say <strong>water</strong> or <strong>baseball</strong>? In my next post I'll demonstrate how you can validate user input. Until then, think about how you would do this. What handlers would you need? How would your re-elicit a slot? What dialog directives would you need?</p> <p>Now that you've read through this post, try to think about how you can put these techniques to use in your own skills. Let's continue the discussion online! You can find me on Twitter. Reach out to me at <a href="https://twitter.com/sleepydeveloper">@SleepyDeveloper</a>.</p> <h2>Related Resources</h2> <ul> <li><a href="https://developer.amazon.com/blogs/alexa/post/dbceb5dd-3c4d-40f1-be22-172f4050fbcb/building-conversational-alexa-skills-how-to-dynamically-elicit-slots-based-on-a-previous-answer-using-dialog-management">Building Conversational Alexa Skills: How to Dynamically Elicit Slots Based on a Previous Answer Using Dialog Management</a></li> <li><a href="https://developer.amazon.com/alexa-skills-kit/dialog-management">Build Advanced Alexa Skills Using Dialog Management</a></li> <li><a href="https://build.amazonalexadev.com/alexa-skill-dialog-management-guide-ww.html">Guide: Advanced Skill Building with Dialog Management</a></li> <li><a href="https://developer.amazon.com/blogs/alexa/post/d1e8b7d5-c93f-490e-a8b0-c8c53506e04e/6-dialog-management-resources-to-build-advanced-alexa-skills">6 Dialog Management Resources to Build Advanced Alexa Skills</a></li> </ul> /blogs/alexa/post/2abdf658-556c-4700-8cbd-ada7bd18dbf5/introducing-the-avs-hosted-splash-screen Introducing the AVS Hosted Splash Screen Sanjay Ramaswamy 2018-11-07T18:57:46+00:00 2018-11-14T22:07:57+00:00 <p><a href="https://developer.amazon.com/blogs/alexa/post/2abdf658-556c-4700-8cbd-ada7bd18dbf5/introducing-the-avs-hosted-splash-screen" target="_self"><img alt="" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/P17315481_hosted_splash_blog_v2_954x240_.png._CB479341220_.png" /></a></p> <p>Introducing&nbsp;the Alexa Voice Service (AVS) Hosted Splash screen to create a better and more consistent Alexa registration experience for devices with Alexa built-in.</p> <p>&nbsp;</p> <p><img alt="Alexa Voice Service Hosted Splash Screen" src="https://m.media-amazon.com/images/G/01/DeveloperBlogs/AlexaBlogs/default/P17315481_hosted_splash_blog_v2_954x240_.png._CB479341220_.png" /></p> <p>Today, the Alexa Voice Service (AVS) is introducing an AVS Hosted Splash screen to create a better and more consistent Alexa registration experience for devices with Alexa built-in. We are introducing the AVS Hosted Splash screen for two reasons: to eliminate the time device makers spend engineering their own webview to host an Alexa splash screen and to help improve customer engagement with Alexa built-in products. Amazon will continuously monitor and regularly improve the AVS Hosted Splash screen, which currently features three content zones optimized for registrations: graphic, copy, and call-to-action. This will also ensure consistency of the Alexa registration experience across all devices.</p> <h2>How to Enable the AVS Hosted Splash Screen</h2> <p>You will need to request the new <em>alexa:voice_service:pre_auth</em> scope and the <em>alexa:all</em> scope when requesting Login with Amazon (LWA) to register a new customer (and remove your existing splash screen if applicable). The AVS Hosted Splash screen will then be deployed automatically to the device that creates a LWA request in the companion app. See our <a href="https://developer.amazon.com/docs/alexa-voice-service/authorize-companion-app.html" target="_blank">documentation</a> for more details.</p> <p><strong>If you already have a product in market,</strong> you can choose to either keep your existing splash screen or update to the AVS Hosted Splash screen. <strong>If you are developing a new product,</strong> you must use the AVS Hosted Splash screen and you no longer need to build and host your own Alexa splash screen.</p> <h2>New to AVS?</h2> <p>AVS makes it easy to develop products with Alexa built-in and bring voice-forward experiences to your customers. Through AVS, you can add a new natural user interface to your products and offer your customers access to a growing number of Alexa features, smart home integrations, and skills. <a href="https://developer.amazon.com/alexa-voice-service/sdk" target="_blank">Get Started</a>.</p>