> ## 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 tickets analytics by assignee

> MCP tool to fetch comprehensive assignee performance metrics and ticket analytics for a specified date range.

import Admonition from '@theme/Admonition';

### MCP tool: `get_tickets_analytics_by_assignee`

Fetch comprehensive assignee performance metrics and ticket analytics for a specified date range.

<Admonition type="note">
  This tool provides aggregated analytics data for assignee performance analysis, not individual ticket details. Use the search\_tickets tool for finding specific tickets.
</Admonition>

### Example prompt

```prompt theme={null}
Get assignee performance analytics for the last month
```

<Admonition type="info">
  When you use this prompt in a chat with the model (with the MCP tool registered), the model will automatically call the <code>get\_tickets\_analytics\_by\_assignee</code> tool with the correct arguments.
</Admonition>

### Parameters

<table>
  <thead>
    <tr>
      <th>Parameter</th>
      <th>Type</th>
      <th>Required</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>dateRange</td><td>object</td><td>Yes</td><td>Inclusive date range to aggregate over</td></tr>
    <tr><td>dateRange.startDate</td><td>string</td><td>Yes</td><td>Start date in YYYY-MM-DD format</td></tr>
    <tr><td>dateRange.endDate</td><td>string</td><td>Yes</td><td>End date in YYYY-MM-DD format</td></tr>
    <tr><td>includeArchivedTickets</td><td>boolean</td><td>No</td><td>Include archived tickets (default: false)</td></tr>
    <tr><td>includeTicketMetadata</td><td>boolean</td><td>No</td><td>Include minimal ticket metadata for drill-down (default: true)</td></tr>
    <tr><td>teamIds</td><td>array</td><td>No</td><td>Optional array of team IDs to filter by</td></tr>
    <tr><td>metadataPage</td><td>number</td><td>No</td><td>Page number for metadata pagination (default: 1)</td></tr>
    <tr><td>metadataLimit</td><td>number</td><td>No</td><td>Limit for metadata results per page (default: 25)</td></tr>
  </tbody>
</table>

### Response fields

The response will contain aggregated analytics data with the following structure:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>aggregationType</td><td>string</td><td>Type of aggregation performed ("assignee")</td></tr>
    <tr><td>totalTickets</td><td>number</td><td>Total number of tickets in the date range</td></tr>
    <tr><td>totalFound</td><td>number</td><td>Total number of tickets found matching criteria</td></tr>
    <tr><td>dateRange</td><td>object</td><td>The date range used for the analysis</td></tr>
    <tr><td>includeArchivedTickets</td><td>boolean</td><td>Whether archived tickets were included</td></tr>
    <tr><td>includeTicketMetadata</td><td>boolean</td><td>Whether ticket metadata was included</td></tr>
    <tr><td>aggregatedData</td><td>array</td><td>Array of team-based analytics objects with assignee breakdowns</td></tr>
  </tbody>
</table>

#### Team analytics object fields

Each team in the `aggregatedData` array contains:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>teamId</td><td>string</td><td>Team unique identifier</td></tr>
    <tr><td>teamName</td><td>string</td><td>Team name</td></tr>
    <tr><td>total</td><td>number</td><td>Total number of tickets for this team</td></tr>
    <tr><td>ticketCount</td><td>number</td><td>Number of tickets for this team</td></tr>
    <tr><td>assignees</td><td>object</td><td>Detailed assignee breakdown with nested analytics</td></tr>
    <tr><td>percentage</td><td>number</td><td>Percentage of total tickets</td></tr>
  </tbody>
</table>

#### Assignee breakdown fields

Each assignee in the `assignees` object contains:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>assigneeId</td><td>string</td><td>Assignee unique identifier</td></tr>
    <tr><td>assigneeName</td><td>string</td><td>Assignee name</td></tr>
    <tr><td>assigneeEmail</td><td>string</td><td>Assignee email address</td></tr>
    <tr><td>ticketCount</td><td>number</td><td>Number of tickets assigned to this assignee</td></tr>
    <tr><td>percentage</td><td>number</td><td>Percentage of team tickets</td></tr>
    <tr><td>statusBreakdown</td><td>object</td><td>Status breakdown for this assignee's tickets</td></tr>
    <tr><td>priorityBreakdown</td><td>object</td><td>Priority breakdown for this assignee's tickets</td></tr>
    <tr><td>sentimentBreakdown</td><td>object</td><td>Sentiment breakdown for this assignee's tickets</td></tr>
  </tbody>
</table>

#### Status/Priority/Sentiment breakdown fields

Each status, priority, or sentiment in the breakdowns contains:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>ticketCount</td><td>number</td><td>Number of tickets with this status/priority/sentiment</td></tr>
    <tr><td>percentage</td><td>number</td><td>Percentage of assignee's tickets</td></tr>
    <tr><td>statusId/priorityId/sentimentId</td><td>string</td><td>Unique identifier for the status/priority/sentiment</td></tr>
  </tbody>
</table>

### Sample response

```json theme={null}
{
  "aggregationType": "assignee",
  "totalTickets": 2,
  "totalFound": 2,
  "dateRange": {
    "startDate": "2025-01-01",
    "endDate": "2025-09-16"
  },
  "includeArchivedTickets": false,
  "includeTicketMetadata": false,
  "aggregatedData": [
    {
      "teamId": "THEVVHPCCER33E",
      "teamName": "Engineering",
      "total": 2,
      "ticketCount": 2,
      "assignees": {
        "John Doe": {
          "assigneeId": "UTHOOQNUUXZQQ3",
          "assigneeName": "John Doe",
          "assigneeEmail": "john.doe@thena.ai",
          "ticketCount": 2,
          "percentage": 100,
          "statusBreakdown": {
            "Open": {
              "ticketCount": 2,
              "percentage": 100,
              "statusId": "3SC6BH2K10X5BSCXF2MFWVYZVYNFX"
            }
          },
          "priorityBreakdown": {
            "Urgent": {
              "ticketCount": 1,
              "percentage": 50,
              "priorityId": "CSC6BH2K100SATQR0ZS6KHBW1DFPK"
            },
            "Medium": {
              "ticketCount": 1,
              "percentage": 50,
              "priorityId": "CSC6BH2K10XR2ZVVY84VV8506YN80"
            }
          },
          "sentimentBreakdown": {
            "Neutral": {
              "ticketCount": 1,
              "percentage": 50,
              "sentimentId": "MSC6BH2K1052GKT05M6QTFZVTPQ3S"
            },
            "Negative": {
              "ticketCount": 1,
              "percentage": 50,
              "sentimentId": "MSC6BH2K10CBVVTXD3Y6J5AC3X8R2"
            }
          }
        }
      },
      "percentage": 100
    }
  ]
}
```

<Admonition type="tip">
  Always pass an object as input, even if empty, to avoid errors when calling the tool directly.
</Admonition>

<Admonition type="info">
  This tool is optimized for performance analysis and workload distribution assessment. The default behavior includes ticket metadata for drill-down analysis.
</Admonition>

<Admonition type="warning">
  The date range must be valid and startDate must be less than or equal to endDate. Use ISO 8601 date format (YYYY-MM-DD).
</Admonition>

***
