I've already posted this question to the amazon developer forum but don't receive an answer there. I guess Stackoverflow should've been the first choice from the beginning:
From my understanding if I use a Custom Slot Type even if the list of its possible values does not contain the spoken word the spoken word is still passed to the function. The documentation says
A custom slot type is not the equivalent of an enumeration. Values outside the list may still be returned if recognized by the spoken language understanding system.
Now I have a Custom Slot Type LIST_OF_PERSONS
with values Matthias|Max
and an utterance of
EmployeeDetailsIntent {Person}
If I call this intend with a value not in LIST_OF_PERSONS
the Intent still gets called but the JSON does not contain a "value" key for the Slot:
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.a943e233-0713-4ea5-beba-d9287edb6083",
"locale": "de-DE",
"timestamp": "2017-03-09T14:38:29Z",
"intent": {
"name": "EmployeeDetailsIntent",
"slots": {
"Person": {
"name": "Person"
}
}
}
}
Is this "works as designed" or a bug? How do I access the spoken word in the Intent then? As this.event.request.intent.slots.Person.value
is undefined?
My code lives in AWS lambda and I'm using the nodejs alexa-sdk Version 1.0.7. The language of my Skill is German.