MindBehind Live: WaitingTime Calculation for Client &Agent

MindBehind Live: WaitingTime Calculation for Client &Agent


The waiting time for agent and client represents the average time each had to wait in between messages. For example: (Message order timeline): C = Client message, A = Agent message

C1→ C2→ A1→ C3

In this case the client wait time is calculated as the difference between C1→A1, this is the time client waited to receive a message from the agent and the agent wait time will be A1→C3.


1- The duration between agent assignment time to agent first response is added to the client waited time.

2- We will always consider the number of responses, not the message numbers (after a response from the agent or client, they can continue to send messages to explain situations, but all will be considered as a single response, and the time of the first message will be considered.

3- Who ended the conversations is important to calculate the waiting time as explained below.

Calculation Rules

1. If the last message was sent by the agent and

2. If the last message was sent by the client and

Prerequisites for Calculations

  • The client and agent wait times are not calculated for bot conversations
  • There should be an agent assigned to the conversation
  • The conversation has ended

Calculation example


For this case the total client wait time will be: C1→A1 + C2→A2 as C3 is still waiting for the agent to respond and the conversation has closed on the agent so only the previous two are considered. The agent wait time will be A1→C2 + A2→C3 and agent is not waiting for a client response at this stage.

Technical Details

On the backend side we have implemented the rules and calculations by creating additional variables called:

  • totalClientWaitTimeInSeconds
  • totalAgentWaitTimeInSeconds
  • timesClientWaited
  • timesAgentWaited
  • isAgentWaiting
  • lastClientResponseTime
  • lastAgentResponseTime

By using the total wait timings and diving them by the count/times waited count we are able to calculate the average wait times that are stored as:averageAgentWaitTime,averageClientWaitTime in the conversation table.

isAgentWaiting is a boolean value representing the state of the agent, i.e. is the agent currently waiting for a message from the client = true and if not then false. The false value also suggests that the client is waiting for the agent to respond.

lastClientResponseTime and lastAgentResponseTime are used to keep track of who sent the last message time, this last message will be C1 in this flow: C1→C2→C3→C4→A1 this means its the time of the last message sent by the client or agent after which they have been waiting for a response.

A flow chart created to explain the calculation when ending the conversation:

    • Related Articles

    • MindBehind Live Detailed Report

      When you go to the MindBehind Live Detailed Report page, daily report information is automatically updated. This report screen only shows information and content about terminated conversations. 1- Report Titles: After selecting the report titles, the ...
    • MindBehind Live Agent Panel Details

      The Agent Panel (Live Screen) is the home screen where company agents meet and answer conversations. Conversations that companies initiate from different channels (WhatsApp, Web Messenger, etc.) drop on this screen and are answered by company agents. ...
    • MindBehind Live Frequently Asked Questions

      How can I log in on MindBehind Live? You can register by clicking on the "Sign up now" button on the https://live.mindbehind.com/login site. After you register, you can log in on the first page that opens. What languages does MindBehind Live support? ...
    • MindBehind Live Admin Panel Details

      Open conversations: Number of ongoing conversations going on in the company, combined value of bot and agent. Completed conversations: Total number of completed conversations that company has. In-Queue conversations: Number of consumers waiting in ...
    • How to Use MindBehind Live Mobile App?

      The MindBehind Live Mobile App is available in the Apple Store and Google Play Store under the name "MindBehind Live". Thanks to this application, company agents can also access the Agent Panel and manage conversations on mobile devices. Chats ...