Alexa Automation is Endless

By

Alexa has a number of built-in features like the ability to set kitchen timers, get sports information, and tell jokes. While those features are neat, Alexa becomes really exciting upon the realization that it can communicate with any API on the Internet – meaning automation is endless. We have a healthy gamer culture here at UDig, so a video game/Alexa mashup was inevitable.   Setting up an Alexa skill that checks your current level in Overwatch is relatively straightforward (see below), and we’ve observed more and more companies are utilizing voice recognition services to deliver on business needs as well.

The Code

First, go to Amazon and register a skill named “alexa-game-checker-status-skill”. Stop at the page where Amazon prompts you to fill out the “Skill Information”, “Interaction Model”, “Configuration”, etc. tabs. Click on the “Skill Information” tab and record the “Application Id”.

Next, go to Amazon Web Services and register a Lambda function named “alexa-game-checker-status-skill”. The function should be “Node.js 6.10” runtime, Handler of “index.handler”, Code entry type of “Upload a zip file”, should have a trigger of “Alexa Skills Kit”, resource of “Amazon Cloudwatch Logs”, and an execution role of “lambda_basic_execution”. Once created, note down the “ARN” UUID at the top right of the screen.

Next, clone the code from Github. Once the code is cloned, navigate to /agscs/.ask/config on your local machine. Put the “Application Id” you recorded above as the value for “skill_id”. Navigate to /agscs/skill.json and place the “ARN” number as the value for “uri”.

Next, follow the steps here to install the ASK CLI. Once complete, navigate to /agscs and execute “ask init” to set up credentials. Then, navigate to /agscs/lambda/custom and execute “npm install” to install all of the Node.js package dependencies.

Last, say this to Alexa: “Alexa, ask game checker status what Overwatch level is Cronos86?” Alexa should respond back with the user’s current level. The gamertag that Alexa is checking against can be changed in /agscs/models/en-US.json. If changing the gamertag, pay attention to the “synonyms” section. The synonyms are how Alexa interpreted the gamertag – observed via CloudWatch debugging. To avoid debugging, think about the phonetic ways in which the desired gamertag could be interpreted. Write out all of those phonetic spellings in the synonyms section and re-deploy the code to get an update on the desired gamertag.

Watch this skill here.

The Business Application

Alexa has application in the workplace. For example, Alexa can automate reporting and data analytics with only a database connection, or API, required. Every company has some form of reporting requirement and Alexa could deliver on-demand customized reports to fulfill those needs. As seen in the example above, Alexa has the ability to accept variables as input and could manipulate data based on the variables to generate valuable data insights. Also, Alexa skills can be private to a business in order to protect a custom solution.

The example provided above a single reporting functionality on information found in a video game database. The development process for accessing business data would be similar, just on a larger scale. UDig has experience providing custom Alexa solutions to our clients and can support your business leveraging voice services, too.  Please contact us if we can help.

About The Author

Cody Halbleib is a Senior Consultant on the Software team. His family is his partner, Jamie, and his Border Collie mix, Walter.