Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

APIs Build an Alexa Skill Building an Alexa Skill Creating an Intent Schema

I have no idea what this code says and what it does, Can someone help me i literally have No idea.

In the teachers notes i tried and i revised the code over and over again and there is nothing that i could understand, I Have no idea

Steven Parker
Steven Parker
231,269 Points

Share your code here to make it possible for someone to analyze the issue and give you an answer.

Be sure to use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. :arrow_heading_down:   Or watch this video on code formatting.

You can also make a snapshot of your workspace and post the link to it here.

Here's The Code Steven,

{

"intents": [

{

  "intent": "GetDefinition",

  "slots": [
    {

      "name": "Term",

      "type": "LIST_OF_TERMS"

    }

  ]

},

{

  "intent": "AMAZON.HelpIntent"

},

{

  "intent": "AMAZON.StopIntent"
},

{

  "intent": "AMAZON.CancelIntent"
}

] }

1 Answer

Steven Parker
Steven Parker
231,269 Points

This intent schema, along with some other parts that will be covered in later videos, defines what the skill will do. This section mostly just gives names to the other parts. Perhaps this breakdown will help:

{                                       
  "intents": [                          <-- list of what this skill will do
    {                                   
      "intent": "GetDefinition",        <-- the name of the first one
      "slots": [                        <-- things to listen for
        {                               
          "name": "Term",               <-- name of the first thing
          "type": "LIST_OF_TERMS"       <-- what kind of thing it is
        }                               
      ]                                 
    },                                  
    {                                   
      "intent": "AMAZON.HelpIntent"     <-- something else the skill will do
    },                                      these are all built-ins that
    {                                       need no slot definitions
      "intent": "AMAZON.StopIntent"     
    },                                  
    {                                   
      "intent": "AMAZON.CancelIntent"   
    }                                   
  ]                                     
}                                       

Does that make it clearer?

Yes thank you, Steven