How to Build Survey Skill for Amazon Alexa
Written by Hasan Rizvi
Posted On Dec, 14, 2017
Select Alexa Skill
Give name of your bot in name text field and click on create button
Now the page displayed to you is the dashboard for your Alexa skill. And in the left side menu you have various options to create/modify/configure your Alexa skill.
Creating Survey Skill
To create your survey skill you probably would have questions. You would be creating single story for every single question. Pick your first question and click on Entities on the left side menu
Create an Entity
You would be showing entities page and list of entities would be there which you will create. Click on “Create an Entity” button, here your will create the entities of options for your every questions.
Give any name of your entity which you can identify that this entity is for that particular question.
In the values field input your first question’s options separated by comma ( , )
And then click on “Add an Entity” button now you will be directed to the Entities page where all of your created entities list is shown
Now after creating entity of options for your survey question click on “Manage Stories” on the left side menu. Click on “Create A Story” button on top right, now you will have the page to create stories
Here you will define what user will say and in response to that what Alexa would respond.
In the first “User Says” write anything in response to which you want Alexa to ask question. Make sure that phrase match is selected.
Now click on “Bot sends” button on the bottom right. You would have another block now here whatever you will write would be spoken by Alexa. Write your survey question here
After writing your survey question add another user says block by click on “User Says” button on the bottom left. Here you will select the “Entity Match” and dropdown will appear. Select en Entity for your options that you have created
After selecting your entity click on “Save” button on the top right corner
Your story would be saved now.
Configuring Alexa Skill
Before deploying your skill to Alexa it is necessary to configure your skill. Configuration require specific information like when your skill would Launch/stop/start/end what Alexa will response.
To configure your skill select “Alexa Configuration” from the left side menu.
Now the form is shown to you
Input the invocation name for your skill. Invocations name is the name that if your skill is enabled and whenever your will Speak that particular name Alexa will activate your skill.
Select on Launch option
If you will select message you need to write the message the Alexa would speak when she will activate your skill
If you check story then the story box would appear from which you select any story that Alexa would start on launching your skill. If you select multiple stories on launch Alexa would randomly pick any one of them
Input stop message. While playing with your skill if you say stop to Alexa. What Alexa would respond is Stop Message
Input End Message, end message is spoken by Alexa when your skill is ending after any successful execution of any story.
Input Help Message. If any user does not know about your skill and says “Help” after activating your skill. Then Alexa would tell this help message to user. Here you will write how a user can use your skill.
Deploying Alexa Skill to Amazon
From the left side menu select “Alexa Deploy” option. On the deploy page you have the “Deploy” button at the centre of the page. Click on “Deploy” button it will ask you to input your Amazon Developer account for skill to be deployed on you Amazon Account. After you sign in onto Amazon developer account your skill will be processed to deploy. It will take few seconds to deploy, meanwhile you will be shown processing.
Testing Alexa Skill
If you want to test your skill before testing it on actual device. This option is also available for you. Select “Alexa Testing” from the left side menu. The testing page will be opened. Make sure you are login to your Amazon developer account. If you are not logged in a Modal would be shown for login. Login is necessary for testing your Alexa skill.
On the page there is one drop down where all of your story queries are listed. Select your query from the drop down and click on “Ask” button. The Alexa response will be displayed on “Alexa Response” fields in text format.