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

# supportRules

> List the rules the store created. The built-in rules are supportDefaultRules.

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

## Arguments

**after** `String`

Forward pagination cursor — returns rules after it.

**before** `String`

Backward pagination cursor — returns rules before it.

**first** `Int`

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

**last** `Int`

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

**orderBy** `[SupportRuleSortKey](/docs/api-reference/v3/reference/support/support-rule-sort-key)`

Which key to sort by. POSITION is run order and NAME is A to Z; `reverse` flips either.

**query** `String`

Only rules whose name or description contains this text, case-insensitive.

**reverse** `Boolean`

Reverses the direction `orderBy` sorts in.

## Returns

**supportRules** `[SupportRuleConnection!](/docs/api-reference/v3/pagination)` *required*

A paginated list of SupportRule items.

**fields**

**edges** `[\[SupportRuleEdge!\]!](/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** `[SupportRule!](/docs/api-reference/v3/reference/support/support-rule)` *required*

The item at this edge.

**fields**

**actions** `[\[SupportRuleAction!\]](/docs/api-reference/v3/reference/support/support-rule-action)`

What the rule does, in order. A kind the API doesn't take yet, such as a reply, has a null `kind`. Null for a rule that isn't LINEAR, whose steps the API doesn't read.

**conditionMatch** `[SupportRuleConditionMatch](/docs/api-reference/v3/reference/support/support-rule-condition-match)`

Which of `conditions` must pass for `actions` to run; ALL when there are none. Null for a rule that isn't LINEAR.

**conditions** `[\[SupportRuleCondition!\]](/docs/api-reference/v3/reference/support/support-rule-condition)`

What a ticket must match for the actions to run; none runs them every time the trigger fires. A kind the API doesn't take yet has a null `kind`. Null for a rule that isn't LINEAR, whose steps the API doesn't read.

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

The rule's description; empty when it has none.

**enabled** `Boolean!` *required*

Whether the rule runs when its trigger fires.

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

The id of this rule.

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

The rule's name.

**position** `Int!` *required*

Where the rule runs among the store's rules and the built-in rules, which share this sequence (`SupportDefaultRule.position`): lower runs first, and at the same position a built-in rule runs first. Change it with supportRulesReorder.

**shape** `[SupportRuleShape!](/docs/api-reference/v3/reference/support/support-rule-shape)` *required*

Whether the rule is one set of conditions and one list of actions, which `conditions` and `actions` show, a graph of steps the Rules page built, with branches or waits, or steps that no longer load.

**trigger** `[SupportRuleTrigger](/docs/api-reference/v3/reference/support/support-rule-trigger)`

What makes the rule run. Null for a rule on a trigger about a team member rather than a ticket, or with steps that don't hold one.

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

When the rule last changed. Null for a rule never saved with the time.

**warnings** `[\[SupportRuleWarning!\]](/docs/api-reference/v3/reference/support/support-rule-warning)`

What enabling the rule risks: closing or replying to every ticket that triggers it, or fighting with teammates. Empty when none applies, and null for a rule that isn't LINEAR, whose risks the API doesn't work out; read it with `conditions` and supportRuleOverlapWarnings before you enable the rule.

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

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

**fields**

**actions** `[\[SupportRuleAction!\]](/docs/api-reference/v3/reference/support/support-rule-action)`

What the rule does, in order. A kind the API doesn't take yet, such as a reply, has a null `kind`. Null for a rule that isn't LINEAR, whose steps the API doesn't read.

**fields**

**config** `[JSON](/docs/api-reference/v3/reference/common/json)`

The kind's settings. Their shape is the `configJsonSchema` of this kind and version in supportRuleKinds. Null for a kind the API doesn't take yet, such as a reply or a nested group made on the Rules page; the page shows it.

**kind** `String`

The kind, as supportRuleKinds lists it. Null for a kind the API doesn't take yet, such as a reply or a nested group made on the Rules page; the page shows it.

**kindVersion** `Int`

The version of the kind the config is written for. Null for a kind the API doesn't take yet, such as a reply or a nested group made on the Rules page; the page shows it.

**conditionMatch** `[SupportRuleConditionMatch](/docs/api-reference/v3/reference/support/support-rule-condition-match)`

Which of `conditions` must pass for `actions` to run; ALL when there are none. Null for a rule that isn't LINEAR.

**conditions** `[\[SupportRuleCondition!\]](/docs/api-reference/v3/reference/support/support-rule-condition)`

What a ticket must match for the actions to run; none runs them every time the trigger fires. A kind the API doesn't take yet has a null `kind`. Null for a rule that isn't LINEAR, whose steps the API doesn't read.

**fields**

**config** `[JSON](/docs/api-reference/v3/reference/common/json)`

The kind's settings. Their shape is the `configJsonSchema` of this kind and version in supportRuleKinds. Null for a kind the API doesn't take yet, such as a reply or a nested group made on the Rules page; the page shows it.

**kind** `String`

The kind, as supportRuleKinds lists it. Null for a kind the API doesn't take yet, such as a reply or a nested group made on the Rules page; the page shows it.

**kindVersion** `Int`

The version of the kind the config is written for. Null for a kind the API doesn't take yet, such as a reply or a nested group made on the Rules page; the page shows it.

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

The rule's description; empty when it has none.

**enabled** `Boolean!` *required*

Whether the rule runs when its trigger fires.

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

The id of this rule.

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

The rule's name.

**position** `Int!` *required*

Where the rule runs among the store's rules and the built-in rules, which share this sequence (`SupportDefaultRule.position`): lower runs first, and at the same position a built-in rule runs first. Change it with supportRulesReorder.

**shape** `[SupportRuleShape!](/docs/api-reference/v3/reference/support/support-rule-shape)` *required*

Whether the rule is one set of conditions and one list of actions, which `conditions` and `actions` show, a graph of steps the Rules page built, with branches or waits, or steps that no longer load.

**trigger** `[SupportRuleTrigger](/docs/api-reference/v3/reference/support/support-rule-trigger)`

What makes the rule run. Null for a rule on a trigger about a team member rather than a ticket, or with steps that don't hold one.

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

When the rule last changed. Null for a rule never saved with the time.

**warnings** `[\[SupportRuleWarning!\]](/docs/api-reference/v3/reference/support/support-rule-warning)`

What enabling the rule risks: closing or replying to every ticket that triggers it, or fighting with teammates. Empty when none applies, and null for a rule that isn't LINEAR, whose risks the API doesn't work out; read it with `conditions` and supportRuleOverlapWarnings before you enable the rule.

**fields**

**code** `[SupportRuleWarningCode!](/docs/api-reference/v3/reference/support/support-rule-warning-code)` *required*

Which risk it is; branch on this.

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

The warning in a sentence, for a person to read. Its wording can change.

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

## Example

```graphql theme={null}
query {
  supportRules(after: "...", before: "...", first: 10, last: 10, orderBy: NAME, query: "...", reverse: true) {
    nodes {
      conditionMatch
      description
      enabled
      id
      name
      position
      shape
      trigger
      # ...
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


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