Estimated wait time (EWT) is used in determining when to launch [overcapacity
deflection](https://docs.cloud.google.com/contact-center/ccai-platform/docs/call-settings#call-settings-overcapacity-deflection) and for In-Web and In-App
UIs, which show wait time to end-users.

## EWT for calls

For calls, EWT is calculated based on the following formula:

    EWT = ((average duration in channel / active agents in channel) * (agents in
    common / active agents in current queue) * (queued calls - available agents)) +
    {EWT for callbacks, campaign calls, and scheduled calls}

## EWT for chats

For chats, EWT is calculated based on the following formula:

    EWT = (average duration in channel / active agents in channel) * (agents in
    common / active agents in current queue) * (queued chats - available agents)

> [!NOTE]
> **Note:** In chat channels, the value for `active agents` includes a multiplier based on the chat concurrency if the chat concurrency is \>1. This is because chat concurrency increases the amount of available chats a single agent can handle.

## Calculation considerations

The following are considered when calculating EWT:

- Priority settings are considered when calculating the
  number of calls or chats in queue. Only calls or chats with higher
  priority than the end-user are counted.

- Multiple assignments of agents are considered when calculating
  available agents. For example, if the agent is assigned to only one
  queue, the count is `1`. But if the agent is assigned to two queues,
  the count is `0.5`. If the agent is assigned to three queues, the
  count is `0.3`.

- Offline agents are excluded when calculating active and available agents.

- The `average duration` value is based on the previous hour.

- 10 seconds of wait time is added to the EWT for all sessions. This is to
  account for channel-specific messages to the end-user.