Introduction
All Alexa Skill mainly contains two parts, Interaction Model - Front End, and the Hosted Service - Backend.
- Interaction Model (Front End)
It is similar to the GUI of a mobile app, Alexa skills need a Voice User Interface (VUI), which is called the interaction model. Interaction Model defines what functionalities or behaviors the skill is able to handle. - Hosted Service (Backend)
The Hosted service, as usual, includes the programming logic to respond to user requests and is hosted on the internet.
This is part 1 of the article and we shall completely learn all the things about Interaction Model, and in part 2 of this article we shall learn the AWS Lambda method creation and integrating it with the Alexa skill.
Interacting with an Alexa Skill
To begin a conversation with Alexa-Enabled devices, you say a word, "Alexa", followed by the request line.
Let us say:
Alexa, ask Synonyms Finder, what are synonyms for Passion?
Wake word: "Alexa"
" Alexa " is the default wake word. It wakes up the device and tells it that the user wants to talk to Alexa.
Starting Phrase: "Ask"
Following the "Alexa" wake word, users must use a starting phrase. In our case "ask" is used to specify the type of request they are using.
Invocation Name
In the above example "Synonyms Finder" is the invocation name. The user says "Synonyms Finder" to instruct Alexa, to invoke the Synonyms Finder skill. Every skill needs to have a unique invocation name.
Now let's create an Alexa Skill. Log in to https://developer.amazon.com/ and navigate to Alexa Console and click create a new skill, give a skill name, select custom skill, and click create skill.

Now, we are on your created skill dashboard. Now select Invocation on your left menu and give an invocation name for your skill. Invocation name has to be unique and is used to invoke your skill.

Let's talk about Intents and Utterances.
Intent
Each intent defines a specific behavior, like buttons on a web page. An intent takes user input and executes some code based on it.
Utterances
These help Alexa connect the intent to phrases spoken by the user. In this case, these sample utterances will help Alexa map the spoken user input to the intent which we create.
Let us create a custom Intent and add some sample utterances:

Before we add sample utterances let us learn what a slot is.
Slot
A slot is a variable that relates to an intent allowing Alexa to understand information about the request. A slot is basically added to the sample utterances which we create.
For example: what are synonyms for the {word}.
Here, whatever is defined in {} is nothing but a variable, so we create a slot and use it in our utterances. Slots are variable and can be used in the backend service to process the request. Let us create a slot with the name word of type AMAZON.Literal.



Join the conversation! Your thoughts help the community grow.