# Group assignment and load balancing

**How it works**

* Each department can have one or more groups assigned.
* When a user selects a department in the live chat widget (e.g. *Sales* or *Support*), conversations will be routed to the groups associated with that department.
* Within each group, conversations are distributed to members using the **Round Robin** method.
* In addition to Round Robin, you can also define a **load distribution percentage** for each group.

**Load distribution**

* The load distribution percentage determines how many conversations each group will receive relative to the others in the same department.
* Example: If *Group A* is assigned 40% and *Group B* is assigned 60%, conversations will be distributed in Round Robin order but respecting the configured ratio.

**Configuration**\
As first step you must assign load distribution percentages to groups through the API or  through the UI&#x20;

**API** using `curl`:&#x20;

```
curl -L -X PUT 'https://example.com/api/{project_id}/departments/{department_id}' \
-H 'Authorization: {JWT_token}' \
-H 'Content-Type: application/json' \
-d '{
    "groups": [
        {
            "group_id": "{id_group}",
            "percentage": 20
        },
        {
            "group_id": "{id_group}",
            "percentage": 80
        }
    ]
}'
```

**UI**  To assign load distribution percentages to groups through UI

* Navigate to the **Departments** page (**Settings > Routing & Depts**);
* Select a Department&#x20;
* Assign groups to the department
* Click the **Edit load distribution** button to define the load percentage for each group.
* **Update the department** to make the changes effective

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

After the initial setup group percentages can be modified at any time  &#x20;

1. Navigate to the **Departments** page (**Settings > Routing & Depts**);
2. Select the Department you configured for load balancing;
3. Click the **Edit load distribution** button.<br>

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

in the **Edit load distribution** dialog change the percentage values and Save.

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

On the list of groups you will see the updated percentage values. As a last step, remember to update the Department

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


---

# 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://guide.tiledesk.com/manage-your-workspace/group-assignment-and-load-balancing.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.
