CollectionRule object
Represents at rule that’s used to assign products to a collection.
Required access
read_products access scope.
On this page
Fields
- column (
[CollectionRuleColumn!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collectionrulecolumn))
The attribute that the rule focuses on (for example,titleorproduct_type). - condition (
[String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
The value that the operator is applied to (for example,Hats). - relation (
[CollectionRuleRelation!](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collectionrulerelation))
The type of operator that the rule is based on (for example,equals,contains, ornot_equals).
Types that return CollectionRule
[CollectionRuleSet.rules](https://shopify.dev/docs/admin-api/graphql/reference/products-and-collections/collectionruleset#rules-2021-01)
