> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Using allocation rules

> Allocation rules automatically assign tasks to users as tokens enter a swimlane, distributing work based on each user's current task count.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/Screenshot%202024-11-14%20at%2012.54.21.png)
</Frame>

Allocation rules automatically assign tasks to users as a token enters a swimlane that has a specific role configured. For example, you can route front-office tasks to one group and back-office tasks to another.

### How allocation works

When a task reaches a swimlane with allocation rules configured, the system:

1. Identifies **candidate users** — either all users with execute permissions in that swimlane, or a specific list you define.
2. Counts each candidate's **currently assigned tasks** across all processes.
3. Assigns the task to the user with the **fewest assigned tasks** (lowest workload).
4. If two or more users have the same task count, one is selected **randomly**.

<Info>
  Allocation is based purely on task count. Task **priority** does not affect which user receives the task — it is a display and filtering field only.
</Info>

## Accessing allocation rules

To access the allocation rules, follow the next steps:

1. Open **FlowX Designer**.
2. Go to your **Application** and from the side menu, under **Task Management**, select the **Allocation rules** entry.

## Adding process and allocation rules

To add process and allocation rules, follow the next steps:

1. Click **Add process** button, in the top-right corner.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/2024-11-14%2013.01.30.gif)
</Frame>

2. Select a [**process definition**](../../../building-blocks/process/process-definition) from the drop-down list.

3. Click **Add swimlane allocations button (+)** to add allocations.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/Screenshot%202024-11-14%20at%2013.03.34.png)
</Frame>

<Info>
  If there are no users with execute rights in the swimlane you want to add (`hasExecute: false`), the following error message will be displayed:

  <Frame>
    ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/Screenshot%202024-11-14%20at%2013.06.00.png)
  </Frame>
</Info>

4. **Option 1**: Allocate all users with `execute rights`.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/platform-deep-dive/allocate_execute_rights.png)
</Frame>

5. **Option 2**: Allocate only users you choose from the drop-down list. You can use the search function to filter users by name.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/platform-deep-dive/allocate_execute_rights1.png)
</Frame>

6. Click **Save**.

<Info>
  Users with out-of-office status are skipped by automatic allocation. For more information, see the [out-of-office records documentation](using-out-of-office-records).
</Info>

## Editing allocation rules

To edit allocation rules, follow the next steps:

1. Click **Edit** button.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/Screenshot%202024-11-14%20at%2013.14.12.png)
</Frame>

2. Change the allocation method.

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/platform-deep-dive/change_allocation_method.gif)
</Frame>

3. Click **Save**.

### Viewing allocation rules

The allocation rules list displays all the configured swimlanes grouped by process:

1. **Process** - the process definition name where the swimlanes were configured
2. **Swimlane** - the name of the swimlane
3. **Allocation** - applied allocation rules
4. **Edited at** - the last time when an allocation was edited
5. **Edited by** - the user who edited/created the allocation rules

## Exporting/importing process allocation rules

To copy process allocation rules and move them between different environments, you can use the export/import feature.

You can export process allocation rules as JSON files directly from the allocation rules list:

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/Screenshot%202024-11-14%20at%2013.17.51.png)
</Frame>

<Frame>
  ![](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/4.5/Screenshot%202024-11-14%20at%2013.19.39.png)
</Frame>

## Related resources

<CardGroup cols={2}>
  <Card title="Task Management Overview" href="./task-management-overview" icon="list-check">
    Learn about Task Management features and configuration
  </Card>

  <Card title="Task Management Localization" href="./task-management-localization" icon="language">
    Localize Task Management UI in 34+ languages
  </Card>

  <Card title="Out of Office Records" href="./using-out-of-office-records" icon="calendar-xmark">
    Manage user availability for task allocation
  </Card>
</CardGroup>
