> ## 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.

# supportTopicMatches

> Test which of the store's topics a sample customer message would get, like Test on the help desk's topic settings. Only the store's own topics are considered, and nothing in the store is created or changed (AGENT mode keeps Redo's internal log of the model call, as the help desk's test does). Each call is a paid model call: in AGENT mode the classifier gives up after 5 seconds, and in EMBEDDING mode the embedding can take up to 20 seconds. It costs 50 points and draws on a separate topic test quota of 30 calls per store, refilling at about 300 an hour; past it, THROTTLED. A test that can't run is null with its error and gives back its quota and points: THROTTLED (429), or TRY_AGAIN (503) when the classifier is unavailable. Other aliases in the request still resolve and are in the response body, but the response takes the highest status among its errors, so read the body on a 429 or 503 rather than discard it.

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

## Arguments

**text** `String!` *required*

The sample message. Surrounding spaces are trimmed. Blank, or longer than 6,000 characters, fails with BAD\_USER\_INPUT.

## Returns

**supportTopicMatches** `[SupportTopicMatches](/docs/api-reference/v3/reference/support/support-topic-matches)`

Which of the store's topics a sample message would get, from the classifier the store uses for tickets.

**fields**

**matches** `[\[SupportTopicMatch!\]!](/docs/api-reference/v3/reference/support/support-topic-match)` *required*

In AGENT mode, every topic that matched, possibly none; a classifier call that fails or times out also matches none, as on the help desk. In EMBEDDING mode, the single closest topic, matched or not, so a near miss shows. Empty when the store has no topics.

**fields**

**distance** `Float`

In EMBEDDING mode, how far the sample is from the topic: smaller is closer, and below the match threshold it matches. Null in AGENT mode.

**matched** `Boolean!` *required*

Whether a ticket with this text would get the topic. Always true in AGENT mode.

**topic** `[SupportTopic](/docs/api-reference/v3/reference/support/support-topic)`

The topic. Null if it was deleted since the test ran.

**fields**

**description** `String!` *required*

What the topic covers. The classifier matches tickets against the name and this text.

**id** `ID!` *required*

The id of this topic.

**name** `String!` *required*

Topic name, unique within the store.

**mode** `[SupportTopicClassifierMode!](/docs/api-reference/v3/reference/support/support-topic-classifier-mode)` *required*

The classifier that ran, the store's current mode.

**text** `String!` *required*

The sample as classified, with surrounding spaces trimmed.

## Example

```graphql theme={null}
query {
  supportTopicMatches(text: "...") {
    mode
    text
  }
}
```


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