Hello,
I am trying to write a skill in js that is being onvoked like
Alexa, <invocation name>
(and not by Alexa, start <invocation name>"
Actually I fail.
This is what i have (I built it upon some examples).
I thought (according to https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/supported-phrases-to-begin-a-conversation#invoking-a-skill-with-no-specific-request-no-intent) that the launchRequest is fired with above-mentioned invocation. But I cannot hear a "Launch".
Do you have any ideas/examples for me?
Thank you in advance,
Patrick
// Extend AlexaSkill CustomSkill.prototype = Object.create(AlexaSkill.prototype); CustomSkill.prototype.constructor = CustomSkill; // ----------------------- Override AlexaSkill request and intent handlers ----------------------- CustomSkill.prototype.eventHandlers.onSessionStarted = function (sessionStartedRequest, session) { console.log("onSessionStarted requestId: " + sessionStartedRequest.requestId + ", sessionId: " + session.sessionId); // any initialization logic goes here }; CustomSkill.prototype.eventHandlers.onLaunch = function (launchRequest, session, response) { console.log("onLaunch requestId: " + launchRequest.requestId + ", sessionId: " + session.sessionId); var speechOutput = "Launch"; response.tell(speechOutput); }; CustomSkill.prototype.eventHandlers.onSessionEnded = function (sessionEndedRequest, session) { console.log("onSessionEnded requestId: " + sessionEndedRequest.requestId + ", sessionId: " + session.sessionId); // any cleanup logic goes here }; CustomSkill.prototype.intentHandlers = { "CustomSkill": function (intent, session, response) { doSomething(); }, "AMAZON.HelpIntent": function (intent, session, response) { var speechOutput = "Help"; response.tell(speechOutput); }, "AMAZON.StopIntent": function (intent, session, response) { var speechOutput = "Goodbye"; response.tell(speechOutput); }, "AMAZON.CancelIntent": function (intent, session, response) { var speechOutput = "Goodbye"; response.tell(speechOutput); } };