Chatbots & APIs: Leveraging Retail Technology for a Better Customer Experience

Press enter to search
Close search
Open Menu

Chatbots & APIs: Leveraging Retail Technology for a Better Customer Experience

By Kelly Goestch - 02/14/2019

Chatbots are automated text-based assistants that replicate the experience of chatting with another person. Voice-based assistants like Amazon Alexa, Google Assistant, Apple Siri and Microsoft Cortana are really just chatbots that transcribe spoken word into text and translate text responses back to spoken word.

Chatbots in all their forms have been with us for decades. Even in the 1960s, there were chatbots that could fool you into thinking you were conversing with a human – the most famous being Eliza, which launched in 1964.

Since the 2000s, many companies have offered “virtual assistants” of various sorts in an effort to save labor costs. Historically, these chatbots weren’t very intelligent. They matched simple phrases like “How do I reset my password?” to templatized responses like “Hi {customer_name}. You may reset your password by following the instructions found on https://link.to/canned/response.” If the phrase wasn’t registered or understood, the customer would be transferred to a real human but only after a lot of frustration.

Over the past few years, these assistants have gotten progressively more intelligent as artificial intelligence has made significant advancements. Rather than simple pattern matching, artificial intelligence does a far better job of actually understanding what the customer wants, often through a conversation. The customer then can be supported most appropriately, whether through an ongoing discussion or a link to a help article.

With chatbots getting impressively better, they’re now increasingly being used for commerce. WeChat in China boasts 1.5 billion monthly active users as of 2017, according to Kleiner Perkins’ Internet Trends 2018 report, with 31% of WeChat users having initiated a purchase solely via chat, according to a McKinsey survey of 2016 shopping behavior.

WeChat and others allow customers to browse and discover products, learn more about those products, and then actually complete the purchase all without ever having to leave the chat app on a smartphone. The customer experience is like chatting with a live person. Brands such as Nike, eBay, Foot Locker and Kroger have started to experiment with chatbots that are capable of facilitating commerce.

For commerce, any use of chatbots beyond simple pattern matching requires calling application program interfaces (APIs) that the commerce platform exposes. Searching for products, viewing product details, adding to the shopping cart, and checking out all require calling potentially dozens of different APIs. As a result, the commerce platform must expose 100 percent of its functionality and data over APIs. Those APIs can then be optionally wrapped with a software development kit (SDK) for a particular chatbot’s programming language, or through GraphQL, which is a query language that enables retrieving data or performing actions across multiple APIs with one command.

A problem that retailers will want to avoid is having too much business logic in the chatbot itself. The APIs should be easy to call; however, the developer wants to program the interaction with the APIs. Too often, APIs are hard to call because they have to be invoked in a very specific order. Another issue is a lack of idempotency, which forces developers to call an API exactly once and take extra precautions to prevent duplicate calls. There are inconsistencies in how dates, currencies, number formats, etc., are formatted, which can cause for more business logic to be contained in the chatbot. Finally, there are inconsistencies with how to authorize and authenticate APIs.

Retailers should start by developing APIs first, then writing the code that backs the implementation. They must ensure they have 100% API coverage and that APIs are the only means of accessing data functionality in the platform. They must adopt a formal API specification standard like RAML or OpenAPI and use a single API gateway to secure APIs.

With these simple steps, retailers can access the benefits of chatbots and be well on their way to serving customers with the enhanced experience they bring to the commerce journey.

-Kelly Goestch with commercetools