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

# knowledgeSuggestion

> Fetch one knowledge suggestion by its id. Null when this store has no such suggestion.

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

## Arguments

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

The suggestion's `id`.

## Returns

**knowledgeSuggestion** `[KnowledgeSuggestion](/docs/api-reference/v3/reference/commerce-agent/knowledge-suggestion)`

Knowledge Commerce Agent proposes from resolved support tickets, for the merchant to add or dismiss. Commerce Agent never uses a suggestion itself, only the article an accepted one became.

**fields**

**acceptedArticle** `[KnowledgeArticle](/docs/api-reference/v3/reference/commerce-agent/knowledge-article)`

The knowledge article it became. Null unless ACCEPTED, or once that article is deleted.

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

**fields**

**changes** `[KnowledgeArticleChangeConnection!](/docs/api-reference/v3/pagination)` *required*

Every change to this article and who made it, newest first, including staged drafts and removals.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns changes after it.

**before** `String`

Backward pagination cursor — returns changes before it.

**first** `Int`

Forward pagination: returns the first N changes (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N changes (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[KnowledgeArticleChangeEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[KnowledgeArticleChange!\]!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-change)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**content** `String!` *required*

The live article body as authored.

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

When the article was created.

**draft** `[KnowledgeArticleDraft](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-draft)`

Changes staged by the API and not yet published. Null when nothing is staged. Reading it needs a token with `commerce_agent_knowledge_read`.

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

**fields**

**content** `String!` *required*

The body the article gets on publish.

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

When the draft was first staged.

**deletesArticle** `Boolean!` *required*

True when publishing removes the article. The other fields then repeat the article as it was when the removal was staged.

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

When the article stops being retrievable after publish. Null means no end.

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

When the article becomes retrievable after publish, if `status` is ACTIVE. Null means immediately.

**referencedArticleIds** `[ID!]!` *required*

The ids of the knowledge articles the article cites after publish, as accepted by `referencedArticleIds` on the write inputs.

**referencedProductFamilyIds** `[ID!]!` *required*

The ids of the product families the article cites after publish, as accepted by `referencedProductFamilyIds` on the write inputs.

**revision** `String!` *required*

Identifies this draft's content. Pass it as `expectedRevision` to `knowledgeArticlePublish`; it changes whenever the draft does.

**status** `[KnowledgeArticleStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status)` *required*

The status the article gets on publish.

**title** `String!` *required*

The title the article gets on publish.

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

When the draft was last changed.

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

When the live article stops being retrievable. Null means no end.

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

When the live article becomes retrievable, if `status` is ACTIVE. Null means immediately.

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

The id of this knowledge article.

**origin** `[KnowledgeArticleOrigin!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-origin)` *required*

How this article was created. Immutable after create.

**productFamilies** `[ProductFamilyConnection!](/docs/api-reference/v3/pagination)` *required*

Product families this article cites.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[ProductFamilyEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[ProductFamily!\]!](/docs/api-reference/v3/reference/catalog/product-family)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**referencedArticles** `[KnowledgeArticleConnection!](/docs/api-reference/v3/pagination)` *required*

Other knowledge articles this article cites.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[KnowledgeArticleEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[KnowledgeArticle!\]!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**status** `[KnowledgeArticleStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status)` *required*

Whether Commerce Agent may retrieve this live article. Combine with the effective window.

**title** `String!` *required*

The live merchant-facing title of the article.

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

When the live article body was last edited.

**usageCount** `Int!` *required*

How many messages Commerce Agent used this article in. Unsent draft replies don't count. This is the number the merchant app's Knowledge page shows as Uses.

**whenToUse** `String!` *required*

The text Commerce Agent matches a shopper's question against to pick this article. It is generated from the live title and content, so it is read-only. A new article starts with its title. After an edit, the previous text stays until it is regenerated.

**content** `String!` *required*

The proposed body. When `needsMerchantAnswer` is true it is the shoppers' question, not an answer.

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

When it was suggested.

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

The id of this suggestion.

**needsMerchantAnswer** `Boolean!` *required*

Whether no one has answered it yet: accepting it then needs `content` with the answer.

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

When it was added or dismissed. Null while pending.

**sourceCount** `Int!` *required*

How many support tickets this suggestion was drawn from, as the Suggestions tab's Cited by column counts them. Deleted tickets aren't counted.

**sources** `[SupportTicketConnection!](/docs/api-reference/v3/pagination)` *required*

The support tickets this suggestion was drawn from, oldest first, as the Suggestions tab's Cited by list shows them. Tickets the help desk doesn't show are left out.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tickets after it.

**before** `String`

Backward pagination cursor — returns tickets before it.

**first** `Int`

Forward pagination: returns the first N tickets (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tickets (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[SupportTicketEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[SupportTicket!](/docs/api-reference/v3/reference/support/support-ticket)` *required*

The item at this edge.

**nodes** `[\[SupportTicket!\]!](/docs/api-reference/v3/reference/support/support-ticket)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**aiDraftReplies** `[SupportAiDraftReplyConnection!](/docs/api-reference/v3/pagination)` *required*

The AI drafts waiting for review on the ticket, oldest first: the suggestions the help desk composer shows, at most one per message they answer. Decided drafts leave the list. Drafts of tickets merged into this one stay on those tickets, as their messages do.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns AI drafts after it.

**before** `String`

Backward pagination cursor — returns AI drafts before it.

**first** `Int`

Forward pagination: returns the first N AI drafts (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N AI drafts (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**assignee** `[TeamMember](/docs/api-reference/v3/reference/common/team-member)`

The team member the ticket is assigned to. Null unless `assigneeType` is TEAM\_MEMBER, and null when they've left the team.

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

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

What kind of assignee the ticket has. Null when unassigned.

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

Every channel the ticket's threads are on, each once, in no set order. Detached threads are left out, as in `threads`.

**closureReason** `[SupportTicketClosureReason](/docs/api-reference/v3/reference/support/support-ticket-closure-reason)`

Why the ticket was closed. Null unless `status` is CLOSED.

**composerDrafts** `[\[SupportComposerDraft!\]!](/docs/api-reference/v3/reference/support/support-composer-draft)` *required*

The unsent replies in the help desk composer on the ticket's threads, every teammate's, as the composer shows them (one per email a thread answers), including those on threads of tickets merged into it. Like the help desk, which shows drafts to team members who can reply, it needs support\_messages\_send. A request reads drafts for up to 100 tickets at a time, for 10 points each time.

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

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

When the ticket was created.

**customer** `[Customer](/docs/api-reference/v3/reference/customers/customer)`

The customer the ticket is with: the primary contact on its most recently added thread that has one. Detached and deleted threads are left out, as in `threads`. Null when no thread has one.

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

**customerSentiment** `[SupportTicketCustomerSentiment](/docs/api-reference/v3/reference/support/support-ticket-customer-sentiment)`

How the customer seems to feel, from the AI's read of the ticket. Null until it has one.

**draftPreview** `String`

The text of the team's most recently edited unsent reply, on any of the ticket's threads. Null when there's no draft.

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

The id of this ticket.

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

When the customer last wrote. Null if they haven't written yet.

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

When the team, the AI agent or an automation last wrote to the customer. Null if none has.

**lastMessage** `[Message](/docs/api-reference/v3/reference/support/message)`

The ticket's newest message with text, internal notes included. It skips the messages the ticket's `messages` list leaves out. Null when it has none.

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

**mergedInto** `[SupportTicket](/docs/api-reference/v3/reference/support/support-ticket)`

The ticket this one was merged into. Null unless it was merged, which also closes it as DUPLICATE.

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

**mergedTickets** `[SupportTicketConnection!](/docs/api-reference/v3/pagination)` *required*

The tickets merged directly into this one, oldest first.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tickets after it.

**before** `String`

Backward pagination cursor — returns tickets before it.

**first** `Int`

Forward pagination: returns the first N tickets (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tickets (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**messages** `[MessageConnection!](/docs/api-reference/v3/pagination)` *required*

The ticket's messages, oldest first, internal notes included. Messages of tickets merged into it stay on those tickets. A thread can hold messages from other tickets, which this leaves out; `thread.messages` has them all.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns messages after it.

**before** `String`

Backward pagination cursor — returns messages before it.

**first** `Int`

Forward pagination: returns the first N messages (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N messages (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**priority** `[SupportTicketPriority!](/docs/api-reference/v3/reference/support/support-ticket-priority)` *required*

How urgent the ticket is.

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

When the team last read the ticket. Null if no one has opened it.

**replies** `[SupportReplyConnection!](/docs/api-reference/v3/pagination)` *required*

Replies sent or scheduled on this ticket through supportTicketReply, oldest first. Lists the API's replies only, not what teammates send or schedule in the help desk. Pass status: \[SCHEDULED] for what is still to go.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns replies after it.

**before** `String`

Backward pagination cursor — returns replies before it.

**first** `Int`

Forward pagination: returns the first N replies (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N replies (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**status** `[\[SupportReplyStatus!\]](/docs/api-reference/v3/reference/support/support-reply-status)`

Only replies with one of these statuses.

**senderBlocked** `Boolean`

Whether the ticket's sender is on the store's blocked-sender list (`SupportBlockedSendersSettings.blockedEmails`), as the help desk shows it, whether or not the rule that archives their email is on. The sender is the customer the help desk uses for the ticket: the primary contact on its most recently linked thread, detached and deleted threads included, so it can differ from `customer`, which leaves those out. Their email is matched ignoring case and surrounding spaces. False when no thread has a primary contact or the contact has no email. Null, with an error, when the customer can't be looked up. A request checks its tickets 100 at a time, for 10 points each time.

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

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

When the ticket reopens on its own. Null unless `status` is SNOOZED.

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

Where the ticket is in its lifecycle.

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

When `status` last changed.

**summary** `String`

The AI's summary of the ticket. Null until one has been written.

**tags** `[SupportTagConnection!](/docs/api-reference/v3/pagination)` *required*

The tags on the ticket, ordered by name.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns tags after it.

**before** `String`

Backward pagination cursor — returns tags before it.

**first** `Int`

Forward pagination: returns the first N tags (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N tags (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**threads** `[MessageThreadConnection!](/docs/api-reference/v3/pagination)` *required*

The threads the ticket's conversation is on, oldest first.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns threads after it.

**before** `String`

Backward pagination cursor — returns threads before it.

**first** `Int`

Forward pagination: returns the first N threads (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N threads (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**ticketNumber** `Int`

The ticket number the help desk shows, unique within the store. Null for some older tickets.

**timeline** `[SupportTicketEventConnection!](/docs/api-reference/v3/pagination)` *required*

What happened on the ticket, oldest first.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns events after it.

**before** `String`

Backward pagination cursor — returns events before it.

**first** `Int`

Forward pagination: returns the first N events (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N events (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**topics** `[\[SupportTopic!\]!](/docs/api-reference/v3/reference/support/support-topic)` *required*

The store's topics the classifier matched to the ticket, ordered by name. The classifier matches at most 10. It lists the classifier's last result, which the help desk's topic rules also read, so it can lag the newest messages until the ticket is classified again. A topic deleted since is left out, and a ticket the classifier hasn't matched has none. Costs a flat 5 points per ticket plus the topic fields selected, however many topics it has.

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

**unread** `Boolean!` *required*

Whether the customer wrote after the team last read the ticket. False when the customer hasn't written.

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

When the ticket last changed.

**viewers** `[\[SupportTicketViewer!\]](/docs/api-reference/v3/reference/support/support-ticket-viewer)`

The team members the help desk shows viewing the ticket now, as the avatars on an open ticket do, so an integration can avoid acting on a ticket a teammate is working. A teammate shows while they have the ticket open in the help desk, including while typing, and usually leaves when they close it or their help desk connection ends; after an outage a viewer can linger until their next connection ends. Those typing come first, then the rest, each in team member id order. Empty when no one is viewing. Null, with an error, when presence can't be read. Tickets read together in one list are read 100 at a time, for 10 points each read; a ticket read on its own, such as each `node` alias, is a read of its own.

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

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**status** `[KnowledgeSuggestionStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-suggestion-status)` *required*

Where it stands in review.

**title** `String!` *required*

The proposed title.

## Example

```graphql theme={null}
query {
  knowledgeSuggestion(id: "...") {
    content
    createdAt
    id
    needsMerchantAnswer
    reviewedAt
    sourceCount
    sources {
      nodes {
        assigneeType
        channels
        closureReason
        createdAt
        customerSentiment
        draftPreview
        id
        lastCustomerMessageAt
        # ...
      }
      pageInfo { hasNextPage endCursor }
    }
    status
    # ...
  }
}
```


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