> For the complete documentation index, see [llms.txt](https://guide.tiledesk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.tiledesk.com/manage-your-workspace/group-assignment-and-load-balancing.md).

# Group assignment and load balancing

Configure how conversations are distributed among groups assigned to a department.

**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

**API** using `curl`:

```
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
* 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FcukoyHS21hqkLtyg8ODY%2Fimage.png?alt=media&amp;token=a7c086de-edde-4504-b0c5-292459a14de3" alt=""><figcaption></figcaption></figure>

After the initial setup group percentages can be modified at any time

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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FGb1Xn31k9aRdVSlKu4uV%2Fimage.png?alt=media&amp;token=bbd9f399-1d7c-4eeb-89e5-c84f89e4d6b9" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2Fp2ZLjbdxHPjY6Q566CuQ%2Fimage.png?alt=media&amp;token=220d28f0-13f1-4a29-8675-c0906bbcac3e" 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="https://1328774413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVguk6y5OMn3pAaHZSiwU%2Fuploads%2FCRA06LMEcyQElPolcDO6%2Fimage.png?alt=media&amp;token=5f3c4f82-cea9-4d52-887b-9b821ed9d9cf" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://guide.tiledesk.com/manage-your-workspace/group-assignment-and-load-balancing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
