Skip to main content
Anchor to CollectionRuleColumn

CollectionRuleColumn

enum

Specifies the attribute of a product being used to populate the smart collection.

An attribute evaluated based on the compare_at_price attribute of the product's variants. With is_set relation, the rule matches products with at least one variant with compare_at_price set. With is_not_set relation, the rule matches matches products with at least one variant with compare_at_price not set.

This rule type is designed to dynamically include products in a smart collection based on their category id. When a specific product category is set as a condition, this rule will match products that are directly assigned to the specified category.

Anchor to PRODUCT_CATEGORY_ID_WITH_DESCENDANTSPRODUCT_CATEGORY_ID_WITH_DESCENDANTS

This rule type is designed to dynamically include products in a smart collection based on their category id. When a specific product category is set as a condition, this rule will not only match products that are directly assigned to the specified category but also include any products categorized under any descendant of that category.

Anchor to PRODUCT_METAFIELD_DEFINITIONPRODUCT_METAFIELD_DEFINITION

This category includes metafield definitions that have the useAsCollectionCondition flag set to true.

Anchor to PRODUCT_TAXONOMY_NODE_IDPRODUCT_TAXONOMY_NODE_ID

The product_taxonomy_node_id attribute.

The tag attribute.

The title attribute.

The type attribute.

Anchor to VARIANT_COMPARE_AT_PRICEVARIANT_COMPARE_AT_PRICE

The variant_compare_at_price attribute.

The variant_inventory attribute.

Anchor to VARIANT_METAFIELD_DEFINITIONVARIANT_METAFIELD_DEFINITION

This category includes metafield definitions that have the useAsCollectionCondition flag set to true.

The variant_price attribute.

The variant_title attribute.

The variant_weight attribute.

The vendor attribute.


Was this section helpful?

•OBJECT

Represents at rule that's used to assign products to a collection.

•OBJECT

Defines the available columns and relationships that can be used when creating rules for smart collections. This provides the schema for building automated collection logic based on product attributes.

For example, merchants can create rules like "product type equals 'Shirts'" or "vendor contains 'Nike'" using the conditions defined in this object to automatically populate collections.

Use CollectionRuleConditions to:

  • Discovering valid field options for smart collection rule interfaces
  • Understanding which conditions are available for automated collections
  • Exploring available product attributes for collection automation
  • Learning about proper field relationships for rule implementation

The conditions define which product fields can be used in smart collection rules and what types of comparisons are allowed for each field.

Learn more about smart collections.

•INPUT OBJECT

The input fields for a rule to associate with a collection.


Was this section helpful?