Creating an Amazon Alexa Customer Service Skill for Magento

There are estimates that Amazon has sold over 5 million Echo units in 2016. That's a lot of homes that are at least experimenting with voice interactions.

I think that the Echo and Google's Home are distinctly different to phone voice agents like Siri and Cortana because of the context that they're used in. Siri and Cortana are used on your mobile phone, a device that knows most about you and your interactions with others. That's why we never really feel comfortable with other people using it - even if you have nothing to hide.

The Echo and Home devices on the other hand, while they are connected to an individual's account, they don't have as much access to information so it's safer. They're also designed to be used in a social context around the home which I think is going to be really important component of their success.

What these devices are having to get past, at least from my experience in the UK, is the conservatism around speaking to Siri around others. This is maybe because it never really got past the pain barrier to being useful - far too many things are misheard or result to pulling up Google results so it could have been done quicker typing.

So I finally got around to picking an Amazon Echo up recently and was thinking about what experiments I could run with it. I had read Alan Kent's great intro to writing an Alexa skill that added the ability for merchants to ask questions about the status of their store. I felt like Alexa as a handy customer service channel just makes sense. So I created a Skill for Smythson as a prototype that could answer questions about my customer account.

Magento 1 already has a REST API which provides the ability for customers to log in and give an app permission to access their account info. Once I had done this, the skill I wrote could recognise requests like "Where's my order", "is my order almost here?" and talk to Magento to get the status and respond with any order comments that had been put on it.

I put in a couple of other dummy skills in that are hardcoded for now just to get a feel for it:

  • "Any new products out?"
  • "How do I get in touch with customer service to talk about my order?"
  • "Is the Eliot Slim Briefcast in stock?"
  • "Is your New Bond Street store still open?"

From my tests so far, Alexa isn't without her issues when it comes to understanding what I'm saying. You'll be able to see this in the demo video below. I'm sure that has nothing to do with my glorious accent. I do notice that I'm putting much more care and attention into how I enunciate to improve the success rate.

One thing I can do for this is to spend more time training her on example ways of making queries so that "she's" more likely to recognise my intent.

At the moment, it's certainly a prototype but I'm excited about adding more functionality to the skill including writing the authentication part so that it has the potential to be released to the wider Magento community and you can submit your own store branded skill to Alexa. By using the Rest API, there's no extension that needs to be installed which is the great part. It's likely there would be a small amount of work styling the customer login and authentication page as it's not one that's normally seen in Magento.

Watch the video: