MCP tool: get_tickets_analytics_by_account
Get aggregated ticket analytics data grouped by account for a specific date range.
Example prompt
Parameters
| Parameter | Type | Required | Description | 
|---|---|---|---|
| dateRange | object | Yes | Inclusive date range to aggregate over | 
| dateRange.startDate | string | Yes | Start date in YYYY-MM-DD format | 
| dateRange.endDate | string | Yes | End date in YYYY-MM-DD format | 
| teamIds | array | No | Optional array of team IDs to filter by | 
| includeArchivedTickets | boolean | No | Include archived tickets (default: false) | 
| includeTicketMetadata | boolean | No | Include minimal ticket metadata for drill-down (default: false) | 
| metadataPage | number | No | Page number for metadata pagination (1-based, only used when includeTicketMetadata is true) | 
| metadataLimit | number | No | Limit for metadata results per page (max 200, only used when includeTicketMetadata is true) | 
Response fields
The response will contain aggregated analytics data with the following structure:| Field | Type | Description | 
|---|---|---|
| aggregationType | string | Type of aggregation performed (“account”) | 
| totalTickets | number | Total number of tickets in the date range | 
| totalFound | number | Total number of tickets found matching criteria | 
| dateRange | object | The date range used for the analysis | 
| includeArchivedTickets | boolean | Whether archived tickets were included | 
| includeTicketMetadata | boolean | Whether ticket metadata was included | 
| aggregatedData | array | Array of account-based analytics objects | 
Account analytics object fields
Each account in theaggregatedData array contains:
| Field | Type | Description | 
|---|---|---|
| accountId | string | Account unique identifier | 
| accountName | string | Account name | 
| accountPrimaryDomain | string | Account primary domain | 
| accountSource | string | Account source | 
| ticketCount | number | Number of tickets for this account | 
| teamBreakdown | object | Breakdown by team with detailed metrics | 
Team breakdown fields
Each team in theteamBreakdown object contains:
| Field | Type | Description | 
|---|---|---|
| teamId | string | Team unique identifier | 
| teamName | string | Team name | 
| ticketCount | number | Number of tickets for this team | 
| percentage | number | Percentage of total tickets | 
| statusBreakdown | object | Breakdown by ticket status with counts and percentages | 
| priorityBreakdown | object | Breakdown by ticket priority with counts and percentages | 
| assigneeBreakdown | object | Breakdown by assignee with counts and percentages |