我们在CollectionRuleColumn中新增了一列PRODUCT_CATEGORY_ID_WITH_DESCENDANTS,该字段用于自动化收集(used for automated collections),并允许您基于新的分类树创建智能集合。
此规则类型根据产品在其更新的标准产品分类体系中定义的产品类别,动态地将产品包含在智能集合中。当将特定产品类别设置为条件时,此规则将匹配直接分配给指定类别的产品,并包含其所有后代类别下的产品。
要使用新的PRODUCT_CATEGORY_ID_WITH_DESCENDANTS创建智能集合,请按照以下步骤操作:
mutation CollectionCreate($input: CollectionInput!) { collectionCreate(input: $input) { userErrors { field message } collection { id title descriptionHtml handle sortOrder ruleSet { appliedDisjunctively rules { column relation condition } } } } } { "input": { "title": "Our entire shoe collection", "descriptionHtml": "View every shoe available in our store.", "ruleSet": { "appliedDisjunctively": false, "rules": { "column": "PRODUCT_CATEGORY_ID_WITH_DESCENDANTS", "relation": "EQUALS", "condition": "gid://shopify/TaxonomyCategory/aa-5" } } } }了解有关在 collectionCreate中的集合创建的更多信息。

