[ { "label": "Tag products as on sale when the price is cheaper than the compare price", "trigger_type": [ "product_created", "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": [ { "field": "product.variants.price", "settings": { "multiple": "any", "operator": "lte", "value": "{{ product_variant.compare_at_price }}", "condition_type": "AND" }, "weight": 999 } ], "actions": [ { "type": "product_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "On Sale" }, "weight": 999, "target_key": "product" } ] }, { "conditions": [ { "field": "product.variants.price", "settings": { "multiple": "all", "operator": "gte", "value": "{{ product_variant.compare_at_price }}", "token_browser": "{{ Browse Tokens }}", "condition_type": "AND" }, "weight": 999 } ], "actions": [ { "type": "product_remove_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "On Sale" }, "weight": 999, "target_key": "product" } ] } ], "shared_workflow_id": 1604 }, "description": "This workflow is fired every time a product is updated. It checks across all the variants and if any of the variants have a price lower than the compare price, it tags the product with the tag 'on sale'. Once the price goes down is reverted, it removes the tag. " } ]