Javascript powered multichannel

Last year around this time, I wrote that The Big Reverse of Web would force a major re-architecture of the web to bring the right information, to the right person, at the right time, in the right context. I believe that conversational interfaces like Amazon Echo are further proof that the big reverse is happening.

New user experience and distribution platforms only come along every 5-10 years, and when they do, they cause massive shifts in the web's underlying technology. The last big one was mobile, and the web industry adapted. Conversational interfaces could be the next user experience and distribution platform – just look at Amazon Echo (aka Alexa), Facebook's messenger or Microsoft's Conversation-as-a-Platform.

Today, hardly anyone questions whether to build a mobile-optimized website. A decade from now, we might be saying the same thing about optimizing digital experiences for voice or chat commands. The convenience of a customer experience will be a critical key differentiator. As a result, no one will think twice about optimizing their websites for multiple interaction patterns, including conversational interfaces like voice and chat. Anyone will be able to deliver a continuous user experience across multiple channels, devices and interaction patterns. In some of these cross-channel experiences, users will never even look at a website. Conversational interfaces let users disintermediate the website by asking anything and getting instant, often personalized, results.

To prototype this future, my team at Acquia built a fully functional demo based on Drupal 8 and recorded a video of it. In the demo video below, we show a sample supermarket chain called Gourmet Market. Gourmet Market wants their customers to not only shop online using their website, but also use Echo or push notifications to do business with them.

We built an Alexa integration module to connect Alexa to the Gourmet Market site and to answer questions about sale items. For example, you can speak the command: "Alexa, ask Gourmet Market what fruits are on sale today". From there, Alexa would make a call to the Gourmet Market website, finding what is on sale in the specified category and pull only the needed information related to your ask.

On the website's side, a store manager can tag certain items as "on sale", and Alexa's voice responses will automatically and instantly reflect those changes. The marketing manager needs no expertise in programming -- Alexa composes its response by talking to Drupal 8 using web service APIs.

The demo video also shows how a site could deliver smart notifications. If you ask for an item that is not on sale, the Gourmet Market site can automatically notify you via text once the store manager tags it as "On sale".

From a technical point of view, we've had to teach Drupal how to respond to a voice command, otherwise known as a "Skill", coming into Alexa. Alexa Skills are fairly straightforward to create. First, you specify a list of "Intents", which are basically the commands you want users to run in a way very similar to Drupal's routes. From there, you specify a list of "Utterances", or sentences you want Echo to react to that map to the Intents. In the example of Gourmet Market above, the Intents would have a command called GetSaleItems. Once the command is executed, your Drupal site will receive a webhook callback on /alexa/callback with a payload of the command and any arguments. The Alexa module for Drupal 8 will validate that the request really came from Alexa, and fire a Drupal Event that allows any Drupal module to respond.

It's exciting to think about how new user experiences and distribution platforms will change the way we build the web in the future. As I referenced in Drupalcon New Orleans keynote, the Drupal community needs to put some thought into how to design and build multichannel customer experiences. Voice assistance, chatbots or notifications are just one part of the greater equation. If you have any further thoughts on this topic, please share them in the comments.

Digital trends


catch (not verified):

Amazon Echo looks like people read a load of dystopian novels and thought they were a really good idea that should definitely be done (cf: Soylent). There's a point where we need to think about whether we should do things, not just whether we can.


In a way, Amazon Echo is both amazing and horrifying. While there are certainly things to worry about (privacy concerns), there is no denying that there will be voice assistants in our future.

I'm old enough to remember when most people thought the adoption of mobile phones was a bad idea ... and with regards to the impact on social life and health, people were at least partially right. ;-)

Myself, I've been using Amazon Echo for 9 months and continue to use it every day. In fact, it might be the most used gadget in our home ...

Gábor Hojtsy (not verified):

I don't think it is a question of Amazon Echo in particular, but it is a shiny example. Do you have another non-browser device in mind that you would happily use and would be a good use case in your mind for Drupal integration? Sounds like to me whatever is done to integrate well with Amazon Echo will help with conversational interfaces like televisions and cars as well as services integrations in general.


I think catch's concern is with internet-connected voice-activated assistants. That would include Apple's Siri, Google Home, Amazon Echo, Samsung Smart TVs, Samsung Galaxy's S voice, Comcast setup boxes, ivee Voice, connected cars, etc. Many exist, but none of them might have taken off the way Amazon Echo has. What is special about Amazon Echo is that it is a platform that developers can integrate with. In my opinion, Amazon is out ahead in enabling developers to integrate with Amazon Echo.

catch (not verified):

I think catch's concern is with internet-connected voice-activated assistants ...

Yes I'm not keen on any of these, due to both a mixture of privacy issues and generally finding them annoying.

There are obviously uses for voice recognition for accessibility (and dictation, live interpreting etc.). However it's a big step from those to an always-on, always-listening device connected to a central server.

For devices I find 'acceptable', phones or tethered laptops on crappy 3g/4g connections is quite high on my list of things to support, I end up using those a lot personally (including when my home fibre connection falls over). For some people that's pretty much their entire experience of the internet.

While not directly related, has been open for years pointing out that core stores all commenters' IP addresses permanently with no opt-out for either users or site-owners. There's a lot more Drupal can do to respect people's privacy and security.

Sam Lerner (not verified):

One great application would be reporting. Being able to pull data from your site with a voice command, rather than having to slog through an interface to select criteria, means that you'd be able to quickly pull reporting data on the fly.

This would be great for anyone in a client meeting that is being asked for data, but may not have it on hand. And simply asking for data and receiving it has an impressive "wow" factor.