---
description: An Assignment Rule lets you set up automatic assignment of documents to Users.
---

# Assignment Rule

* To assign the support tickets automatically amongst the employees who work on support, an Assignment Rule can be used.

**You can access Assignment Rule via:**                                                                Type 'Assignment Rule List' in search bar.

### 1. How to create an Assignment Rule[ ](https://docs.erpnext.com/docs/v13/user/manual/en/automation/assignment-rule#1-how-to-create-an-assignment-rule)                     <a href="#id-1-how-to-create-an-assignment-rule" id="id-1-how-to-create-an-assignment-rule"></a>

To set up an automatic assignment:

1. Go to the Assignment Rule list.
2. Click '+ Add Assignment Rule'.
3. Select the Document Type you want to assign automatically (for example **Issue**).
4. Write the "Description" that will be added to the To Do.
5. Select the condition for the assignment. You can write simple Python expressions for automatic assignment in the `Assign Rule`, `Close Rule` and `Unassign Rule`.&#x20;
6.  You will have access to all the properties of the document and can use operators like >, <, ==, etc and also multiple conditions like `and` and `or`.

    Examples:

    * `status == "Open"`
    * `issue_type == "Technical" and priority=="High" and status == "Open"`



7\. Select the assignment rule.                                                               &#x20;

* **Round Robin**: Assign each document to a User in sequence.
* **Load Balancing**: Assign new documents to the User who has the least number of assignments.
* &#x20;**Based on Field**: Introduced in v13, this rule can be used to assign a document to the User that is set in the configured field.

Select the list of Users to whom this Assignment Rule will apply:

![](https://429967333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgEi4gT9xOnYSAL1Pei%2F-MiGkOvmhO1weSIAeU4d%2F-MiHTWoBvEtKo4f_hitP%2FAssign%20to%20users.png?alt=media\&token=c3d996ff-a282-40d8-ad24-73821a6dc036)

Select the User link field which will determine to whom this Assignment Rule will apply:

![](https://429967333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgEi4gT9xOnYSAL1Pei%2F-MiGkOvmhO1weSIAeU4d%2F-MiHUcgROeAi0h7VZgxd%2FBased%20on%20Field.png?alt=media\&token=33f09f55-bccb-4f1d-8ecb-fd9b2ad85f84)

8\. Save.

* You can use properties of the document in the Description field that will be part of the assignment.
* Higher 'Priority' Assignment Rules will be applied first.

Example:

High Priority Issue _File Upload not working_ has been assigned to you.

#### 1.1 Multiple Assignment Rules                                                                     <a href="#id-11-multiple-assignment-rules" id="id-11-multiple-assignment-rules"></a>

* You can also set up multiple auto assignments for each Document Type, the one with the highest Priority will be applied first.

![assignment-rule-with-higher-priority](https://429967333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgEi4gT9xOnYSAL1Pei%2F-MiGkOvmhO1weSIAeU4d%2F-MiHVZfMYx2Te8jv7zsI%2Fassignment-rule-with-higher-priority.png?alt=media\&token=1e3a35d3-3147-48e0-b616-406bcbf22e9a)

#### 1.2 Setting Due Date for assignment <a href="#id-12-setting-due-date-for-assignment" id="id-12-setting-due-date-for-assignment"></a>

* You can auto set due dates for assignments based on the date field in the reference document.

Example:

If you want to set a due date on Issue assignment based on the "Resolution By" date of the Issue, you can do so by selecting "Resolution By" field in `Due Date Based On` option in Assignment Rule.

![](https://429967333-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgEi4gT9xOnYSAL1Pei%2F-MiGkOvmhO1weSIAeU4d%2F-MiHW6NY0UMG2AbTAQJZ%2Fassignment%201.png?alt=media\&token=e610e54b-65df-4fcb-bb1b-3a2344947d01)



**Note:**

* "Due Date Based On" option will not be available if "Document Type" is not yet selected or if the selected Document Type does not have any "Date" or "Datetime" field.
* Due Date in the assignment/ToDo will be updated whenever the "Due Date Based On" field value is updated in the reference document.















