Chat Workflow


To use the Chat API you must have the following:

  • At least one configured queue so that any interactions coming from your customers can be routed to your agents.

  • At least one agent is assigned to your queue, so they can pick up the queued interactions and connect with your customers.

  • A client application that calls the Chat API and listens for messages (i.e., events) that are returned.

Setup flow

To set up the Chat API do the following:

  • Authenticate via your access token obtained from using your API Key & Secret
    Access to the API is only for authenticated client applications.

  • Provide a subscription webhook so that Contact Center can use it to provide real-time information to your application

  • Create a channel to open up real-time communication from your application to the Contact Center.



You can also integrate a 3rd-party chatbot service, or make use of our other 8x8 Contact Center APIs (e.g., Real Time Statistics Reporting API), to retrieve customer information, make routing decisions, and further enhance the customer experience.

Operational flow

Two-way communication is achieved by using web calls and callbacks. All messages or events must be exchanged within the context of a conversation. Multiple conversations can happen at any given time, depending on how many customers are engaging your contact center simultaneously.

Complete the following steps:

  1. Create a new conversation for each user and for each of their chat sessions.

Creating a conversation (i.e., interaction) routes it to the configured queue on the Chat API Channel. Contact Center then assigns it to an agent, based on availability and experience. Interactions with the agent within a conversation are ended when the customer-leave endpoint is triggered via the API.
Conversations can be reused by sending new messages on behalf of the user after a previous customer-leave action was made. The user rejoins the conversation and a new interaction is created and routed to the previously routed queue.

  1. Once the agent is assigned, the agent can then interact with the customer using real-time chat. As part of the conversation, send messages from the customer with agent replies from your webhook.

You also receive events like an agent joining the conversation or leaving (ending) it.

  1. Conversations are forever lasting. In order to end a conversation and to notify the Contact Center and your agents when customers leave, you need to call the customer-leave endpoint via the API. If your customers return later, you can always create a new conversation (chat session) and repeat these steps or reuse an existing conversation (suitable for reopened issues). For reopening a conversation, just add a new message after its closure and we will re-queue it in the last queue it was handled; it will then be re-offered to the next available agent assigned to that queue, who will have access to the full conversation history.



Depending on your Contact Center schedule and agent availability, returning customers might be assigned to different agents at different times; however, your agents will always get the full conversational history including previous interactions.

Did this page help you?