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

# commerceAgentGuidanceHealth

> Problems in one piece of Commerce Agent guidance as you are about to save it, each with what is wrong and often a fix. Check text before `commerceAgentConfigDraftUpdate`, a strategy update or a knowledge article update, so a problem is fixed before the agent reads it. A guideline or escalation rule is compared with the draft's other ones, and tone and capability guidance with the draft's guidelines. A strategy's guidance and a knowledge article go live when saved, so they are compared with the published guidelines and tone. It waits for the review, up to about a minute: `complete` is false when the review couldn't finish, so ask again. Warnings never block a save. Null when the store has no Commerce Agent account, or no strategy, article or position in it has the `id`.

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

## Arguments

**id** `ID`

Which one it replaces, as `kind` describes. Omit for a new guideline, escalation rule or strategy, and for tone.

**kind** `[CommerceAgentGuidanceKind!](/docs/api-reference/v3/reference/commerce-agent/commerce-agent-guidance-kind)` *required*

What the text is.

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

The text as you are about to save it.

## Returns

**commerceAgentGuidanceHealth** `[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 {
  commerceAgentGuidanceHealth(id: "...", kind: CAPABILITY_GUIDANCE, text: "...") {
    complete
  }
}
```


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