---
title: "collectionRulesConditions"
description: "List all the rules available for creating a smart collection."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/collection-rules-conditions'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/queries/collection-rules-conditions.md'
---
# collectionRulesConditions

List all the rules available for creating a smart collection.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Query

## Type Signature

`[CollectionRuleConditions]`

## Returns

* `allowedRelations`

  [[CollectionRuleRelation!]](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/enums/collection-rule-relation.md)

  Allowed relations of the rule.

* `defaultRelation`

  [CollectionRuleRelation!](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/enums/collection-rule-relation.md)

  Most commonly used relation for this rule.

* `ruleType`

  [CollectionRuleColumn!](https://developer.shopline.com/docs/admin-graph-ql-api/products-and-collections/enums/collection-rule-column.md)

  Type of the rule.

## Code Example

```graphql
 {
	collectionRulesConditions() 
		 {
			# CollectionRuleConditions fields
		}
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

