What are Alexa Skills?
Alexa Skills are voice-based computer applications that users can install on Alexa-enabled devices. An Alexa Skill works as an early stage artificial intelligence to help Amazon customers make purchases, play games, and communicate with friends more easily using Alexa-enabled devices.
Over the past few years, Alexa devices have become more common, but at the time this was written, Alexa-enabled devices have not yet become mainstream in American homes. Because of this, it is important to learn how to create an Alexa Skill.
Alexa Skills work by having the user speak an “Utterance,” or term used to let the Alexa enabled device know which application to open. Once the application is opened, the user is promoted with a response where they can begin interacting with the Alexa Skill through voice communication. It’s important to note that the device must first be called by the user saying “Alexa” before the user can be promoted to open the application.
A common misconception is that Alexa Devices are always recording your conversions. While Alexa devices do commute information back to Amazon’s servers once promoted with “Alexa,” user communication is not recorded.
Why is it important to learn How To Create An Alexa Skill?
As of May, there are over 33,000 Alexa Skills enabled and more than 20 million devices on the market. With such a good Alexa Skill to user ratio, this represents a substantial opportunity for small and large businesses to gain headway with little competition. Companies attempting to gain the attention of users on Google will need to compete against millions of results to get a high ranking position.
Another important benefit of Alexa Skills is that, presently, there isn’t a medium to constrain communications between the end user and the Alexa Skill. As with most social media and search platforms, the medium ultimately decides what communication and attention the end user will receive. With Alexa Skills, businesses can communicate directly to their customers without the wait.
The lack of medium between the user and Alexa Skill is also useful because it saves time. For example, an Alexa user interested in hardware stores around them no longer needs to open up their phone or browse the web through a search engine. Instead, the user cam ask their Alexa Device either directly or through a skill for the best hardware store around and would be prompted with an immediate result without the effort or delay required by a search engine.
Alexa Skills Terminology / Legend
A full look into the Alexa Skill Terminology can be viewed at this link.
Ask: An ask for Alexa is a way for users to call on a particular Alexa Skill (voice application) to answer a question similar to how they would speak to a person. When learning how to create an Alexa Skill “Asks” will determine your Skill’s communication.
AWS Lambda: AWS Lambda is a fancy name for a computer that will host an Alexa skill or application. Think of it as your laptop that you will be connecting to remotely.
Invocation: An invocation is when a user begins an interaction with to the “Ask” when you speak to your Alexa enabled device. For example, you might say “Alexa, ask Neil what specials Big Wings BBQ has on dinner tonight” and Alexa might respond “I will get back to you.” Alexa’s response in the invocation.
Interaction Model: An Alexa interaction model is the communication between you and your Alexa Device. For example, you might ask Alexa a question and how you speak to Alexa would be the interaction model.
Utterance: An utterance is whatever you say to your Alexa to make it interact with you.
What Alexa Skill Will We Create?
For our Alexa Skill, we’ll be using already made code from Github Alexa Repository. You can think of this as the hard drive that many people develop and showcase the skills they’ve made. For our Alexa Skill, we’ll be developing the Alexa Cookbook to help anyone cooking in setting up and preparing meals. If you’re interested in other skills that have been pre-made for you to tinker with, you can click this link to go the Github Alexa Skill Directory and get all the goodies.
Part 1: Getting Started With Creating Your Alexa Skill
Step 1: Sign Up For An Amazon Developer Account (Click here to go straight to the signup page)
Start by signing up for an Amazon Developer account. The process is fairly simple and should take only a few minutes.
Important: If you have an Amazon Echo, you’ll want to sign up for an Amazon Developer account with the same email that you use on your Amazon Echo (or Alexa Skill enabled device). It’s important to have your Amazon Echo and your Amazon Developer account link when learning how to create an Alexa Skill.
Step 2: Open Up Alexa!
After your account is created, start by going to the developer.amazon.com website and logging in. Once you’re logged in, from the top menu select the button that says “Developer Console”. Once at the Amazon Developer Console page, you’ll want to select “Alexa Skill Kit” from the main menu.
Step 4: Click “Create A Skill”
Once you’ve made it to the Alexa Skill page you’ll want to create your first skill! See how easy that was? Once you’ve made it to the Alexa Skills Kit, you’ll want to start by selecting “Create Skill”. This will walk you through the process of creating your first Alexa Skill. Once you’ve clicked the “Create Skill” button you’ll be prompted with a screen letting you name your newly made Alexa Skill.
For our skill, we’ll be creating the Alexa Cookbook so we’ll name our Alexa Skill “Alexa Cookbook”. However, if you’re interested in using a different Alexa Skill feel free to name it whatever you like. From the country selection, select your applicable country. From the bottom, you’ll also want to select “Custom” as we’ll be developing a custom skill.
Step 5: Create An Alexa Skill Invocation Name
Now we need to create an Invocation Name for your Alexa Skill. Simply put, this is the word that will be used by you to let your device know to open your skill/application on Alexa. For example, for this, we might name it “New Game” and so when we want to open the skill on our Alexa device we might say “Alexa, open New Game” and your Alexa-enabled device would know to open the skill. For this, let’s name our skill “New Game”. Once you’ve done this, go ahead and click “Save Model”.
NOTE: If you are planning on publishing (making public) your Alexa Skill, you will need to meet the requirements listed on the Alexa Skill Naming Page.
Step 5: Open Us Sample Alexa Projects
From the Github directory, we went to earlier, we’ll select a project that we will use. This can be viewed by selecting either sample projects form the Amazon Alexa Dashboard and searching for Alexa Cookbook (the skill we will use) or by clicking this link to go directly to Alexa Skill – Alexa Cookbook. Once you’re there, the thing that we’re looking for is the Alexa Skill Interaction Model. You can use the link provided for how to create an Alexa Skill to go straight to the Github page.
Once you’re on the page, go ahead and select models from the file list directory. Simply put, we’re going to copy over the information that tells Alexa how to interact with the user. Once you’ve clicked it you’ll see a file named “en-us.json” – you’ll want to select this file.
From here, you’re going to want to click “Raw” from the top right menu. This will take you to a page where you’ll be able to copy the file over.
Step 6: Copy And Paste Your Interaction Model
Once you’ve got your code copied and ready to go, head over the JSON Editor by selecting the “Invocation” drop-down and then clicking “JSON Editor”. This will allow you to paste in the code that you already have.
Step 7: Click Save!
Step 8: Build The Model!
With the hard work out of the way, it’s time to let Alexa take care of the rest. Go ahead and click “Build Model” from the top right menu and let Alexa Build The Model. This may take a while so, in the meantime, we’ll go ahead and set up the Skill Service. The Skill Service and build model will both be important when learning how to create an Alexa Skill.
Part 2: Skill Service
Step 1: Setup an Endpoint
We’ll need to set up an Alexa endpoint. For this, go to the same menu on the left column where we selected the “JSON Editor” and select “Endpoint”. From here, you’ll want to go ahead and select the AWS Lambda ARN, this is just a fancy way of saying that you will have your code on their computer.
Step 2: Filling Out Information
Once you’ve selected the AWS Network, you’ll want to go ahead and copy your Skill ID, this is important because we’ll be using it in a few minutes.
Your Alexa Skill ID should look something like this:
Once you have this it’s time to head over to Amazon’s Web Services page.
Part 2: Amazon Web Services
Step 1: Sign Up for aws.amazon.com (Click this link to create an account)
Sign up for an Amazon AWS Account if you don’t already have one. If you need to sign up for an Amazon AWS Account don’t worry, they make the process very simple.
Step 2: Lambda
Once you’re in, go ahead and click on the search field and type in “Lambda”, this will present you with several options.
Step 3: Create A Function
Once here, go ahead and select “Create A Function”
Step 4: Now that you’ve made it to the“Create A Function” page on Amazon Web Services, you’ll be presented with several options. For this, we’ll go ahead and select: “Blueprints”.
Step 5: Search For Alexa
Once you’ve successfully selected “Blueprints”, go ahead and search “Alexa” in the search box. From here you’ll be prompted with several options. For our build, we’ll be selecting the “alexa-skill-kit-sdk-factskill”.
Step 5: Now we’ll need to fill out the skill name. Keep in mind when learning how to create an Alexa Skill, we’ll need to only include “-” instead of spaces as they won’t be allowed in this form. If this is your first time creating an Alexa Skill, you’ll be required to create a new role. For this, simply select “Create New Role”.
Step 6: Create Function!
Once you’ve created your role you’re all set. Click create function.
Step 7. Create An Alexa Skill Trigger
Now that we have the skill built out, we’ll need to add in a trigger. To do this, go over to the right column and select Alexa Skills Kit from under Triggers.
Step 8: Link Up The Alexa Skill
At this point, we’ll want to link up the Alexa Skill. Scroll down and using the code that we entered, input the Alexa Skill ID. In this case, mine was:
Step 9: Copy And Paste The Amazon Alexa Skill ARN
Now we need to copy over the ARN to the developer console we were in earlier.
Go ahead and paste the code into your developer console page:
Once you’ve copied over the code, you’ll want to click save endpoints to finalize the connection.
Testing with Amazon Alexa is fairly simple. From the top menu, select test. Once on the test page, you’ll be able to test your Alexa Skill. It’s important to test your new skill when learning how to create an Alexa Skill.