Build Talking Apps
Should I ask this here or should I take this to Amazon tech support?
Only standard handlers are being recognized in the online console or on my devices.
From index.js:
const HelloWorldIntentHandler = require(’./HelloWorldIntentHandler’);
const ScheduleEventIntentHandler = require(’./ScheduleEventIntentHandler’);
const ScheduleListIntentHandler = require(’./ScheduleListIntentHandler’);
const StandardHandlers = require(’./StandardHandlers’);
…
.addRequestHandlers(
HelloWorldIntentHandler,
ScheduleEventIntentHandler,
ScheduleListIntentHandler,
StandardHandlers.LaunchRequestHandler,
etc.
All of ScheduleListIntentHandler.js:
const Alexa = require(‘ask-sdk-core’);
const ScheduleListIntentHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(
handlerInput.requestEnvelope) === ‘IntentRequest’ &&
Alexa.getIntentName(
handlerInput.requestEnvelope) === ‘ScheduleListIntent’;
},
handle(handlerInput) {
const startDate =
Alexa.getSlotValue(handlerInput.requestEnvelope, ‘startDate’);
const startTime =
Alexa.getSlotValue(handlerInput.requestEnvelope, ‘startTime’);
const duration =
Alexa.getSlotValue(handlerInput.requestEnvelope, ‘duration’);
const eventName =
Alexa.getSlotValue(handlerInput.requestEnvelope, ‘eventName’);
const speakOutput = handlerInput.t(‘APPOINTMENT_MSG’, {
startDate: startDate,
startTime: startTime,
duration: duration,
eventName: eventName
});
return handlerInput.responseBuilder
.speak(speakOutput)
.withShouldEndSession(true)
.getResponse();
},
};
module.exports = ScheduleListIntentHandler;
From LanguageStrings.js
WELCOME_MSG: "Welcome to Lizzy's calendar." +
' Would you like to check schedules, add an event, delete an event, or something else?',
WELCOME_MSG_PERSONAL: "Welcome back to Lizzy's calendar, " +
'{{givenName}}! How can I help you?',
APPOINTMENT_MSG: "You have an appointment on {{startDate}} at {{startTime}} for {{duration}} for {{eventName}}.",
From en-US.json
{
“name”: “ScheduleListIntent”,
“samples”: [
“what’s on my calendar next week?”,
“what’s on my calendar”,
“what’s on my schedule”
]
},
When I run my test I receive the expected Welcome Message and also the correct response to the “Hello” message but if I then say “what’s on my calendar?” I receive “Sorry, I don’t know about that. Please try again.”
Any ideas?
Thank you,
Ken