Connect Azure Bot with Alexa Channel | Create Alexa Skill

Alexa provides a set of built-in capabilities, referred to as skills. For example, Alexa’s abilities include playing music from multiple providers, answering questions, providing weather forecasts, and querying Wikipedia.

The Alexa Skills Kit lets you teach Alexa new skills. Customers can access these new abilities by asking Alexa questions or making requests. You can build skills that provide users with many different types of abilities.

Pre-requisites

  1. Amazon Alexa Account
  2. Azure Subscription

This demo, we will be using an Echo Bot. To learn to create an Echo Bot using Azure Bot Service, go to my post on Create Echo Bot using Azure Bot Service. Feel free to use any other bot deployed in Azure.

Create Alexa Skill

  • Give the name of the skill and choose a Custom model and method to host is “Provision your own“.
  • Click on Create Skill.
  • Choose a template to add to your skill – Hello World Skill.
  • Under Interaction model click on JSON Editor.
  • Replace the JSON with below JSON and add your skill invocation name. This JSON is taken from Bot Builder Community.
{
    "interactionModel": {
        "languageModel": {
            "invocationName": "<YOUR SKILL INVOCATION NAME>",
            "intents": [
                {
                    "name": "GetUserIntent",
                    "slots": [
                        {
                            "name": "phrase",
                            "type": "phrase"
                        }
                    ],
                    "samples": [
                        "{phrase}"
                    ]
                },
                {
                    "name": "AMAZON.FallbackIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.NavigateHomeIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.CancelIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.HelpIntent",
                    "samples": []
                },
                {
                    "name": "AMAZON.StopIntent",
                    "samples": []
                }
            ],
            "types": [
                {
                    "name": "phrase",
                    "values": [
                        {
                            "name": {
                                "value": "hi there Alexa"
                            }
                        },
                        {
                            "name": {
                                "value": "you are just going to repeat what I said aren't you"
                            }
                        },
                        {
                            "name": {
                                "value": "what colour is the sky?"
                            }
                        }
                    ]
                }
            ]
        }
    }
}

Users say a skill’s invocation name to begin an interaction with a particular custom skill. For example, if the invocation name is “Daily Horoscopes”, users can say:

User: Alexa, ask Daily Horoscopes for the horoscope for Gemini

You can change your invocation name at any time while developing a skill. You cannot change the invocation name after a skill is certified and published.

For more information, refer Alexa Skill Kit.

  • Click on Save Model and Build Model.
  • Go to channels page of Azure Bot and click on Alexa.
  • Copy the Alexa Service Endpoint URI.
  • After Building Alexa Skill, click on Endpoint.
  • Select HTTPS and paste the Alexa Service Endpoint URI in the first input box. Select “My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority” from the second input box.
  • Save the Endpoints.
  • Go to Invocation and check your skill invocation name. Save Model and Build it.
  • Go to your list of skills.
  • Click on View Skill ID and copy it and paste it in your Azure Bot Alexa channel page.
  • Save the Alexa Config Settings and return to your skill in Alexa Console. Click on Test.
  • Change the Skill testing to Development and start testing.
Alexa Skill Testing

Thank you All!!! Hope you find this useful.

Leave a Reply

Up ↑

Discover more from JD Bots

Subscribe now to keep reading and get access to the full archive.

Continue reading