Collect events that may impact the price of matched products Consider the following use cases for Catalog Rules (not whole list possibly): 1. Change in EAV attribute value for product 1 - Fetch all rules from PIM - Convert rule condition to sql-like PIM condition - Fetch products matched by condition from previous step + product_id = 1 from PIM - Results from PIM - 1,2 - do nothing - 1 - recalculate rule #1 for product #1 - 1,2,3 - recalculate rule #1,2,3 for product #1 2. Change price for product #1 - Fetch rule #1,2 from PIM - Apply discounts from rule #1,2 to base price 3. Change in rule Action for rule #1 - Fetch product prices from PIM for product #1,2,3 - Fetch all rule actions from PIM - Apply discounts from PIM to product prices from PIM 4. Change in rule Condition - Convert rule condition to sql-like PIM condition - Fetch all matched products from PIM using condition from previouse step - Compare with cache and find excluded and included products - Recalculate prices for products from previouse step
Collect events that may impact the price of matched products
Consider the following use cases for Catalog Rules (not whole list possibly):