Hello, Alexa

Justin Washington

jwashington@mobiquityinc.com

What is Alexa?

You can make Alexa better!

Alexa Service

Creating Your Own Alexa Skill

Step 1

Designing a Voice Interface

Alexa, ask Fandango to purchase movie tickets for Finding Dory at 2:00.

{
  "intents": [
    {
      "intent": "MoviePurchaseIntent",
      "slots": [
        {
          "name": "movieTitle",
          "type": "MOVIE_TITLE"
        },
        {
          "name": "movieTime",
          "type": "Amazon.TIME"
        }
      ]
    }
  ]
}

MoviePurchaseIntent purchase movie tickets for {movieTitle} at {movieTime}

Step 2

Implement backend for your skill

Alexa Lambda Event Structure

Session Information

 sessionId

applicationId

userId and accessToken

custom attributes

Request Information

type

requestId

Types of Requests

  • LaunchRequest
  • IntentRequest
  • SessionEndedRequest

Launch Request

A user made a request to an Alexa skill, but did not provide a specific intent

Ex. Alexa, Start room butler

{
  "type": "LaunchRequest",
  "requestId": "string",
  "timestamp": "string"
}

Intent Request

A request made to a skill based on what the user wants to do

Ex. Alexa, tell taxi to schedule a ride for me at 2:00 

{
  "type": "IntentRequest",
  "requestId": "string",
  "timestamp": "string",
  "intent": {
    "name": "string",
    "slots": {
      "string": {
        "name": "string",
        "value": "string"
      }
    }
  }
}

Session Ended Request

{
  "type": "SessionEndedRequest",
  "requestId": "string",
  "timestamp": "string",
  "reason": "string"
}

OnSessionStarted

OnLaunchRequest

OnIntentRequest

OnSessionEnded

Alexa Skill Lifecycle

Structuring Your Response

{
  "version": "string",
  "sessionAttributes": {
    "string": object
  },
  "response": {
    "outputSpeech": {
      "type": "PlainText | SSML",
      "text": "string",
      "ssml": "string"
    },
    "reprompt": {
      "outputSpeech": {
        ...
      }
    },
    "shouldEndSession": boolean
  }
}

Thank you

Hello, Alexa

By Justin Washington