Alexa, ask Tyrion how's Winterfell doing?
2017/Aug/06Amazon Alexa (Echo) has been around for only about two years, but it feels like a lifetime. We use Alexa for everything from checking weather to controlling other devices, to playing music and whatnot. The real power of Alexa lies in the Alexa Skills kit (ASK), which lets third party developers build skills (Apps) for Alexa. In this blog post, I will use a sample business use case to show how to build an end to end Alexa skill that lets users to interact with Salesforce.
Here is the demo of the Alexa Skill:
The sample use case is, as the King/Queen sitting on the Iron throne (Alexa user), you want to ask your Hand, Tyrion Lannister (Alexa Skill) to know how's Winterfell (a Salesforce Account) doing. Alexa can fetch the account's annual revenue from Salesforce.
As part of building this skill, we are going to:
- Create a Connected App in Salesforce.
- Create a REST based Web Service in APEX.
- Configure and build an Alexa app that utilizes the Lambda function and passes the user question as a parameter.
- Use Alexa Account linking feature and Salesforce OAuth setup for authentication.
- Create a Lambda function to utilize the REST API to fetch details from Salesforce using the parameter passed by Alexa.
Let's get started