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 account for a specific date range.
Example prompt
Get ticket analytics by account for the last 30 days
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 the aggregatedData 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 the teamBreakdown 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 |
Sample response
{
"aggregationType": "account",
"totalTickets": 2,
"totalFound": 2,
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-09-16"
},
"includeArchivedTickets": false,
"includeTicketMetadata": false,
"aggregatedData": [
{
"accountId": "CDN7BH2K1020181NADAYN2NJG6GSF",
"accountName": "Acme Corp",
"accountPrimaryDomain": "acme.com",
"accountSource": "Website",
"ticketCount": 2,
"teamBreakdown": {
"THEVVHPCCER33E": {
"teamId": "THEVVHPCCER33E",
"teamName": "Engineering",
"ticketCount": 2,
"statusBreakdown": {
"Open": {
"ticketCount": 2,
"statusId": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX",
"percentage": 100
}
},
"priorityBreakdown": {
"Urgent": {
"ticketCount": 1,
"priorityId": "CSC6BH2K100SATQR0ZS6KHBW1DFPK",
"percentage": 50
},
"Medium": {
"ticketCount": 1,
"priorityId": "CSC6BH2K10XR2ZVVY84VV8506YN80",
"percentage": 50
}
},
"assigneeBreakdown": {
"John Doe": {
"ticketCount": 2,
"assigneeId": "UTHOOQNUUXZQQ3",
"assigneeName": "John Doe",
"percentage": 100
}
},
"percentage": 100
}
}
}
]
}