Steps to Add Alexa Conversations to an Existing Skill
• GA:
en-US
, en-AU
, en-CA
, en-IN
, en-GB
, de-DE
, ja-JP
, es-ES
, es-US
• Beta:
it-IT
, fr-CA
, fr-FR
, pt-BR
, es-MX
, ar-SA
, hi-IN
If your custom skill uses intent-based dialog management, you can use Alexa Conversations as the dialog manager.
Without altering your existing skill configuration, you can adapt your skill for Alexa Conversations. To do so, update your intent handler to switch the dialog management to Alexa Conversations, and then build your model as usual. The build process constructs the Alexa Conversations dialog management model in addition to the interaction model that your skill previously used.
To learn how to adapt your skill code, see Hand off Dialog Management to and from Alexa Conversations.
Alexa Conversations is intended for published voice developers who have Node.js or Python experience and are familiar with basic artificial intelligence and machine learning constructs.
Steps to add Alexa Conversations to an existing skill
Complete the following steps to add Alexa Conversations to an existing skill.
- Enable interfaces.
- Check the interaction model.
- Create and annotate dialogs.
- Review common errors.
- Build the skill model.
- Update the skill code.
- Test the skill.
- Certify the skill.
Step 1: Enable interfaces
To use Alexa Conversations, you must configure your skill to support Alexa Presentation Language and Alexa Conversations. The following steps describe how to enable these interfaces in the developer console.
To enable interfaces for Alexa Conversations
- Log in to the developer console, and then navigate to your Alexa Conversations skill.
- In the left pane, click Interfaces.
- In the interface list, enable Alexa Presentation Language.
- Enable Alexa Conversations.
Step 2: Check the interaction model
In this step, you do the following:
- Make sure that the interaction model includes the fallback intent. Alexa Conversations needs this intent to route requests when the user's purpose is unclear.
- Make sure that your skill has at least one custom intent with at least one sample utterance. The intent doesn't need to do anything.
To check for the fallback intent
- On the left, expand Interaction Model, and then click Intents.
- Ensure that
AMAZON.FallbackIntent
is in the list of intents. - If
AMAZON.FallbackIntent
is not present, click Add Intent, click Use an existing intent from Alexa's built-in library, and then use the search box to search for and add theAMAZON.FallbackIntent
.
To check for a custom intent
- Continue from the previous step, and review the list of intents to find at least one that doesn't begin with
AMAZON
. If there isn't one, click Add Intent, and then continue to the next step. - Next to Create custom intent, enter an intent name, such as
PlaceholderIntent
, and then click Create custom intent. - In the Sample utterances section, enter
This is a placeholder intent
, and then press enter. - At the top, click Save.
Step 3: Create and annotate dialogs
This step makes up most of the work necessary to create an Alexa Conversations skill. You can do this work in the developer console.
You first enter dialogs to represent typical conversations in your skill. Each dialog consists of turns between your user and Alexa (that is, a user utterance followed by an Alexa utterance). You then click through each utterance to annotate it with Alexa Conversations elements: user utterance sets, Alexa responses, and API definitions. As a starting point, see Best Practices for Authoring Dialogs in Alexa Conversations.
At the end of the process, you have an annotated dialog.
To design your workflow, write dialogs, and set user expectations, see Design for Natural Speech.
• Save often. Navigating between tabs doesn't always count as activity to extend your developer console session.
• Be sure that you use only one browser tab to edit your model from the Build page. It's OK to have multiple browser tabs open — for example, one tab for the Build page, one tab for the Code page, and one tab for the Test page — but if you have two Build tabs open and you make changes in one of the tabs, you risk data loss.
Step 4: Review common errors
To reduce debugging time, review Avoid Common Errors in Your Skill Model for Alexa Conversations before you build your skill model.
Step 5: Build the skill model
Use the developer console to build the skill model for your Alexa Conversations skill. For details, see Build the Skill Model for Your Alexa Conversations Skill.
Step 6: Update the skill code
In your skill code, use a Dialog.DelegateRequest
directive to switch from the intent-based dialog manager to Alexa Conversations and vice versa. For details, see Hand off Dialog Management to and from Alexa Conversations.
Step 7: Test the skill
Before you test your skill, make sure its interaction model includes at least one custom intent with at least one utterance. Otherwise, the skill session might end prematurely during runtime.
To test your skill, use the Alexa Simulator in the developer console. For details about what to test, see Skill Certification Testing.
Step 8: Certify the skill
Submit your skill for certification. For details, see Submit Skills for Certification in the Alexa Developer Console.
Related topics
- About Alexa Conversations
- Get Started With Alexa Conversations
- Hand off Dialog Management to and from Alexa Conversations
Last updated: May 01, 2024