How Swiggy designed and scaled its chatbot
<aside>
💡 https://bytes.swiggy.com/chatbots-at-swiggy-6299116f9e69
</aside>
chatbots are computer programs that can automatically simulate interactions with customers based on a set of predefined conditions or events. They, however, are not meant to replace customer support executives, but rather provide a first step in the conversion process.
Chatbots are essential for them as they resolve most of the complaints that customers have without spending a lot of money on customer service representatives. But if the customer prefers to talk to a human support executive, it would not be prevented.
Back in 2018, they were using a third party messaging software for chat, and it worked for most parts but as they scaled rapidly that third-party chat started to feel inadequate because of a lot of reasons like it being a black box, no customer satisfaction scores, difficult to extract privacy-aware trends of queries etc.
The factors that drive for creation of the custom chatbot are:
- Need of some concrete data streams that the internal data science and analytics tools could easily hook into, and thus drive business decisions to improve the customer’s overall experience.
- Greater control over the UX around being able to build interactive messaging components and monitor customer interactions with each of these components.
- Leverage the work from support executive who are solving similar repetitive complaints every time — be it order cancellation or updating the customers about their order status.
Their chatbot flow start off with a controlled flow within their conversations.
- This means customers wouldn't be required to type in any text, but are provided with options to choose from and proceed to the next step.
- This is actually a 'decision-tree' that is running at the back-end where nodes are the states the conversation could be in and the edges are conditional statements.
- Even Amazon also uses decision tree instead of fancy NLP logic.
- Depending on which statement (edge) meets the criteria, the conversation moves forward in that direction.
- At each step of the chatbot flow, they show the customer a list of valid child nodes as the options to proceed further until all the information is gathered; and the flow stops upon reaching the terminal state.
The decision tree is stored in a relational database. It can be generated using historical customer support data and can be updated by product and business teams.
- Hundreds and thousands of data created by customers are used and the common reasons for use case is gathered to create the tree.
- Swiggy wants to handle as many requests as possible through the bots as it would help them remain efficient at scale.
The core components of the service are:
- Webview: the customer interface for the chat that is used by Swiggy mobile and web apps.