6 minute read

CHATBOTS & APIs FOR BETTER CUSTOMER EXPERIENCE

To meet growing consumer demand, how will retailers take advantage of application programming interfaces to integrate more intelligent and powerful chatbots into their ecommerce systems and platforms?

Chatbots are really taking off in retail as customers become more familiar and happier to interact with automated assistants. Indeed, nearly half of consumers say they prefer chatbots as the primary form of communication with brands (Source: Grand View Research). This acceptance, plus how chatbots can bring down operating costs, are among several factors that will make the global chatbot market worth $1.23 billion by 2025.

Advertisement

So, how will retailers integrate increasingly more intelligent and powerful chatbots into their ecommerce systems and platforms?

The key is how they take advantage of application programming interfaces (APIs) alongside other key modern computing technologies like microservices, 'headless' and cloud-native computing. APIs help to simplify and streamline processes and exploit third party technologies, avoiding the need to create a chatbot from scratch.

THE RISE OF CHATBOTS

First, what are chatbots? Chatbots are automated text-based assistants that replicate the experience of chatting with another person. They look like normal apps with an application layer, a database, APIs and a chat interface. Voice-based assistants like Amazon Alexa, Google Assistant, Apple Siri and Microsoft Cortana are just chatbots that transcribe spoken word into text and translate text responses back into spoken word.

Chatbots are not a new computing phenomenon and have been around for over half a century. Back in the 1960s, chatbots were developed to fool people into thinking you were conversing with a human. In fact, the most famous, Eliza, appeared in 1964.

It was really in the 2000s that the chatbots we know today first became more widespread. Several organisations introduced 'virtual assistants' to save labour costs around simple repetitive tasks.

These first chatbots weren’t very intelligent. They worked by matching simple phrases like "How do I reset my password?" to a set of templated 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 listed or understood, the customer would be transferred to a real human, but only after a lot of frustration.

The recent revolution in chatbots has come as artificial intelligence has made these assistants a lot smarter and more conversational. Unlike simple pattern matching, artificial intelligence does a far better job of understanding what the customer wants, often through a conversation using natural language understanding technology. The customer can then be supported most appropriately, through an ongoing discussion that includes making more accurate suggestions, and can be more personalised in how the chatbot autonomously knows to suggest special offers.

With chatbots becoming more intelligent and capable of conversing autonomously, they are being used more extensively in commerce to improve customer experience, drive revenues and reduce operating costs.

The extent to which chatbots drive ecommerce is most remarkable in China where Tencent’s WeChat claims a billion daily users, who 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. It has been estimated that close to a third of WeChat users start a purchase entirely via chatbots (Source: McKinsey)

The trend for chatbots in commerce isn’t limited to China, of course. Retail brands as varied as Lidl, H&M, Burberry and Shop Direct are deploying smart chatbots to do everything from simple to more complex tasks. For example, Burberry’s bot helps customers discover more about its bag collection.

By contrast, Lidl created a bot called Margot that uses natural language processing to interact with customers about helping them choose the right wine, including suggesting food pairings.

Many of these bots are using Facebook Messenger to create chatbot apps. Last year, Facebook’s VP of messaging confirmed there were 300,000 monthly active bots interacting with customers on Messenger. This includes online office supplier, Staples, which uses chatbots to make product suggestions to customers based on past purchases, as well as guide a customer through a purchase.

Other technology providers are also helping organisations to build chatbots – for example Amazon’s Lex shares the same deep learning technology used by Alexa to allow companies to build their own chatbots within Amazon Webservices.

CHANGING TRENDS & CHALLENGES

The overall trend for how people interact with brands and retailers commercially is towards greater use of chatbots. As long ago as 2015, monthly active users of the four big messaging apps exceeded the top four social media apps. This willingness to use messaging apps is creating fertile ground for chatbot deployment to blossom and expand dramatically.

While they appear intuitive and simple to interact with for customers, how chatbots interact with critical retail systems and processes is complex and challenging. Chatbots can take in text or voice, understand the context, and perform some action. In the case of commerce, that action may be to place an order, check the status of an order, or retrieve some details about a product. While chatbots can understand language, they do not have access to any of the commerce-related data (e.g. orders, products) or functionality (place an order, check the status of an order, etc).

For commerce, any use of chatbots beyond simple pattern matching requires calling the application program interfaces (APIs) that the commerce platform exposes. Actions such as searching for products, viewing product details, adding to the shopping cart, and checking out, all require calling potentially dozens of different APIs.

To do this effectively, a commerce platform must expose 100% of its functionality and data through APIs. Each API can be optionally wrapped around with the software development kit for a chatbot’s programming language. The other route that you could take is to use GraphQL, which is a query language that enables data retrieval and can initiate actions across many APIs with a single command.

DEVELOPMENT ISSUES

A prime goal in developing chatbots is to avoid having too much business logic in the chatbot itself. Difficulties arise when, while the APIs used by the chatbot need to be easy to call, the developer wants to program the interaction with the APIs. This means that too often the APIs are hard to call because they must be invoked in a very specific programmed order.

Another issue is a lack of idempotency, which forces developers to call an API exactly once and take precautions to prevent duplicate calls. There are inconsistencies in how dates, currencies, number formats, and other requirements are formatted, which causes too much business logic to be contained in the chatbot. Finally, there are inconsistencies about how to authorise/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. A good solution here is to adopt a formal API specification standard like RAML or OpenAPI and use a single API gateway to secure APIs.

For the chatbots to use APIs to fully function, the choice of commerce platform is key. The problem for many retailers is they are using legacy commerce platforms often built in the 1990s without support for APIs.

The importance of APIs to modern ecommerce cannot be minimised. It is worth recalling how Amazon’s Jeff Bezos told his engineers to use internal APIs or get another job in his famous 2002 memo that started with the words: "All teams will henceforth expose their data and functionality through service interfaces". Indeed, open APIs are credited as one of the reasons Amazon has become a retail juggernaut.

When an organisation retroactively adds APIs to an existing commerce platform, there is inevitably a loss of some functionality and data. How this slows down or interrupts ecommerce processes and does not deliver an optimum digital customer experience can be damaging when competition is so intense, and margins for online retailers, razor thin.

Developers can also run into oddities, such as having to maintain session state, non-standard security mechanisms or other issues that occur when you’re not calling an API-first platform.

To best integrate with chatbots, a retailer’s commerce platform must have been built API-first from the very beginning, with all functionality and data exposed over APIs. This enables the streamlined and structured code-to-code communications essential to the success of chatbots handling retail processes.

Other aspects of a modern commerce platform are important to how chatbots are integrated into ecommerce applications. For example, a headless ecommerce solution comes without a graphical user interface (GUI) such as a standard shop front-end. It focuses purely on background processes and making data available to separate front-end applications like chatbots.

CONCLUSION

With these simple steps, retailers can access the power of chatbots and be well on their way to serving customers with richer, more dynamic experiences they bring to the commerce journey, from purchase to post-sale customer care and support. These benefits for retailers and customers are enabled by how APIs can be used to implement new ways of communicating with customers or incorporate new purchasing capability via new generations of ever smarter chatbots interacting with customers.

KELLY GOETSCH CPO COMMERCETOOLS

Kelly has authoured three books and is a commerce, microservices, and distributed computing expert, having spoken and published extensively on these topics

This article is from: