How to create Amazon Alexa Skill with Botsify

Written by Hasan Rizvi
Posted On Dec, 22, 2017
Alexa is an intelligent personal assistant developed by Amazon, first used in the Amazon Echo and the Amazon Echo Dot devices developed by Amazon.

To develop your survey skill for Alexa device follow these steps:
  1. Create a Bot with Alexa Skill
  2. Creating an Entity with Amazon Alexa
  3. Creating a Story with Amazon Alexa
  4. Configuring an Amazon Alexa Skill
  5. Deploying Alexa Skill to Amazon Alexa
  6. Testing Alexa Skill


Create a Bot with Alexa Skill

  1. Login to your Botsify account
  2. Select Alexa Skill
  3. Give name of your bot in name text field and click on create button
  4. 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;

  1. Click on Entities from the left menu bar on the left side of the screen.
  2. Click on “Create an Entity” button to create new entity.
  3. Pick a name for your entity under ‘Entity name’.
  4. Enter all the values of entity separated by comma.
  5. 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.

  1. Now after creating entity of options for your survey question click on “Manage Stories” from the left side menu.
  2. Click on “Create A Story” button on top right, now you will have the page to create stories
  3. 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.

  1. To configure your skill select “Alexa Configuration” from the left side menu.
  2. Now you need to fill up the form.
  3. 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.
  4. Select On Launch option
    1. If you will select “Message” option; You need to write the message the Alexa would speak when your skill is activated.
    2. 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
  5. Input stop message; While playing with your skill if you say “Stop” to Alexa. This message will be triggered
  6. Input End Message; This message will be triggered when your skill has ended after successful execution of a story.
  7. 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

  1. From the left side menu select “Alexa Deploy” option.
  2. 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.
  3. After you Sign Up/ In onto Amazon developer account your skill will be processed to deploy. It usually takes a few seconds to deploy.
  4. Wait for the success message.




Testing Alexa Skill

  1. Click on “Alexa Testing” option from the left sidebar. It will show the dialogue to login with amazon (if you are not logged in)
  2. Select your query from the dropdown
  3. 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

  1. Open Create Story Page
  2. On the create story page you have the user dialogues on the left side.
  3. On the “user says” dialogue, you have two options
    1. Phrase Match
    2. Entity Match
  4. 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.
  5. As you select any entity from the dropdown it would be concatenated with the phrase on text field.
  6. Entities that you are using on “user says” block can be referenced on “Bot Says” block.
    1. On the “Bot Says” block click on “variables” right on the “Bot Says” text field.
    2. 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.