Create Intents, Utterances, and Slots

This document describes how you create the intents, slots, and sample utterances for your skill. An intent represents an action that fulfills a user's spoken request. Intents can optionally have arguments called slots. The sample utterances are set of likely spoken phrases mapped to the intents.

This topic explains how to define your intents and slots. For details and code examples that show how you access intents and slots sent in user requests during skill runtime, see Handle Requests Sent by Alexa.

Create a New Custom Intent

When you create a new custom intent, you provide a name and a list of utterances that users would say to invoke this intent. You can start by just writing out the full phrases and then identify the slots within the phrases later.

For example, for an intent to plan a trip (PlanMyTrip), you might write utterances like this:

i am going on a trip on friday
i want to visit portland
i want to travel from seattle to portland next friday
i'm driving from seattle to portland
i'm driving to portland to go hiking
...(several more)

For recommendations for writing good sample utterances, see:

For limits on the number of intents you can create in a single skill, see Interaction model limits.

To create a new custom intent

  1. From the left-hand sidebar, click Add next to Custom > Interaction Model > Intents.
  2. Select the Create custom intent option.
  3. Enter the name of the new intent and click Create custom intent. This adds a new intent and opens its detail page, displaying the intent's sample utterances and slots.
  4. Enter a sample utterance in the edit box and click the plus sign or press Enter. Repeat this for a few representative utterances.

    • Be sure to include utterances that include words and phrases that will vary when users say the intent. In the example above, this includes words and phrases like "friday," "san francisco", "seattle," and "next thursday."
    • Sample utterances must be unique. You cannot have duplicate sample utterances mapped to different intents.
  5. Identify the slots in the utterances as described below.
Built-in Library

The Alexa Skills Kit includes a large library of built-in intents you can use instead of creating your own. You do not need to write the utterances for these intents, thus simplifying development.

You can search the full built-in intent library from within the developer console. Create a new intent as described above, but select the Use an existing intent from Alexa's built-in library option. Click Add Intent for each built-in intent to add.

Intent Name Requirements

The name of the intent can only contain case-insensitive alphabetical characters and underscores. No numbers, spaces or special characters are allowed. Intent names cannot overlap with any slot names in the schema.

Note that the built-in intents use the AMAZON namespace, so they are specified using a period, like this: AMAZON.HelpIntent. This notation is only valid for specifying the AMAZON namespace. Periods should not be used in other intent names.

For example, GetZodiacHoroscopeIntent is valid, while Get Zodiac Horoscope Intent, Zodiac.GetHoroscopeIntent and Get2015HoroscopeIntent are invalid.

Rules for Sample Utterances

Follow these rules when you write your sample utterances.

  • Write out numbers as words and not digits ("five", not "5").
  • Separate acronyms and other phrases involving spoken letters by periods and spaces ("n. b. a.", not "nba").
  • Leave out punctuation marks in most cases. ("ten dollars", not "$10". "three point five stars", not "3.5 stars"). Exceptions:
    • Include periods after letter abbreviations ("n. b. a.", "e. t. a.").
    • Include apostrophes in possessive and contractions ("romeo's" and "i'm").
    • Include hyphens that are word-internal ("man-eating") but in no other cases.
  • Spell words with umlauts (ä, ü, ö) and sharp S (ß) correctly. For example, use "büro" not "buero", and "fußball"not "fussball".
  • If the word for a slot value may have apostrophes indicating the possessive, or any other similar punctuation (such as periods or hyphens) include those within the brackets defining the slot. Do not add 's after the closing bracket. For example:

    • For possessives
      • Use: "martini's" as a custom value for {Drink} and "tell me a {Drink} ingredients" in the sample utterances
      • Do not use: "tell me a {Drink}'s ingredients"
    • For hyphenated values
      • Use: editor-in-chief in the custom values and {Position} in the sample utterances
      • Do not use: editor in the custom values and {Position}-in-chief in the sample utterances
  • Write utterances in the language for the skill. For example, for the German version of your interaction model, write the sample utterances in German.

Note: as you test, you will likely add additional sample utterances. After adding a new utterance, there may be a short delay before the new utterance is available for testing, particularly if you want to test the utterance with your invocation name ("Alexa, ask <invocation name> to give me the horoscope for Gemini").

Identify the Slots for the Intent

After you write a few utterances, note the words or phrases that represent variable information. These become the intent's slots. For example, in the utterances identified earlier, the variables are highlighted in red.

i am going on a trip on friday
i want to visit portland
i want to travel from seattle to portland next friday
i'm driving from seattle to portland
i'm driving to portland to go hiking

Create a slot for each of these words or phrases and then replace the original word with the slot name in curly brackets ({ }).

To create a slot

  1. Click an intent in the left-hand navigation to open the detail page for the intent.
  2. In an utterance, highlight the word or phrase representing the slot value.
  3. In the drop-down that appears, enter a name for the slot in the edit box and click Add.

    This action creates a new slot for the intent and replaces the original value in the utterance with the slot name in curly brackets ({ }).

    For the example shown earlier, you would note that "seattle" represents the city the user wants to depart from, so you might call this slot fromCity. The utterance would now look like this:

    i want to travel from {fromCity} to portland next friday
  4. Repeat for all the remaining variable words.

    In the PlanMyTrip intent, you might end up with the slots like this:

    • fromCity
    • toCity
    • travelDate
    • travelMode
    • activity

The Intent Slots section after the sample utterances displays the slots you add. When you highlight a word or phrase in an utterance, you can add a new slot or select an existing slot.

For example, the set of utterances shown earlier would now look like this:

i am going on a trip on {travelDate} 
i want to visit {toCity} 
I want to travel from {fromCity} to {toCity} {travelDate} 
I'm {travelMode} from {fromCity} to {toCity}
i'm {travelMode} to {toCity} to go {activity}

Assign Slot Types to Your Slots

Every slot has a slot type that determines how the user input is handled and passed on to your skill. You can assign slot types from the detail page for an intent or the slot detail page for the slot. When assigning slot types, you can:

  • Use a built-in slot type. The built-in types include types for converting data such as dates, and types that provide recognition for commonly-used lists of values, such as large cities. You can extend some of these types with additional values as well.
  • Create a custom slot type. In this case, you provide the slot type name and a list of custom values.

To assign slot types:

  1. Click an intent in the left-hand navigation to open the detail page for the intent.
  2. In the Intent Slots section below the sample utterances, click the Select a slot type menu.

    You can also open the detail page for the slot: in the left-hand navigation, find the intent and its list of slots. Click the slot name.

  3. To use an existing custom slot type or one of the built-in types, select the type from the list.
  4. To create a new custom slot type, see Create and Edit Custom Slot Types.
  5. Be sure to click Save Model to save the slot type changes.

Edit or Upload Sample Utterances in Bulk

You can use bulk edit to quickly upload or edit your sample utterances. When editing in bulk edit, include slots in the utterances manually with curly brackets.

To bulk edit or import utterances:

  1. Click an intent in the left-hand navigation to open the detail page for the intent.
  2. In the upper-right, above the Sample Utterances section, click Bulk Edit.
  3. Either edit the sample utterances in the edit box, or drag a CSV file to the window to import the contents.

    • Enter one utterance per line.
    • Importing a CSV file replaces the existing utterances shown in the edit box.
    • Select The CSV below contains headers to omit the top line shown in the text field.
    • Your changes to the utterances are not saved until you click Submit.
  4. Click Submit.

JSON for Intents and Utterances (Interaction Model Schema)

You can see and edit the JSON representation of all of your intents and utterances in the JSON Editor. The interactionModel.languageModel.intents property contains an array of intent objects. For a given intent, the samples property contains an array of sample utterances. If the intent has any slots, the slots property contains an array of slot objects. A slot object can also have a samples property if you have defined user utterances for the slot as part of the dialog model.

This example shows a portion of the intent object for a PlanMyTrip intent. The utterances for the intent are in interactionModel.languageModel.intents[].samples. Each slot has its own samples array. For brevity, other properties within interactionModel and languageModel are not shown. For details about the interaction model JSON, see Interaction Model Schema.

  "interactionModel": {
    "languageModel": {
      "intents": [
          "name": "PlanMyTrip",
          "slots": [
              "name": "travelDate",
              "type": "AMAZON.DATE",
              "samples": [
                "I am taking this trip on {travelDate}",
                "on {travelDate}",
              "name": "toCity",
              "type": "AMAZON.US_CITY",
              "samples": [
                "I'm going to {toCity}",
              "name": "fromCity",
              "type": "AMAZON.US_CITY",
              "samples": [
                "I'm starting from {fromCity}"
              "name": "travelMode",
              "type": "LIST_OF_TRAVEL_MODES",
              "samples": [
                "I am going to {travelMode}",
              "name": "activity",
              "type": "LIST_OF_ACTIVITIES",
              "samples": [
                "I plan to {activity}"
          "samples": [
            "I want to travel from {fromCity} to {toCity} {travelDate}",
            "i want to visit {toCity}",
            "i am going on trip on {travelDate}",
            "I'm {travelMode} from {fromCity} to {toCity}",
            "i'm {travelMode} to {toCity} to {activity}",
            "plan a trip",
            "plan a trip to {toCity} ",
            "plan a trip starting from {fromCity} ",
            "I'd like to leave on {travelDate} ",
            "I'd like to leave on the {travelDate} ",
            "I'd like to fly out of {fromCity} "