Here is what I have - 2 intents (RequestBookingIntent and ConfirmBookingIntent):
1.RequestBookingIntent
https://i.stack.imgur.com/wxRWc.png
2.ConfirmBookingIntent
https://i.stack.imgur.com/bbjYE.png
The corresponding 2 intent handlers and those handlers added to the request handlers collection are shown below
exports.handler = Alexa.SkillBuilders.custom()
.addRequestHandlers(
LaunchRequestHandler,
HelloWorldIntentHandler,
RequestBookingIntentHandler,
ConfirmBookingIntentHandler,
HelpIntentHandler,...
const RequestBookingIntentHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'RequestBookingIntent';
},
handle(handlerInput) {
const speechText = 'Your favorite room...';
return handlerInput.responseBuilder
.speak(speechText)...
const ConfirmBookingIntentHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'ConfirmBookingIntent';
},
handle(handlerInput) {
const speechText = 'Ok confirmed!';
return handlerInput.responseBuilder
.speak(speechText)....
But the second intent handler never gets fired as shown below
https://i.stack.imgur.com/GfiRe.png
In the above figure with the input of text i am loosing my sleep on this
the ConfirmBookingIntent
should have sent Ok confirmed!
but instead, I got the (blue background) generic text Sorry, I don't know that one.
Any hint is much appreciated.
Thanks a lot!
Ram