Plug and Play Chatbot: A Peek at Agoda’s Customer Service Tech

Agoda Engineering
Agoda Engineering & Design
9 min readJul 14, 2023

--

By Arpit Saxena

Chat is an important feature on Agoda as it provides instant support, personalized interaction, and real-time problem-solving for users. It boosts user engagement, improves lead generation and sales, and facilitates valuable feedback for continuous improvement. Incorporating chat functionality for all products enhances the overall user experience and strengthens the connection between the website and its visitors.

Problem at Hand

While integrating chat functionality is undoubtedly crucial, it often proves to be time-consuming and demanding in terms of effort. Fortunately, we have discovered a more efficient approach by implementing a plug-and-play chatbot. In the past, incorporating chat as a feature typically entailed a substantial effort, spanning six development sprints. However, the plug-and-play chatbot solution now allows us to overcome this challenge and significantly reduce the implementation timeline.

We have also identified several pages within our system that lack entry points for chat, which limits the availability of interactive communication for our users. By incorporating a plug-and-play chatbot, we can seamlessly introduce chat functionality across these pages, ensuring that users have access to real-time assistance and support.

Additionally, we have recognized the specific need for a chatbot dedicated to properties on our YCS (Manage Property platform). This tailored chatbot will enhance the experience for property owners by providing a convenient and efficient channel for interacting and managing their properties.

By leveraging the advantages of a plug-and-play chatbot, we can effectively address these challenges, streamline communication, and deliver an improved user experience across various use cases, including property management on our YCS platform.

Plug and Play Chatbot as Solution

We have revolutionized the chat platform at Agoda with the Iris system using Micro frontend and Agoda’s internal SOP management tool, Wizard. We have built a plug-and-play chatbot that can be reused for any use case and communications between parties.

Serving Intents

Whenever a customer starts a chat, we allow them to choose a topic of their grievance. This helps take them through a predefined SOP (Standard Operating Procedures) of that intent for a quick and easy solution. Using a dev-less solution like Wizard allows us to update and upgrade these SOPs in real time without any engagement from developers. Project managers can observe, learn and act quickly on user behaviors making these flows more efficient and fluid for the customer.

These intents differ for different products like accommodation, flights, trips, and activities. So, with the plug-and-play chatbot, we have introduced an easy way to create SOPs for any of the products and serve them using the same UI and backend as other chatbots at Agoda.

It helps to make the look and feel of the chatbot across all Agoda products similar, and any update to the UI/UX can be automatically provided to all the chatbot applications.

Learnings from Using Wizard Solution for Flows

In the past year, we embarked on a migration journey to implement Wizard for our intents(flows). This strategic move has proven to be highly advantageous, especially in terms of cost savings. By transitioning to Wizard, we have reduced our expenses and witnessed a substantial improvement in our development velocity.

This means we can achieve the desired cost savings more efficiently, freeing up valuable resources for other critical tasks. The decision to embrace Wizard has been a game-changer for our organization, streamlining our processes and enhancing our overall financial performance.

Async Messaging

One of the important tasks of the chat system is to provide a connection with the agents. The connection can be synchronous, like Live Chat Support, Asynchronous, like WhatsApp, or any other messaging platform.

Live chat has issues with resource management, as the agents have to be available live to interact with customers. A sudden traffic increase will cause agents’ availability to go high, and during that time, customers can easily lose the session, maybe due to flakiness in customers’ internet connection, or if they are on an app, they can minimize the app and OS of mobile can shut off the connection.

Async Messaging provides a persistent way of connecting with agents by allowing customers to interact with Agents like how they interact with their friends on WhatsApp. In Async messaging, when a customer sends a message, that message is stored in our internal messaging system called the conversation platform, and then the message is delivered to the agent using the agent messaging tool. Whenever the agent replies, the customer gets informed using push notifications, email notifications, or both. This feature also unlocks the option of having a chat history with the agent for your previous interactions.

Conversation Platform

Conversation platform is a system designed to store and serve conversations between any two participants.

The conversation platform supports APIs to search conversations, publish messages to conversations, etc. It supports sending participant information to define all the participants for a particular conversation.

Conversation Platform Database Architecture

The conversation platform architecture comprises five main tables, each serving a specific purpose:

  1. Conversation Table: This table stores conversation-level data, including the conversation ID, metadata, origin, and other relevant information.
  2. Message Table: The message table stores message-level data such as message ID, content, sender, visibility, and metadata. It is linked to the conversation table through the conversation ID, establishing a connection between messages and their respective conversations.
  3. Conversation Search Data Table: This table stores key-value pairs necessary for searching conversations. For example, it can store information like user IDs to search for all conversations associated with a particular user or booking IDs to search for conversations related to a specific booking. This data can be provided during conversation creation or updated later.
  4. Participant Table: The participant table holds participant information such as participant names and email addresses.
  5. Conversation Participant Table: This table maps participants to conversations, associating each participant with the relevant conversations they are involved in.

By structuring the conversation platform using these five tables, you can effectively organize and manage conversation data, facilitating easy retrieval and analysis.

How to Use Conversation Platform for Chatbot

Using a conversation platform allows the chat platform to serve the user with a more persistent chat feature.

  • It allows us to store conversations and show users the history of their interaction with the chat.
  • It also allows users to keep the progress of their conversation with the agent even if they close the app or browser window on their desktop.
  • It also allows us to support multiple devices. Users can start a conversation on their desktop and then continue it on their mobile devices.

Using a conversation platform to support multiple use cases of chat was another challenge that we solved by introducing origin as one of the search identifiers for the conversations. So, now the conversation for flights and hotel booking for the same customer are easily distinguishable and can be separately shown to the user at two different entry points.

Making conversations origin friendly also allows us to easily assign conversations to the correct group of agents. Flight conversations can be assigned to flight agents and hotel conversations to agents with expertise in hotels. We also use other parameters to assign conversations to agents based on customer language.

Chat Platform Architecture

Chat platform deploys its FE code using the NPM package. Utilizing an NPM package allows us to share and reuse code across multiple pages or projects easily. This promotes efficient development practices, saves time, and reduces redundancy. Integrating a common NPM package ensures consistency in design, functionality, and behavior across different pages. This maintains a standardized user experience and avoids inconsistencies or discrepancies in the front-end codebase.

NPM packages simplify the management of dependencies within your front-end code. Instead of manually managing and updating multiple dependencies on each page, you can rely on the package’s versioning and dependency resolution capabilities to ensure compatibility and stability.

NPM packages allow for modular development, enabling you to scale your application more efficiently. Different developers can work on separate pages, utilizing the shared package, which fosters collaboration, improves productivity, and streamlines development workflows.

Chat platform connects to its backend using Webgate, which helps act as a protective barrier between the internet and our web servers, implementing security measures like authentication, authorization, and encryption. It can also enforce access control policies, filter malicious traffic, and mitigate distributed denial-of-service (DDoS) attacks.

Webgate also helps distribute incoming web traffic across multiple backend servers, helping to balance the load and ensure high availability. By intelligently routing requests, a web gateway can optimize resource utilization and provide a seamless user experience even during high-traffic periods.

Onboarding

Streamlining Onboarding for Plug-and-Play Chatbots: A Quick 5-Step Process

Enhancing customer support through chatbots has never been easier with our plug-and-play chatbot solution. To help you get started swiftly, we have developed a simple onboarding process consisting of five easy steps. Let’s dive in:

  • Step 1: Crafting Flows with Wizard, Agoda’s Internal SOP Management Tool
    The first step involves creating customized flows for your chatbot using our intuitive internal SOP management tool, Wizard. This powerful tool allows you to map out the conversation flows and tailor them to your specific business needs.
  • Step 2: Registering Your Flow ID in Chat Backend
    Once you have designed your flows, it’s time to register your unique flow ID against your chosen origin in our Chat Backend system. This step ensures seamless integration and smooth communication between your chatbot and the backend infrastructure.
  • Step 3: Writing Test Cases for Your Use Case
    To ensure optimal performance and accuracy, it’s crucial to thoroughly test your chatbot. In this step, you will write comprehensive test cases that cover various scenarios and user interactions. This meticulous testing guarantees a robust and reliable chatbot experience.
  • Step 4: Integrating the NPM Package into Your Hosting Application
    Integrating the plug-and-play chatbot into your hosting application is made effortless with our NPM package. By following our straightforward integration guide, you can seamlessly embed the chatbot functionality into your existing infrastructure without any hassle.
  • Step 5: (Optional) Setting Up Agent Groups for Enhanced Customer Support
    For those seeking an additional layer of support, our system offers the option to set up Agent Groups. This feature allows you to provide messaging chat functionality to your customers, where agents can step in and assist when needed. It’s an excellent way to deliver a personalized touch and maintain exceptional customer service.

By following these five steps, you can swiftly onboard our plug-and-play chatbot and revolutionize your customer support. Embrace the power of automation and enhance your customers’ experience with our seamless solution.

Benefits of Using Plug-and-Play Chatbot

An important aspect of plug-and-play chatbots is their ability to handle several types of interactions. Whether a simple question-and-answer session or a more complex transaction, chatbots are designed to handle multiple types of interactions seamlessly. This makes them a versatile solution for businesses, as they can be used for various purposes.

For example, a chatbot can be used for customer service, providing quick and accurate responses to customer inquiries. It can also be used for sales, guiding customers through the purchase process, and providing product recommendations. Chatbots can also be used for marketing, providing personalized offers and promotions to customers.

Another excellent feature of plug-and-play chatbots is their ability to provide a 24/7 service. Chatbots are always available, meaning customers can interact with them any time of the day or night. This can significantly improve customer satisfaction, as they can get the information they need or the help they require without waiting for a human representative to be available.

Plug-and-play chatbots are also cost-effective. Unlike traditional software development projects, chatbots require relatively low investment. They can be developed and deployed quickly, and their ongoing maintenance costs are relatively low. This makes them an affordable solution for businesses of all sizes.

Conclusion

Adopting plug-and-play chatbots is a smart move for businesses looking to automate customer interactions and improve the overall user experience. With the use of micro-frontends and centralized DSL flow management (Wizard), businesses can easily update and manage their chatbot’s functionality without the need for extensive coding or development work. This can help to streamline the development process and reduce the overall cost of maintaining and updating the chatbot.

--

--

Agoda Engineering
Agoda Engineering & Design

Learn more about how we build products at Agoda and what is being done under the hood to provide users with a seamless experience at agoda.com.