Creating dynamic category rules in Magento 2 you make the process of product management easier. According to dynamic category rules your Magento 2 products will be added to the dynamic categories automatically according to certain conditions.

That will allow you to create automatic categories like Brands, Sale, Newly Added, Most Rated, etc. based on different product attributes.

In order to add new dynamic category rule in Magento 2 Dynamic Categories Extension take the following steps:

1. Navigate to Catalog > Dynamic Category > Rules.

Magento 2 Dynamic Category

2. Press the Add New Rule button to create a new dynamic category rule.

Magento 2 add new dynamic category rule

3. Enable Rule.

4. Set the Rule Name and add a Description if you want to, though this field is optional.

5. Indicate the Priority which defines how the rule should be processed. The higher the number the later the rule will be processed.

6. Select Categories Type - Static in case you have already created category in Magento and Pattern if you want to create categories automatically based on the product attribute pattern. 

New Dynamic Category Rule

7. Set the Category, you create this rule for and which you want to add products to.

8. Assign the rule to the Web Sites.

9. Choose what method to Apply the rule By

  • On Product Save — rule will be applied every time you save a product that fits the rule conditions.
  • Cron — rule will be applied once the cron runs and find products that fit the rule conditions. The cron runs once a day.
  • Manually — rule will be applied once you press the "Apply Rules" or " Save and Apply" buttons.

New Category for Magento

10. Enable the Remove Products from Other Categories in case you want products generated by the rule to be only in the dynamic category and removed from their original categories.

11. Enable Remove Other Products from Category if you want all previously added products to be removed and all new ones to be generated by the created rule.

12. Choose to Use Products from Catalog Price Rules.

Note: when you choose to use them, make sure catalog price rules are active and assigned to the guest customer group.

Magento 2 dynamic category products

13. Set the Product Conditions under which products will be automatically added to the chosen categories.

Note: if you don't see the attribute you want to use for dynamic category rule you need to add product attribute to the sales rules conditions.

Magento 2 Dynamic Category Rules Conditions.

Once you have finished you will be notified about the successful rule creation and see it in the category rules grid. However, you also need to press the Apply Rules button in order for the rule to be applied immediately, otherwise you'll need to wait some time for cron script to apply rules and update categories products.

Magento 2 apply dynamic category rules