Get Dashboard Data
Retrieve dashboard metrics and charts based on filters.From
helpdesk/api/dashboard.py:25 - Agent-only endpoint for fetching dashboard analytics.Parameters
Type of dashboard data to retrieve:
number_card- Summary metrics (ticket count, SLA %, avg response time, etc.)trend- Time-series data for trendsmaster- Breakdown charts by team, type, priority, channel
Filter options for the dashboard data:
from_date(string) - Start date (defaults to 30 days ago)to_date(string) - End date (defaults to today)team(string) - Filter by specific teamagent(string) - Filter by specific agent (use@mefor current user)
Response
Returns different data structures based ondashboard_type:
Number Card Data
Array of metric cards:Metric name
Current period value
Change from previous period
Unit suffix (e.g., ”%”, ” hrs”, ” days”)
Whether a decrease is positive (true for tickets, response time)
Trend Data
Array of time-series charts:Master Dashboard Data
Array of breakdown charts (team, type, priority, channel):Permissions
- Agent-only: Requires
@agent_onlydecorator - Managers: Can view any agent/team data
- Agents: Can only view their own data (agent filter must be
@meor their user ID)
Example
Number Card Metrics
The number card dashboard includes these metrics (fromhelpdesk/api/dashboard.py:140):
Tickets
Total tickets created in the period.% SLA Fulfilled
Percentage of resolved tickets that met SLA requirements.Avg. First Response
Average time (in hours) to first respond to a ticket.Avg. Resolution
Average time (in days) to resolve a ticket.Avg. Feedback Rating
Average customer feedback rating (out of 5 stars).Trend Charts
The trend dashboard includes (fromhelpdesk/api/dashboard.py:239):
Ticket Trend
Daily breakdown of open vs closed tickets, with SLA fulfillment rate overlay.Feedback Trend
Daily average feedback rating and number of rated tickets.Master Dashboard Charts
The master dashboard includes (fromhelpdesk/api/dashboard.py:409):
Tickets by Team
Distribution of tickets across agent groups.Tickets by Type
Breakdown by ticket type (if configured).Tickets by Priority
Distribution across priority levels.Tickets by Channel
Split between portal and email ticket creation.Filter Behavior
Date Ranges
- Defaults to last 30 days if not specified
to_dateis inclusive (uses< to_date + 1 dayinternally)- Previous period for delta calculation has same length as current period
Team Filter
Filters byagent_group field on tickets.
Agent Filter
UsesJSON_SEARCH to find agent in ticket’s _assign field. The special value @me is replaced with frappe.session.user.
Error Handling
Related Endpoints
Tickets API
Query individual tickets
Agents API
Manage agents for team filters