# Setting up the waiting queue

This section will allow you to configure the general waiting queue for all Livechat operators. To configure the waiting queue specifically by competency, please refer to that [section](/livechat/dydu-livechat/dydu-livechat-setup/waiting-queues/competency/setting-up-the-waiting-queue-by-competency.md).

## Capacity

You can modify the general capacity of operators from the Livechat settings. To do this :&#x20;

1. Go to **Preferences** > **Livechat Settings** > **General**.

<figure><img src="/files/QSDnoiI5ZNdXDJgIleT1" alt=""><figcaption></figcaption></figure>

2. Go to the **Capacity** section.

<figure><img src="/files/VRD6ybGom5Dbhk2Tb7kd" alt=""><figcaption></figcaption></figure>

In this section, two parameters are available:

* **Number of conversations per operator:** Defines the number of conversations an operator can handle simultaneously (up to 10).
* **Additional capacity per operator:** Defines the number of conversations the operator can have in the waiting queue. Conversations in the queue will not be handled until the operator has finished an ongoing conversation.

As you might have guessed, to configure the waiting queue, it is necessary to adjust the second parameter. Once this is done, the waiting queue will be in place for all your operators. If the waiting queue reaches its maximum capacity, the user will receive the response configured in the failure branch of your Livechat escalation knowledge base.

<figure><img src="/files/S4fIj2n3XlXhm5ItbQML" alt=""><figcaption></figcaption></figure>

In the example above, the configured parameter indicates that the operator can handle two conversations simultaneously and will have four additional conversations placed in the waiting queue. Each time the operator finishes a conversation, the first conversation in the waiting queue will appear on their desk.

{% hint style="warning" %}
The "**Number of conversations per operator**" parameter is not prioritized over the parameter configured in "[**Operator Capacity**](/livechat/dydu-livechat/dydu-livechat-setup/operator-capactiy.md)".

For example, if the "**Number of conversations per operator**" parameter is set to 1 and an operator has a capacity of 2 in "**Operator Capacity**", then that operator will be able to handle 2 simultaneous conversations.
{% endhint %}

{% hint style="warning" %}
When an operator logs off, all their conversations are transferred to another connected operator. If the latter reaches their maximum capacity, the remaining conversations are placed in the queue.&#x20;

In this specific case, the maximum queue capacity can be exceeded; this is intentional behavior. If no other operator is available, the user remains in the Livechat and is not transferred.&#x20;

The system will then wait for either the operator's return or a timeout, or the user must disconnect themselves.
{% endhint %}

## Position in the queue

A message displayed in the chatbox can inform the user of their position in the queue as well as the estimated waiting time.

<figure><img src="/files/zQZ8CikHRNgk3uDFlkw7" alt="" width="265"><figcaption></figcaption></figure>

This option can be added by configuring a condition *LiveChatWaitingQueueSize().*

The *LiveChatWaitingQueueSize()* condition allows you to know the current size of the livechat queue. To configure it, go to **Content -> Context Conditions** and click on **Add**.

<figure><img src="/files/jjTJjSzRNQr7DDo8rrgt" alt=""><figcaption></figcaption></figure>

A competency can optionally be specified within the parentheses.

The returned value represents the number of conversations waiting. Using this data, it is possible to estimate the waiting time based on the average duration of livechat conversations (information that can be obtained from the available statistics).

{% hint style="info" %}
Example of waiting time estimation:

* Average duration of a livechat conversation: 5 minutes
* Livechat conversations waiting: 3

**Waiting time:** Average duration of a livechat conversation × livechat conversations waiting = 15 minutes
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-en.dydu.ai/livechat/dydu-livechat/dydu-livechat-setup/waiting-queues/general/setting-up-the-waiting-queue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
