Documentation

Alexa Lambda Integration with Skills SDK v2 and NPM

Create a Skill API key

Each Skill needs its own API key for tracking.

Create a Skill to get an API key.

Install Dashbot via NPM

npm install --save dashbot

Include Dashbot

Use the API key created above.

const dashbot = require('dashbot')(process.env.DASHBOT_API_KEY).alexa;

Wrap your handler in the Dashbot handler call

before:

exports.handler = skillBuilder
.addRequestHandlers(
LaunchRequestHandler,
...
HelpIntentHandler,
CancelAndStopIntentHandler,
SessionEndedRequestHandler
)
.addErrorHandlers(ErrorHandler)
.lambda();

after:

exports.handler = dashbot.handler(
skillBuilder
.addRequestHandlers(
LaunchRequestHandler,
...
HelpIntentHandler,
CancelAndStopIntentHandler,
SessionEndedRequestHandler
)
.addErrorHandlers(ErrorHandler)
.lambda());

You’re all set!

Example

Using the Alexa Skills Kit SDK for Node.js and AWS Lambda, it is easy to integrate Dashbot.

We have added Dashbot to these three sample Alexa Skills: