Building a Chatbot using the new Google Hangouts Chat

Building a Chatbot using the new Google Hangouts Chat

Last week, Google launched a new product to its business customers called Hangouts Chat. For those of you that know what Slack is, or for that matter, are over the age of 40 and can remember what AOL Chat Rooms or Bulletin Board Services were, this functionality will be familiar to you. If not, the simplest way I can describe it is: "imagine an online room dedicated to a project or topic, where attendees can chat and share information with each other, and new attendees can join mid-stream and see all of the previous conversations in one place." For G-Suite customers. give it a try at chat.google.com

This might not seem game-changing at first glance. After all, it is just group chat, but Google also quietly launched a set of APIs that can allow a G-Suite customer to build an AI-powered Chatbot native inside of Google Chat. This is actually very cool (skip the next paragraph if you want to get to the punchline). So, I spent some time hacking away at it this past week it and thought I would share my experiences. 

I got started with the documentation for developers on how to access Google Chat APIs found here. I then stumbled on "how to build a chatbot" article here.  I got to work deploying a light-weight Flask app server on a micro-tier AWS instance and in less than an hour had a working chatbot. It wasn't much to brag about; it did two things: 1) "reverse: hello" would have the bot return "olleh" and 2) a pig-latin translator where "pigify: good morning" would return "oodgay orningmay." Ok, on to something more difficult and useful. 

I've always been a big believer that ERP companies make great engines but clumsy cars, and that the secret to unlocking value in them would be to abstract the user interface from the wealth of data that lie underneath. At MSI, our team has already built several dozen APIs that can query simple things like, order status, repair status, etc, but until now they were hidden behind layers of ERP screens, complex reporting systems or purpose-built websites that can process APIs. Using Google Hangouts Chat, I was able to build a bot that could take a simple command like "order_details: 12345", run these GET requests from the APIs and in return, show the order details in real-time from the ERP system. Here is a screenshot below of a simple inquiry about what warranties (our company makes communications devices) exist on an order number:


I was also able to successfully build a bot that can query our enterprise data warehouse. By using Python-based drivers for PostgreSQL, the protocols that our Amazon backed Redshift warehouse uses, I was able to run a query in real time based on a natural language request. "what were booked sales on 2/5/18?" yielded results that could summarize total shipments in dollars for the day along with the top 10 biggest shipments of the day.

This chat technology has pretty endless possibilities. With our existing efforts on Robotic Process Automation, a Hangouts Chat Bot can also be programmed to take action. When a customer calls in to the call center to change the delivery date on the order, something which happens a lot, rather than someone placing a ticket, and someone else wading through dozens of clumsy ERP screens to change a delivery date, a simple request like "change delivery date on order 12334 to 4/1/18" is all it would take to trigger a robot who can make all the necessary changes in the ERP system.

Indeed, this chat technology, which on the surface seems benign is a powerful new tool in our arsenal, thanks Google!

 

Thomas Wilson

Director at Capgemini Switzerland

6y

It could be a fantastic opportunity to use examples like this to guide smarter procurement. I have always thought that procurement absorbs more energy than it should - and if for example - the early stages of Q&A's could use examples like the ones above - the process would end up being so much more sustainable for both ends of the buyer and supplier spectrum.

Like
Reply

To view or add a comment, sign in

More articles by Greg Meyers

Others also viewed

Explore topics