I have a need to access custom slot values after an interaction and update a dynamodb table. As a model, I am using this example:
However, when I attempt to access the slot user values I am coming up empty. Testing the lambda function, it looks like the "this.event.request.intent" object is undefined so my path to the value I am after is not valid. I was using the util module to inspect the object but I am unsure of what I am missing here in terms of the response/request structure and how to get this value. Clearly, it works in the cited example - not sure what it is about my structure that is throwing this off. Thanks in advance for any pointers! Below is my model. I am trying to get the VoterName slot value.
{ "interactionModel": { "languageModel": { "invocationName": "voting booth", "intents": [ { "name": "AMAZON.CancelIntent", "samples": [] }, { "name": "AMAZON.HelpIntent", "samples": [] }, { "name": "AMAZON.StopIntent", "samples": [] }, { "name": "AMAZON.YesIntent", "samples": [] }, { "name": "RegisterIntent", "slots": [ { "name": "VoterName", "type": "VoterName", "samples": [ "mom", "dad", "son" ] } ], "samples": [ "register to vote", "register" ] } ], "types": [ { "values": [ { "id": "", "name": { "value": "Son", "synonyms": [] } }, { "id": "", "name": { "value": "Dad", "synonyms": [] } }, { "id": "", "name": { "value": "Mom", "synonyms": [] } } ], "name": "VoterName" } ] }, "dialog": { "intents": [ { "name": "RegisterIntent", "confirmationRequired": false, "slots": [ { "name": "VoterName", "type": "VoterName", "elicitationRequired": true, "confirmationRequired": false, "prompts": { "elicitation": "Elicit.Intent-RegisterIntent.IntentSlot-VoterName" } } ] } ] }, "prompts": [ { "id": "Elicit.Intent-RegisterIntent.IntentSlot-VoterName", "variations": [ { "type": "PlainText", "value": "Voter ID is crucial to democracy - can I have your name please?" } ] } ] } }