MCP tool: get_tickets_analytics_by_standard_fields
Get aggregated ticket analytics data grouped by multiple standard fields for a specific date range and team.
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 | string | No | Team ID to filter by (optional) |
| selectedFields | string | Yes | Comma-separated list of standard fields to aggregate by (e.g., assignee,status,priority,sentiment) |
| 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 500, only used when includeTicketMetadata is true) |
Available standard fields
The following standard fields can be used in theselectedFields parameter:
assignee- Ticket assigneestatus- Ticket statuspriority- Ticket prioritysentiment- Ticket sentimenttype- Ticket typeteam- Team informationaccount- Account information
Response fields
The response will contain aggregated analytics data with the following structure:| Field | Type | Description |
|---|---|---|
| aggregationType | string | Type of aggregation performed (“multi_field”) |
| 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 team-based analytics objects with field aggregations |
Team analytics object fields
Each team in theaggregatedData array contains:
| Field | Type | Description |
|---|---|---|
| teamId | string | Team unique identifier |
| teamName | string | Team name |
| totalTickets | number | Total number of tickets for this team |
| percentage | number | Percentage of total tickets |
| fieldAggregations | object | Individual field aggregations with counts and percentages |
| crossTabulation | object | Cross-tabulation analysis between selected fields |
Field aggregation fields
Each field in thefieldAggregations object contains an array of field values:
| Field | Type | Description |
|---|---|---|
| fieldName | string | Name of the field value (e.g., “Open”, “John Doe”) |
| fieldUid | string | Unique identifier for the field value |
| ticketCount | number | Number of tickets with this field value |
| percentage | number | Percentage of total tickets |
Cross-tabulation fields
ThecrossTabulation object contains combinations of fields (e.g., “status_assignee”):
| Field | Type | Description |
|---|---|---|
| primaryFieldName | string | Name of the primary field value |
| primaryFieldUid | string | Unique identifier for the primary field value |
| secondaryFieldBreakdown | object | Breakdown by secondary field with counts and percentages |