Alexa Cheat Sheet

  • Invocation name
    • Use cases
      • Make a request = “Alexa, ask <invocation name> for blah blah…”
      • Use predefined phrases = “Alexa, open<invocation name>…”
        • Ask / Open / Play / Resume / Start
      • Direct invocation = “Alexa, <invocation name>…”
    • CANNOT use launch phrases, article, connecting words
      • app, weather, the, a, and…
    • Can be changed during development, cannot be changed after a skill is certified and published
  • Interaction models
    • Pre-built models
      • Music
      • Video
      • Home Appliances
      • Baby activities
      • Lists
    • Custom models
  • Voice Action
    • Make a request = click a button
    • Collect information = show a list
    • Provide information = click an element in a list
  • Sample utterances = templates for voice input, mapped to intents
    • “What’s the temperature now?”
    • “temperature, please?”
  • Slot = Variables in input, consistent across sample utterances
    • {Amount} US dollars in Korean won”
  • Extended Slot = Add more values to a slot
  • Slot elicitation = Alexa asks a question for a slot value
    • Alexa: “Where city are you leaving from?” User:”{FromCity}
  • Slot confirmation = Alexa repeats slot value and user responds “Yes / No”
  • Multi-turn
    • set shouldEndSession to false in response object
  • Voice with Display = also display information when Alexa-enabled device has a screen
    • Card
      • Simple = text only
      • Standard = text + image
      • LinkAccount = for linking account only
      • AskForPermission
  • Intents = actions user may take
    • Standard intents
      • Stop
      • Cancel
      • Ask for help
    • Fallback intents
      • Handle unexpected slot value or response
    • Help intent
  • In-skill Purchase
    • One-time
    • Consumable
    • Subscription
  • Alexa for Business
    • Private skill
  • Skill Endpoint
    • Must be SSL and signed by a trusted CA
  • Account Linking = SSO for Alexa
    • OAuth 2.0
    • Grants
      • Custom skills can use authorization code or implicit grant
      • Music, home appliances must use auth code grant
    • Scope = used to avoid collecting sensitive personal info
      • Example: profile:user_id
  • Customer Profile API = use information from active default Alexa profile
  • SSML = Speech Synthesis Markup Language, add emotion to speech
    • prosody = volume, pitch, speed
    • audio = play audio
      • MP3, 48kbps, 280s, <=24khz, must be publicly accessible with HTTPS
    • emphasis
    • & should be escaped to &amp; just like XML
  • State management
    • Application level = global state
    • Session level
      • Between blue light on and off = during a skill invocation
    • User level
  • Alexa Skills Kit = ASK
  • AWS Service that extends Alexa skills
    • Lambda = most used for Alexa
      • Alexa timeout is 8s, Lambda timeout defaults to 3s
    • CloudWatch
      • Mostly you use CloudWatch logs to collect Lambda logs
      • Alarm to trigger alarm when something goes wrong
    • S3
      • Good for hosting MP3
  • APIs
    • IntentRequest / Display.ElementSelected will return an outputSpeech element
  • Beta test = Green/blue for Alexa
    • Maximum 90 days
  • Hooks
    • pre-