Holly Godwin
Sep 8, 2017 · 4 min read

Alexa, ask Ocado to add tea to my trolley

For many years, the e-commerce team at Ocado Technology has been proudly pushing the boundaries of software development by releasing the most comprehensive and intuitive grocery shopping apps for iOS, watchOS and Android.

Today, we are very excited to add a new platform to our line-up as Ocado is officially releasing a skill for Alexa, the AI-based personal assistant from Amazon. Could we make grocery shopping any easier?

The rise of voice UIs and smart assistants

A recent report from eMarketer shows that voice-enabled speakers are experiencing a boom in the US, Amazon Echo being the candidate of choice with 70.6% of smart speaker users opting for the device over its competitors. Gartner also predicts that by 2018, 30% of all web interactions will be through conversational interfaces, and looking a bit further to 2020, Andrew Ng, former chief scientist at Baidu and Stanford University professor, believes that at least 50% of searches will be via images or speech.

Our own research has shown that many Ocado customers also want to use voice-controlled smart assistants for grocery shopping.

With Alexa in your kitchen, adding an item to your Ocado order is a breeze. Run out of biscuits and have a friend coming for tea? — “Alexa, ask Ocado to add biscuits”. Can’t wake up tomorrow without your regular cup of coffee? No problem — “Alexa, tell Ocado to add coffee to the order”.

If you already have a confirmed order scheduled to arrive, any item you request will be added to that order. On the other hand, if you haven’t yet scheduled a delivery, the item will sit in your trolley until you decide on a slot.

When we started implementing the Ocado skill, we quickly realised how important a natural, bi-directional conversational flow was to the success of interacting with a smart assistant like Alexa. This is why the Ocado skill allows you to ask for an item in various different ways and gives Alexa the ability to maintain a casual conversation centred around your Ocado order. It doesn’t stop here however; our skill also allows you to check what’s in your shopping basket; “Do I have popcorn in my order?”, receive delivery updates — “Where’s my order?”, find out the total price of your trolley and even ask “What’s in season?”, making your smart speaker even smarter!

So how does it work?

The diagram below offers you a high level overview of the interactions between Alexa, AWS, and Ocado.

Alexa converts the audio stream into a command (for example, “add to trolley”) and a search term (such as “cheese”) based on examples provided by Ocado. To Alexa developers, commands are known as intents while items are called slots. These text queries are then passed onto our Ocado skill, which also runs on AWS, where the request is processed and an appropriate response is established using our internal APIs.

AWS allows us to rapidly build and scale our Alexa skill, ensuring we’re ready for the rapid growth in conversational interfaces. This is thanks to the scalability of cloud services including Elastic Beanstalk for RESTful backends for the Ocado skill, DynamoDB for persisting state, and SQS for reliable message delivery.

By implementing the Ocado assistant service using a Java web server and an in-house framework for building applications on AWS, we are able to take full advantage of many features of AWS and offer customers a truly two way conversation. If the request can be fulfilled, i.e. we have the item in stock, the Ocado skill will send an output to Alexa, for example; “I’ve added Cathedral mature cheddar to Thursday’s Ocado order. Can I help you with anything else?”. However, if the item is out of stock, unavailable or cannot be found, the Ocado skill will not only offer the appropriate notification but can also make alternative suggestions; “Sorry the Cathedral City mature cheddar you usually buy is out of stock. How about trying the Ocado organic mature cheddar instead?”

We have trained Alexa to recognise the top 15,000 commonly searched terms from Ocado.com. The Ocado skill then uses an AI-based algorithm to establish the most likely product you’re after. For example if your weekly shop usually includes 250g of Ocado own brand mature cheddar and you ask Alexa for cheese, it will add this item to your basket. This means that you can slowly collate a shopping trolley over a few days as and when you near the end of the products in your kitchen.

Ocado and Alexa — ending the need for the shopping list tacked on the fridge forever.

Ocado Technology

We curate the best stories from our editors at Ocado Technology and around the web, covering topics related to robotics and IoT, cloud computing, big data, artificial intelligence, and beyond.

Holly Godwin

Written by

Ocado Technology

We curate the best stories from our editors at Ocado Technology and around the web, covering topics related to robotics and IoT, cloud computing, big data, artificial intelligence, and beyond.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade