This is the third post in a step-by-step Alexa skill creation guide:
- Introduction
- Set up Accounts
- Create the Interaction Model (this post)
- Create the Intent Handler
- Test the Skill
In this post we’ll create the interaction model for our skill. The interaction model defines the intents our skill will support, and describes the utterances a user might say to execute an intent:
Create a New Skill
Head back to developer.amazon.com and go to the Developer Console (look for the link in the upper right). When you get the Developer Console, select the “ALEXA” dashboard. Under the Alexa Skills Kit category, click “Get Started”:
On the skills list screen, click “Add a New Skill”, which will bring up the “Create a New Alexa Skill” screen. Enter a Name and an Invocation Name (you can click on any of these screen shots for a larger view). Note the instructions for the invocation name:
Scroll down and click the “Save” button. Scroll back up to see your skill information:
Click “Interaction Model” on the left or scroll down and click “Next”.
Click the “Launch Skill Builder” button:
Configure the Interaction Model
Now we will set up the interaction model, which defines how users will interact with the skill. On the Skill Builder screen, click “Add +” to add a custom intent:
Enter “GetNewFactIntent” as the intent name and click “Create Intent”:
Now we’ll enter sample utterances. This list serves as examples of what the user might ask to invoke this intent. We will include examples that work as one-shot intents that launch the skill and make the request all at once. One shot intents follow the pattern, “Alexa, ask skill name for utterance” or “Alexa, ask skill name to utterance“.
- “Alexa, ask Naked Mole Rat Facts for a fact“
- “Alexa, ask Naked Mole Rat Facts to tell me about naked mole rats“
To add a sample utterance, type in the utterance and click the “+” icon, or hit Enter:
Enter the following utterances, using the name of your topic:
- a fact
- a topic fact
- tell me a fact
- tell me a fact about topic
- tell me about topic
- give me a fact
- give me a fact about topic
After entering your sample utterances, your skill builder should look similar to this:
Click the “Save Model” on the top, and then click “Build Model”. Note: building the model may take a few minutes, so be patient. Eventually, you’ll see a message indicating the model built successfully:
After building your interaction model, click the “Skill Information” button on the top to return to the skill information screen. I’ve outlined the “Application Id” value in the screen shot below. Make note of this value as we’ll need it in the next post, where we create the intent handler function. If you plan to proceed immediately to the next post, you can leave this screen open, and work on the intent handler in a different browser tab or window.
Next Steps
Now that we’ve built our interaction model we’ll move on to AWS and create our intent handler to serve up a random fact.