alexa-js / alexa-app

A framework for Alexa (Amazon Echo) apps using Node.js
https://www.youtube.com/watch?v=pzM4jv7k7Rg
MIT License
1.03k stars 212 forks source link

[Certification fail feedback] Understanding reprompt usage #353

Open StErMi opened 6 years ago

StErMi commented 6 years ago

I just received the certification feedback. Their saying that: "The skill prompts users for an input then immediately closes the session. Make sure the session remains open anytime users are prompted for inputs."

This is my actual code:

response.say(message).reprompt(messageLead).shouldEndSession(false);

and this is the JSON Output:

{
    "body": {
        "version": "1.0",
        "response": {
            "outputSpeech": {
                "type": "SSML",
                "ssml": "<speak>Hi there! Welcome to the Crypto Manager. I can tell you the price and volume of every crypto on more than 115 exchanges and convert them in FIAT or other crypto. Just ask me \"Tell me the BTC price on Kraken\" or \"What's the ETH price in EUR on GDAX\" or even \"What's the LTC volume on Kraken\".</speak>"
            },
            "directives": [],
            "reprompt": {
                "outputSpeech": {
                    "type": "SSML",
                    "ssml": "<speak>What else would you like to know?</speak>"
                }
            },
            "shouldEndSession": false
        },
        "sessionAttributes": {}
    }
}

And this is what I see in the Skill Test page.

image

Should I see also the reprompt message? Should I see something that tell me that the session is not ended?

I've no way to test on a real device because in Italy Alexa is still not available.

Thanks!

tejashah88 commented 6 years ago

Generally the reprompt message plays after about 5 seconds of not receiving user input. The general way to verify that it's working is checking the JSON responses and seeing that shouldEndSession is set to false. Also, you can check out echosim.io for testing against a virtual Alexa. Try it out and let us know if the feedback is consistent with what you've experienced.

trogmaniac commented 6 years ago

Do you add a display directive (for Echo Show) by any chance? In that case the response must not contain a shouldEndSession. IOW, it can't be either true or false, it must be deleted from the response object.