Skip to main content
Assignment Rules automatically distribute tickets to agents based on conditions, ensuring balanced workloads and faster response times.

Overview

Assignment rules eliminate manual ticket routing by:
  • Automatically assigning tickets when they match conditions
  • Distributing workload fairly among agents
  • Routing tickets based on expertise and availability
  • Reducing response times
  • Ensuring no tickets slip through the cracks

How Assignment Rules Work

1

Ticket Created or Updated

A ticket is created or specific fields change
2

Evaluate Conditions

System checks if ticket matches assignment rule conditions
3

Select Agent

Based on routing method (Round Robin, Load Balancing, etc.)
4

Assign Ticket

Ticket is automatically assigned to selected agent
5

Notify Agent

Agent receives assignment notification

Assignment Rule Components

Each assignment rule consists of:

Basic Information

  • Name: Unique identifier for the rule
  • Description: Purpose and scope of the rule
  • Enabled: Active/inactive status
  • Priority: Order of evaluation (higher priority rules checked first)

Assignment Conditions

  • Assign Condition: When to assign tickets
  • Unassign Condition: When to remove assignments (optional)
  • Assignment Days: Which days this rule is active

Routing Configuration

  • Rule Type: How to select agents (Round Robin, Load Balancing, etc.)
  • Assignees: List of agents eligible for assignment
  • Last User: Track last assigned agent for Round Robin

Team Integration

  • Link assignment rule to a team
  • Team members automatically become assignees
  • Team-specific routing logic

Creating an Assignment Rule

1

Navigate to Settings

Go to Settings > Teams > Select Team
2

Create Assignment Rule

Click to create a new assignment rule for the team
3

Configure Basic Details

Enter name, description, and set priority
4

Set Conditions

Define when tickets should be assigned
5

Choose Routing Method

Select how tickets are distributed
6

Add Assignees

Select agents who will receive tickets
7

Set Active Days

Configure which days the rule operates
8

Enable & Save

Activate the rule to start auto-assignment

Ticket Routing Methods

Choose how tickets are distributed among assignees:

Round Robin

Round Robin Distribution

Tickets are assigned to agents in rotation order:
  • First ticket → Agent A
  • Second ticket → Agent B
  • Third ticket → Agent C
  • Fourth ticket → Agent A (cycle repeats)
Best for: Evenly distributing volume when all agents have similar capacity

Load Balancing

Load Balancing

Assigns to the agent with fewest open tickets:
  • Agent A: 5 open tickets
  • Agent B: 3 open tickets
  • Agent C: 7 open tickets
  • New ticket → Agent B
Best for: Balancing workload when agents work at different speeds

Based on Field

Field-Based Assignment

Assign based on a ticket field value (e.g., region, product, language):
  • Ticket field “Product” = “Mobile App” → Mobile Team Agent
  • Ticket field “Region” = “EMEA” → EMEA Support Agent
Best for: Routing to specialists or regional teams
The actual routing methods available depend on your Frappe Helpdesk configuration and any custom Assignment Rule types.

Assignment Conditions

Define when tickets should be auto-assigned:

Visual Condition Builder

Priority equals "High"

Condition Examples

[
  {
    "field": "priority",
    "operator": "=",
    "value": "High"
  }
]
[
  {
    "field": "ticket_type",
    "operator": "=",
    "value": "Technical Question"
  },
  {
    "field": "agent_group",
    "operator": "=",
    "value": "Technical Support"
  }
]
[
  {
    "field": "_assign",
    "operator": "is",
    "value": "not set"
  }
]
[
  {
    "field": "customer",
    "operator": "in",
    "value": ["Enterprise Corp", "Premium Inc"]
  },
  {
    "field": "status",
    "operator": "=",
    "value": "Open"
  }
]

Unassign Conditions

Optionally remove assignments when conditions are met:

When to Use Unassign

  • Ticket priority is lowered
  • Ticket is reassigned to different team
  • Ticket status changes to “On Hold”
  • Custom business logic requires reassignment

Example Scenarios

Priority Downgrade

Unassign when priority changes from “High” to “Low”

Team Change

Unassign when ticket moves to different team

Status Change

Unassign when status becomes “On Hold”

Reassignment

Unassign before applying different assignment rule

Assignment Days

Control when assignment rules are active:
Active Days:
  Monday: Yes
  Tuesday: Yes
  Wednesday: Yes
  Thursday: Yes
  Friday: Yes
  Saturday: No
  Sunday: No
Tickets created on inactive days remain unassigned until the next active day, or can be manually assigned.

Managing Assignees

Adding Assignees

1

Open Assignment Rule

Navigate to the assignment rule settings
2

Click Add Assignee

Use the assignee search/selector
3

Select Agent

Choose from available agents
4

Save

Agent is added to rotation

Removing Assignees

  • Click the X next to agent name
  • Agent is removed from future assignments
  • Existing assignments to that agent remain unchanged

Last Assigned Indicator

For Round Robin routing:
  • A badge shows which agent received the last assignment
  • Helps visualize rotation state
  • Resets when assignee list changes

Team-Based Assignment

Integrate assignment rules with teams:

Team Assignment Flow

1

Ticket Assigned to Team

Ticket’s “Team” field is set (manually or by automation)
2

Check for Assignment Rule

System looks for active assignment rule linked to that team
3

Evaluate Conditions

If rule conditions match, proceed with assignment
4

Assign to Team Member

Select agent from team based on routing method

Team Member Restrictions

When a ticket’s team changes:
  • If assigned agent is NOT in new team
  • AND team has assignment rule with assignees
  • Agent is automatically unassigned
  • New assignment rule can then apply
This prevents agents from other teams from staying assigned when tickets are routed elsewhere.

Priority & Ordering

When multiple assignment rules could match:
  1. Rules are evaluated in priority order (highest first)
  2. First matching rule wins
  3. Lower priority rules are skipped
  4. If no rules match, ticket remains unassigned

Setting Priorities

Rule Priority Examples:
  1. VIP Customer Assignment (Priority: 100)
  2. High Priority Bugs (Priority: 75)
  3. Technical Questions (Priority: 50)
  4. General Support (Priority: 25)

Notifications

Agents receive notifications when assigned:
  • In-app notification: Bell icon notification
  • Email notification: Optional email alert
  • Real-time update: Instant notification if logged in

Notification Content

  • Who assigned (“System” for auto-assignment)
  • Ticket ID and subject
  • Ticket priority and type
  • Link to open ticket

Manual Override

Assignment rules don’t prevent manual assignment:
  • Agents can reassign tickets at any time
  • Manual assignments override auto-assignment
  • Unassign conditions may still trigger
Manual assignments are tracked in ticket history, showing both auto and manual assignments.

Best Practices

Begin with basic Round Robin for your main team. Add complexity as you learn what works.
Set priorities to ensure VIP or urgent tickets are handled by the right rules first.
Don’t put all agents in all rules. Specialize based on expertise or capacity.
Regularly check if assignments are actually balanced. Adjust routing method if needed.
Match rule active days to agent schedules. Don’t assign to offline agents.
Create test tickets to verify assignment logic before enabling rules in production.
Use clear descriptions explaining why each rule exists and what it does.

Common Scenarios

Scenario 1: Basic Support Team

Rule: General Support Assignment
Condition: Status = "Open" AND Team = "Support"
Routing: Round Robin
Assignees: [Agent A, Agent B, Agent C]
Days: Monday-Friday

Scenario 2: Priority-Based Routing

Rule 1: Critical Issues (Priority: 100)
Condition: Priority = "Critical"
Routing: Load Balancing
Assignees: [Senior Agent A, Senior Agent B]
Days: All days

Rule 2: Normal Issues (Priority: 50)
Condition: Priority in ["Low", "Medium"]
Routing: Round Robin
Assignees: [Agent A, Agent B, Agent C, Agent D]
Days: Monday-Friday

Scenario 3: Specialist Assignment

Rule: API Questions
Condition: Ticket Type = "API Question"
Routing: Round Robin
Assignees: [Technical Specialist A, Technical Specialist B]
Days: Monday-Friday

Rule: Billing Questions
Condition: Ticket Type = "Billing"
Routing: Round Robin
Assignees: [Billing Specialist A]
Days: Monday-Friday

Troubleshooting

  • Check if assignment rule is enabled
  • Verify conditions match ticket properties
  • Ensure current day is in assignment days
  • Confirm assignees are added to rule
  • Check if higher priority rule is catching tickets first
  • Review routing method (Round Robin vs Load Balancing)
  • Check assignee list for unexpected agents
  • Verify conditions aren’t too broad
  • Look for manual assignments overriding auto-assignment
  • Check unassign conditions
  • Verify ticket team matches assignee’s teams
  • Review team member restrictions
  • Check for conflicting automation
  • Switch from Round Robin to Load Balancing
  • Review agent capacity and current assignments
  • Consider splitting into multiple rules by priority
  • Check if some agents have days off

API & Automation

Assignment rules can be managed programmatically:
# Create assignment rule via API
rule = frappe.get_doc({
    "doctype": "Assignment Rule",
    "name": "High Priority Assignment",
    "document_type": "HD Ticket",
    "disabled": 0,
    "priority": 75,
    "rule": "Round Robin",
    "users": [
        {"user": "[email protected]"},
        {"user": "[email protected]"}
    ]
})
rule.insert()
Assignment Rules use the Frappe Framework’s built-in Assignment Rule doctype, extended for helpdesk-specific features.

Performance Considerations

  • Assignment rules run automatically on ticket save
  • Conditions are evaluated in priority order
  • Multiple tickets can be assigned in batch
  • Assignee selection is fast (simple rotation or count query)
For high-volume environments, use targeted conditions rather than evaluating every ticket against every rule.

Build docs developers (and LLMs) love