Documentation Index
Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
Use this file to discover all available pages before exploring further.
Get aggregated ticket analytics data grouped by multiple standard fields for a specific date range and team.
Example prompt
Get ticket analytics by assignee and status for the last month
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 the selectedFields parameter:
assignee - Ticket assignee
status - Ticket status
priority - Ticket priority
sentiment - Ticket sentiment
type - Ticket type
team - Team information
account - 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 the aggregatedData 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 the fieldAggregations 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
The crossTabulation 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 |
Sample response
{
"aggregationType": "multi_field",
"totalTickets": 2,
"totalFound": 2,
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-09-16"
},
"includeArchivedTickets": false,
"includeTicketMetadata": false,
"aggregatedData": [
{
"teamId": "THEVVHPCCER33E",
"teamName": "Engineering",
"totalTickets": 2,
"percentage": 100,
"fieldAggregations": {
"status": [
{
"statusName": "Open",
"statusUid": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX",
"ticketCount": 2,
"percentage": 100
}
],
"assignee": [
{
"assigneeName": "John Doe",
"assigneeUid": "UTHOOQNUUXZQQ3",
"ticketCount": 2,
"percentage": 100
}
]
},
"crossTabulation": {
"status_assignee": [
{
"statusName": "Open",
"statusUid": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX",
"assigneeBreakdown": {
"John Doe": {
"ticketCount": 2,
"percentage": 100,
"assigneeId": "UTHOOQNUUXZQQ3"
}
}
}
]
}
}
]
}