--- title: Create smart collections automatically with PRODUCT_CATEGORY_ID_WITH_DESCENDANTS - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/introducing-productcategoryidwithdescendants-in-collectionrulecolumn-for-smart-collections md: https://shopify.dev/changelog/introducing-productcategoryidwithdescendants-in-collectionrulecolumn-for-smart-collections.md --- [Back to Developer changelog](https://shopify.dev/changelog) April 14, 2025 Tags: * Admin GraphQL API * 2025-07 # Create smart collections automatically with PRODUCT\_CATEGORY\_ID\_WITH\_DESCENDANTS We've introduced a new `PRODUCT_CATEGORY_ID_WITH_DESCENDANTS` column to the `CollectionRuleColumn`. This field is [used for automated collections](https://shopify.dev/docs/api/admin-graphql/unstable/enums/CollectionRuleColumn) and allows you to create smart collections based on a new category tree. This rule type dynamically includes products in a smart collection based on their product category, as defined in the [updated standard product taxonomy](https://github.com/Shopify/product-taxonomy/tree/main). When a specific product category is set as a condition, this rule will match products directly assigned to the specified category and include any products categorized under its descendants. To create a smart collection using the new `PRODUCT_CATEGORY_ID_WITH_DESCENDANTS`, follow this process: ``` 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" } } } } ``` Learn more about collection creation in [collectionCreate](https://shopify.dev/docs/api/admin-graphql/latest/mutations/collectionCreate).