alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

Getting Slot ID in Intent - undefined #198

Closed felixfrtz closed 7 years ago

felixfrtz commented 7 years ago

Hey,

I am trying to get the slot ID within an intent using this.event.request.intent.slots.SLOTNAME.id, however it returns undefined, eventhough this.event.request.intent.slots.SLOTNAME.value returns the correct value, and there is an ID defined for that entry.

Any ideas why that might be? Is this the correct way to access the ID?

felixfrtz commented 7 years ago

Nevermind, I just saw that one has to get the ID using the resolutions array. For reference: https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/154 and https://developer.amazon.com/docs/custom-skills/define-synonyms-and-ids-for-slot-type-values-entity-resolution.html#intentrequest-changes