Reputation: 23
I am new to alexa. I created a custom intent to just repeat a custom text (no slots etc). However my custom intent is never invoked. saved and deployed my code. I get empty JSON request and response - meaning my intent is never invoked. I saved the code and deployed. Adding below the intent node js code handler.
// Begin Code added by Gopalakrishnan for Handling Check Workday Inbox
const checkInboxIntentHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'checkInbox';
},
handle(handlerInput) {
const speakOutput = 'I am here to check Workday Inbox!';
return handlerInput.responseBuilder
.speak(speakOutput)
//.reprompt('add a reprompt if you want to keep the session open for the user to respond')
.getResponse();
}
};
/*End*/
Upvotes: 1
Views: 35
Reputation: 1073
There is nothing wrong with the code provided here. Here are a couple of things I recommend checking:
addRequestHandlers
function in the skill builder. Typically this builder is at the bottom of your index.js file.canHandle
method.Upvotes: 1