My request is as follows:
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId.0941c2f8-30b3-4001-aa05-1cec3a715b05",
"intent": {
"name": "Buses",
"slots": {
"Heading": {
"name": "Heading",
"value": "eastbound"
}
}
},
"locale": "en-US",
"timestamp": "2017-12-27T02:45:22Z"
}
The above was generated by the Service Simulator after I supplied the activation utterance.
My AWS Lambda function has the following:
'Buses': function() {
const itemSlot = this.event.request.intent.slots.Item;
let heading;
if (itemSlot && itemSlot.value) {
console.log(itemSlot.value);
heading = itemSlot.value.toLowerCase();
}
else
console.log("No slots!");
No slots!
was output to the console.