diff --git a/backend/helpers/amazon.js b/backend/helpers/amazon.js
index f280ed4..13bf567 100644
--- a/backend/helpers/amazon.js
+++ b/backend/helpers/amazon.js
@@ -66,16 +66,17 @@ var generateInteractionModel = function (skill) {
//Special Amazon intent
- allIntents.push (
- {
- name: 'AMAZON.YesIntent',
- samples: [],
- },
- {
- name: 'AMAZON.NoIntent',
- samples: [],
- }
- );
+ allIntents.push ({
+ name: 'YesIntent',
+ samples: ['Yes', 'Yes please', 'Sure'],
+ slots: [],
+ });
+
+ allIntents.push ({
+ name: 'NoIntent',
+ samples: ['No', 'No thank you'],
+ slots: [],
+ });
skill.intents.map (intent => {
allIntents.push ({name: intent.intentName, samples: intent.questions});
diff --git a/backend/models/alexa.js b/backend/models/alexa.js
index 9723c1f..22cbdc7 100644
--- a/backend/models/alexa.js
+++ b/backend/models/alexa.js
@@ -50,7 +50,7 @@ module.exports = {
this.attributes['WaitingQuestions'] = false;
};
- handlers['AMAZON.YesIntent'] = function () {
+ handlers['YesIntent'] = function () {
console.log("yes intent");
if (this.attributes['WaitingQuestions']) {
this.response
@@ -60,7 +60,7 @@ module.exports = {
}
};
- handlers['AMAZON.NoIntent'] = function () {
+ handlers['NoIntent'] = function () {
console.log("No intent");
if (this.attributes['WaitingQuestions']) {
this.attributes['WaitingQuestions'] = false;
@@ -71,7 +71,7 @@ module.exports = {
handlers = {
LaunchRequest: function () {
this.response
- .speak (activeSkill.invocationAnswer + ' Would you like to hear possible questions ?')
+ .speak (activeSkill.invocationAnswer + ' Would you like to hear possible questions ?')
.listen (constants.voiceResponseStrings.GENERIC_CONTINUE); //Phrase from listen doesn't work !!!
this.attributes['WantToHearQuestions'] = true;