> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# supportTicketCount

> How many of the store's tickets `supportTickets` lists for these filters. It takes the same filters and, like it, leaves out hidden, deleted, demo and merged tickets, so it can be lower than the help desk's view count, which includes demo tickets. The count is search-indexed and can trail writes by a few seconds.

**Required scopes:** [`support_tickets_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_tickets_read)

## Arguments

**assigneeIds** `[ID!]`

Tickets assigned to any of these team members, at most 100. `assigneeIds`, `assigneeTypes` and `includeUnassigned` match as one OR.

**assigneeTypes** `[\[SupportTicketAssigneeType!\]](/docs/api-reference/v3/reference/support/support-ticket-assignee-type)`

Tickets with any of these kinds of assignee. Matches with `assigneeIds` and `includeUnassigned` as one OR.

**channels** `[\[MessageChannel!\]](/docs/api-reference/v3/reference/support/message-channel)`

On any of these channels.

**closedAfter** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets closed after this instant.

**closedBefore** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets closed before this instant.

**createdAfter** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets created after this instant.

**createdBefore** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets created before this instant.

**customerId** `ID`

The customer's id or legacy id. Requires customers\_read.

**Requires:** [`customers_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-customers_read)

**excludedTagIds** `[ID!]`

Has none of these tags, at most 100.

**inboxEmails** `[String!]`

Tickets that came in on any of these store inbox addresses, at most 100. Matched without case.

**includeUnassigned** `Boolean`

Also match tickets with no assignee. Matches with `assigneeIds` and `assigneeTypes` as one OR.

**lastCustomerMessageAfter** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets whose last customer message is after this instant.

**lastCustomerMessageBefore** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets whose last customer message is before this instant.

**lastMerchantMessageAfter** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets whose last message from the team, the AI agent or an automation is after this instant.

**lastMerchantMessageBefore** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets whose last message from the team, the AI agent or an automation is before this instant.

**lastResponseAfter** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets whose last message, from the customer or the team, is after this instant.

**lastResponseBefore** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only tickets whose last message, from the customer or the team, is before this instant.

**mentionedIds** `[ID!]`

Tickets with an internal note that @mentions any of these team members, at most 100.

**query** `String`

The inbox search: message and subject words, the customer's name, email or phone, order numbers. At most 200 characters. Matches customer details with only support\_tickets\_read, as the inbox does.

**queryFields** `[\[SupportTicketSearchField!\]](/docs/api-reference/v3/reference/support/support-ticket-search-field)`

Where `query` looks. Omitted or empty: everywhere, including the AI summary.

**searchContains** `[String!]`

Tickets that contain every one of these keywords, at most 10 of 200 characters each. Searches what `query` does except order numbers, and matches customer details with only support\_tickets\_read.

**searchContainsFields** `[\[SupportTicketSearchField!\]](/docs/api-reference/v3/reference/support/support-ticket-search-field)`

Where `searchContains` looks. Omitted or empty: everywhere it can.

**statuses** `[\[SupportTicketStatus!\]](/docs/api-reference/v3/reference/support/support-ticket-status)`

Any of these. Omitted or empty: every status but ARCHIVED, as the help desk lists tickets; name ARCHIVED to include archived tickets.

**tagIds** `[ID!]`

Has any of these tags, at most 100.

**unread** `Boolean`

True: tickets with a customer message the team has not read yet. False: the others, including tickets the customer never wrote on.

## Returns

**supportTicketCount** `Int!` *required*

## Example

```graphql theme={null}
query {
  supportTicketCount(assigneeIds: "...", assigneeTypes: AI_AGENT, channels: ATTENTIVE, closedAfter: "...", closedBefore: "...", createdAfter: "...", createdBefore: "...", customerId: "...", excludedTagIds: "...", inboxEmails: "...", includeUnassigned: true, lastCustomerMessageAfter: "...", lastCustomerMessageBefore: "...", lastMerchantMessageAfter: "...", lastMerchantMessageBefore: "...", lastResponseAfter: "...", lastResponseBefore: "...", mentionedIds: "...", query: "...", queryFields: AI_SUMMARY, searchContains: "...", searchContainsFields: AI_SUMMARY, statuses: ARCHIVED, tagIds: "...", unread: true)
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.