1

How should I set the shouldEndSession to be false in my intent handler?

I tried to do something like:

response.shouldEndSession(false);

But it didn't work. I'm using JavaScript.

Roddy of the Frozen Peas
  • 14,380
  • 9
  • 49
  • 99
Daolin
  • 614
  • 1
  • 16
  • 41

1 Answers1

1

If you're using Node.js, you should be able to do the following:

response.shouldEndSession(false, "Reprompt your user here");

If you're using just plain Javascript and just setting the value in your return object, you want to include the following if your response:

{
...
  "reprompt": {
    "outputSpeech": {
      "type": "PlainText",
      "text": "Reprompt your user here"
    }
  },
  "shouldEndSession": false
}
thetaiko
  • 7,816
  • 2
  • 33
  • 49