question

Venkata R Alladi avatar image
Venkata R Alladi asked

Intent.Slots value is undefined

I am writing a very basic sample kills for Alexa. I am having trouble resolving the Intent.Slot's value. It's always undefined from Echo. Any idea what I am missing here? RA
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Greg Laabs avatar image
Greg Laabs answered
It's request.intent.slots Not Intent.Slot Case matters, and you are missing an S from slots
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Venkata R Alladi avatar image
Venkata R Alladi answered
I have exactly what you said, "intent.slots.User.value" But no luck.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
Make sure that you have properly set up your Intent Schema and Sample Utterances in the developer console. An example of this along with instructions for creating an Alexa skill using lambda can be found here: https://developer.amazon.com/appsandservices/solutions/alexa/alexa-skills-kit/docs/developing-an-alexa-skill-as-a-lambda-function#Testing%20the%20Sample%20with%20an%20Echo%20Device.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

PKR avatar image
PKR answered
Make sure you're passing 'intent' into your function as an argument.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Todd J. Mullen avatar image
Todd J. Mullen answered
I found this trying to answer the same question / problem. It sounds like I was stuck like you and I gave up. However, I started another test / example and realized that I forgot about the values listed for the custom slot list. So in the "Skills > interaction model > intent schema" you might have: ... "intent": "RecipeIntent", "slots": [ { "name" : "Item", "type": "LIST_OF_ITEMS" } ... but in the "Custom Slot Types" section below you lave to list allowed values for the LIST_OF_ITEMS type. If / when the value you're trying to respond to isn't listed there, it probably won't be recognized as a valid value and won't be treated as a valid/known value. You can see this exchange under the "Skills > interaction model > test" tab. You enter "your keyphrase" hit "enter / click "Ask SkillName" to process the request. Under the "Lambda Request" there should be a section like ... "slots": { "Item": { "name": "Item", "value": "your keyphrase" } } ... where "your keyphrase" is the value you're looking for, [b]BUT[/b] without "your keyphrase" is not in the LIST_OF_ITEMS value list, you'll see a "Lambda Request" like this: ... "slots": { "Item": { "name": "Item" } } ... So, your "Item" slot is set, but the value property isn't and everything appears broken. Thought I'd share what my problem was. Hopefully you and others will be able to save yourselves some time. 8)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.