Alexa Skill - Unable to get data from Intent

169 Views Asked by At

I am trying to implement an Alexa Skill with Multi Turn method and a Node.js back end.

alexaApp.intent("findFact", {
    "dialog": {
      type: "delegate"
    },
  },
  function(request, response) {
    console.log("In Fact intent");
  
    var test = this.event.request.intent.slots.testtwo.value;
  
   // console.log(request.dialogState);
    console.log("test fact : " + test);
      response.say(get_fact());
    }
);

Iam not able to get the value within the testtwo slot.

The console displays 'Unhandled exception: Cannot read property 'request' of undefined.' Any idea why ?

Thanks !


ANSWER IS : var test = request.data.request.intent.slots.testtwo.value;

0

There are 0 best solutions below