question

RJ Scott avatar image
RJ Scott asked

How to issue a re-prompt?

According to test case 4.11, the skill must deliver a reprompt after X seconds if the user doesn't respond to an initial question. How does one accomplish this? I am assuming that I would keep the http connection open and just send another JSON packet across when I want a reprompt to happen? I ask first because this requirement requires a bit of major reconstruction, so I want to make sure it's the right approach before jumping in.
alexa skills kitdebugging
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

RJ Scott avatar image
RJ Scott answered
Ok, I feel sheepish... a quick search found a missing piece of json that does this for you: { "version": "1.0", "response": { "outputSpeech": { "type": "PlainText", "text": "knock knock" }, "card": { "type": "Simple", "content": "knock knock", "title": "TsaTsatzu's Knock Knock jokes" }, "reprompt": { "outputSpeech": { "type": "PlainText", "text": "knock knock" } }, "shouldEndSession": false }, "sessionAttributes": { "call": "1", "state": 0, "lastIntent": "RESPONSE", "joke": "knock knock|meg!|meg up your mind!" } }
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.