It’s a shame I’ve not written earlier about this. We’ve got Amazon’s Alexa and also Google Home available at Hybris Labs in Munich, but I’ve had so much other things going on, that I just could not concentrate a lot on this. Today, I finally had a few hours play a bit more with Amazon’s Alexa. While I need to do more with Google Home, I’ve tried both to some degree now. I find the overall programming and configuration simpler, although Amazon is also trying to totally lock you in of course with the Lambda functions on EC2 – but you have a choice and my choice was to use my own Cloudfoundry based backend and YaaS APIs to implement the business logic.
What does it do? Simple. The low hanging fruit is of course to implement a shopping cart. So I created a custom skill that implements shopping cart functionality for a YaaS-based store. It’s multi-tenant, that means the items that Alexa understands are matched against the products in your YaaS backend. It’s also customer-specific, which means I am using the Alexa Account Linking to identify and authenticate the YaaS end customer. The products that you juggle with (e.g. add/remove from the cart) are ending up in your cart, e.g. the linked customer account’s cart. For this I had to implement a simple OAuth2-based login and set it up with Amazon’s Alexa.
There’s yet much to do, for example I’ve currently not implemented the checkout. I intend to expect a default shipping and billing address for the customer, as well as a configured payment method (most likely Stripe). Also, the behavior when multiple products are matched is currently a bit unclear. I guess Alexa would need to ask in this case, “which milk would you like to add – the skim or whole milk?”. But hey, this is just a quick update, have a look at this video that I quickly shot and let me know what you think in the comments. And yes, I figured that we’re second class on that system. There is now way to get higher up than the “Alexa, ask hybris to…”.