To develop your survey skill for Alexa device follow these steps:
- Create a Bot with Alexa Skill
- Creating an Entity with Amazon Alexa
- Creating a Story with Amazon Alexa
- Configuring an Amazon Alexa Skill
- Deploying Alexa Skill to Amazon Alexa
- Testing Alexa Skill
Create a Bot with Alexa Skill
- Login to your Botsify account
- 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 an Entity with Amazon Alexa on Botsify
Entities allows you to understand what your users say. An entity is a variable that relates to an intent. This allows Alexa to understand the user’s command. For example: User says “I need the dress in colour red”, Chatbot reads the entity: colour and understands picks red from a list of options which could be red, blue, orange, purple etc.
Amazon provides a number of built in slot types, such as dates, numbers, duration, time, etc. But a user can create custom entities on Botsify for variables which are specific to their skill.
Entities are created to add new vocabulary to your chatbot and function appropriately. To make an entity for Alexa Survey form, follow these steps;
- Click on Entities from the left menu bar on the left side of the screen.
- Click on “Create an Entity” button to create new entity.
- Pick a name for your entity under ‘Entity name’.
- Enter all the values of entity separated by comma.
- And then click on “Add an Entity” button to complete. You will be re-directed to the Entities page.
Creating a Story with Amazon Alexa on Botsify
A story is a conversation between user and chatbot simulated. Stories should be short and made with the intention to be re-used whenever and wherever triggered.
- Now after creating entity of options for your survey question click on “Manage Stories” from the left side menu.
- Click on “Create A Story” button on top right, now you will have the page to create stories
- In stories you will define what you will say to trigger a response from Alexa, Furthermore against each of your command what will be Alexa’s response.
Lets take this example:
- In the “User Says” box you will write what you are expecting from user and in the “Bot Says” box you will write the response you want Alexa to give.
- Let’s say user will say “Hello” and your response will be “How may I help you?”
Configuring an Alexa Skill
Before deploying your skill to Alexa it is necessary to configure it. Configurations require specific information like when your skill would Launch/ Stop/ Start/ End and what Alexa will respond.
- To configure your skill select “Alexa Configuration” from the left side menu.
- Now you need to fill up the form.
- Input the innovation 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” option; You need to write the message the Alexa would speak when your skill is activated.
- If you check “Story” option; You can choose a 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. This message will be triggered
- Input End Message; This message will be triggered when your skill has ended after successful execution of a story.
- Input Help Message; While playing with your skill if you say “Help” to Alexa. This message will be triggered.
Deploying Alexa Skill to Amazon Alexa
- From the left side menu select “Alexa Deploy” option.
- Click the “Deploy” button at the centre of the page. It will ask you to input your Amazon Developer account for skill to be deployed on you Amazon Account.
- After you Sign Up/ In onto Amazon developer account your skill will be processed to deploy. It usually takes a few seconds to deploy.
- Wait for the success message.
Testing Alexa Skill
- Click on “Alexa Testing” option from the left sidebar. It will show the dialogue to login with amazon (if you are not logged in)
- Select your query from the dropdown
- Click on ask button and it will fetch the Alexa response from Amazon and would be shown on “Alexa Response” Fields
How to use Entity in Story
- Open Create Story Page
- On the create story page you have the user dialogues on the left side.
- On the “user says” dialogue, you have two options
- Phrase Match
- Entity Match
- Select entity match and a dropdown of “entities” would appear, all the built-in entities and your custom entities would be available on the dropdown menu.
- As you select any entity from the dropdown it would be concatenated with the phrase on text field.
- Entities that you are using on “user says” block can be referenced on “Bot Says” block.
- On the “Bot Says” block click on “variables” right on the “Bot Says” text field.
- As you click on “variables” a dropdown would appear, in the dropdown all the entities would appear that you used on previous “user says” block.