Agents
Agents are created from the HD Agent doctype and are linked to User records in the system.Agent Fields
The User account associated with this agent. This becomes the agent’s unique identifier.
The display name of the agent. Automatically synced with the User’s full name.When changed, updates the User’s first_name and last_name fields.
Profile image for the agent. Automatically synced with the User’s user_image field.
Whether the agent is active and can be assigned tickets.Inactive agents cannot receive new assignments but retain access to existing tickets.
Agent Roles
Agents can have one of two roles: Agent- Can view and respond to assigned tickets
- Can create and manage their own saved replies
- Can view knowledge base articles
- Limited to tickets within their permissions
- All Agent permissions
- Can manage other agents and teams
- Can configure assignment rules
- Can access helpdesk settings
- Has System Manager role for administrative tasks
Managing Agent Roles
Update an agent’s role programmatically:- Adds “Agent Manager” role
- Adds “System Manager” role
- Removes “Agent Manager” role
- Removes “System Manager” role
- Retains “Agent” role
Filtering Agents
The agent list supports filtering:- All: Show all agents (active and inactive)
- Active: Show only active agents (
is_active = 1) - Inactive: Show only inactive agents (
is_active = 0)
Inviting Agents
New agents can be invited through the “Invite Agents” interface, which:- Creates a User account
- Assigns the Agent role
- Creates an HD Agent record
- Sends an invitation email
Teams
Teams (HD Team doctype) allow you to organize agents into logical groups.Team Fields
Unique name for the team (e.g., “Customer Support”, “Technical Support”).
List of agents who are members of this team.Each member is an HD Team Member record with a link to an HD Agent.
Team Members
Team members are stored in the HD Team Member child doctype:Link to an HD Agent record.
Creating Teams
Create a team programmatically:Team-Based Restrictions
When therestrict_tickets_by_agent_group setting is enabled:
- Agents can only view tickets assigned to their team(s)
- Ticket assignment can be restricted to team members only
- Saved replies can be team-scoped instead of global
Agent List Resource
The frontend usescreateListResource to manage agents:
Team List Resource
Manage teams with:Agent Activity Tracking
Agents are automatically tracked in the system:- Last login time
- Assigned tickets count
- Resolved tickets count
- Average response time
Best Practices
- Role Assignment: Start agents with the Agent role and promote to Manager only when needed
- Team Organization: Group agents by expertise (e.g., Technical, Billing, Sales)
- Active Status: Use the is_active flag instead of deleting agents to preserve ticket history
- Regular Audits: Periodically review agent and team assignments
- Naming Convention: Use clear, descriptive names for teams (e.g., “Tier 1 Support” vs “Team A”)