Assignment Rule
Introduced in Version 12, Assignment Rules allow documents to be assigned automatically to users based on predefined conditions and assignment methods. This helps distribute work efficiently without requiring manual assignment.
1. Overview
Assignment Rules automate the creation of assignments (ToDos) for selected document types. They are commonly used for documents such as Issues, where support tickets need to be distributed among team members.
2. How to Create an Assignment Rule
- Go to the Assignment Rule list and click New.
- Select the Document Type to which the rule will apply.
- Enter a description that will appear in the generated assignment.
- Define assignment conditions using Python expressions.
- Select the assignment method.
- Choose the users or user field for assignment.
- Save the Assignment Rule.
3. Assignment Conditions
Assignment, closing, and unassignment rules support simple Python expressions using document fields. These expressions determine when assignments are created, closed, or removed.
Examples:
status == "Open"
issue_type == "Technical" and priority == "High" and status == "Open"
4. Assignment Methods
Round Robin
Documents are assigned sequentially to users in the selected user list, ensuring work is distributed evenly over time.
Load Balancing
Each new document is assigned to the user who currently has the fewest active assignments.
Based on Field
Introduced in Version 13, this method assigns the document to the user specified in a selected User Link field within the document.
5. Assignment Description
The description entered in the Assignment Rule becomes part of the generated ToDo. Document fields can be referenced to create dynamic assignment messages.
Example:
High Priority Issue File Upload not working has been assigned to you.
6. Multiple Assignment Rules
Multiple Assignment Rules can be created for the same document type. When more than one rule matches, ERPNext applies the rule with the highest priority.
7. Due Date for Assignments
Assignment Rules can automatically populate assignment due dates using a Date or Datetime field from the reference document.
For example, an Issue assignment can use the Resolution By field to automatically set the assignment due date.
Notes:
- The Due Date Based On option is available only after selecting a document type that contains Date or Datetime fields.
- If the selected date field is updated in the document, the assignment due date is updated automatically.
8. Related Topics
- Workflows
- Workflow Actions