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

# commerceAgentHealth

> Problems in one version of the Commerce Agent's guidelines, escalation rules, strategies, tone, capability guidance and knowledge articles, each with what is wrong and often a fix. Read `DRAFT` to check staged changes before publishing them, and `PUBLISHED` for what the agent uses now. It answers at once from earlier reviews and reviews whatever changed in the background: while `complete` is false, ask again. Warnings never block a publish. Knowledge articles are reviewed once a day, and only once published, so a new or edited article's warnings come later. Null when the store has no Commerce Agent account.

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

## Arguments

**version** `[CommerceAgentConfigVersion!](/docs/api-reference/v3/reference/commerce-agent/commerce-agent-config-version)` *required*

Which version to check.

## Returns

**commerceAgentHealth** `[CommerceAgentHealth](/docs/api-reference/v3/reference/commerce-agent/commerce-agent-health)`

The warnings in one version of the Commerce Agent.

**fields**

**complete** `Boolean!` *required*

False while changed settings are still being reviewed, or a review couldn't finish; their warnings are missing until then. Ask again in a minute.

**warnings** `[\[CommerceAgentHealthWarning!\]!](/docs/api-reference/v3/reference/commerce-agent/commerce-agent-health-warning)` *required*

Every warning; empty when there is nothing to fix.

**fields**

**capability** `[CommerceAgentCapability](/docs/api-reference/v3/reference/commerce-agent/commerce-agent-capability)`

For CAPABILITY\_GUIDANCE: the capability whose guidance has the problem. Null otherwise.

**excerpt** `String`

The sentence holding `quote`, or the opening of an article, so the warning reads in context.

**kind** `[CommerceAgentHealthWarningKind!](/docs/api-reference/v3/reference/commerce-agent/commerce-agent-health-warning-kind)` *required*

What the warning is about.

**knowledgeArticleId** `ID`

For KNOWLEDGE\_ARTICLE: the `KnowledgeArticle` id. Null otherwise.

**message** `String!` *required*

What is wrong.

**position** `Int`

For GUIDELINE and ESCALATION\_RULE: the 0-based position in `guidelines` or `escalationGuidelines` of the same version of `commerceAgentConfig`. Null otherwise.

**quote** `String`

The exact text with the problem. Null when the problem is the whole piece.

**replacement** `String`

Text to put in place of `quote` to fix it. Null when there is no suggestion.

**strategyId** `ID`

For STRATEGY\_GUIDANCE: the `CommerceAgentStrategy` id. Null otherwise.

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

The name of what has the problem: a guideline's or rule's text, a strategy's name or an article's title.

## Example

```graphql theme={null}
query {
  commerceAgentHealth(version: DRAFT) {
    complete
  }
}
```


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