SCCapstone / CognitoFormsDev

MIT License
0 stars 0 forks source link

User can say, "tell cognito next question" #21

Closed tjcocklin closed 5 years ago

tjcocklin commented 6 years ago

Alexa: "I have a question for you, " Alexa then reads a question from the form, along with the accepted responses.

aylapaz commented 5 years ago

I pushed my changes for this, but am unsure if it works until I (or somebody) can test it

tjcocklin commented 5 years ago

Code tested, and it bugged out. The problem is this:

this.response.speak(speechOutput); this.emit(':submitIntent');

You can't make make alexa talk and move to another intent, its one or the other. the correct format for speech is:

this.response.speak(speechOutput); this.emit(':responseReady');

To shift control to another intent you use:

this. emit('insertIntentName'); //note that your intent doesn't require this at all.

In addition, the answer options need to be stated for the questions, (e.g. option 1: first choice, option 2: second choice, etc.)