[ { "label": "Tag products as on sale when the price is cheaper than the compare price", "trigger_type": [ "product_custom" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": { "2": { "field": "product.tags_array", "settings": { "multiple": "none", "operator": "equals", "value": "On Sale", "long_value": "", "token_object_type": "product", "condition_type": "AND" }, "weight": 10 }, "1": { "field": "product.variants.price_vs_compare", "settings": { "multiple": "any", "operator": "any", "value": { "lt": "lt", "equals": 0, "gt": 0 }, "condition_type": "AND" }, "weight": 20 } }, "actions": [ { "type": "product_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "On Sale", "token_object_type": "product" }, "weight": 30, "target_key": "product" } ] }, { "conditions": { "1": { "field": "product.variants.price_vs_compare", "settings": { "multiple": "none", "operator": "any", "value": { "lt": "lt", "equals": 0, "gt": 0 }, "condition_type": "AND" }, "weight": 999 }, "2": { "field": "product.tags_array", "settings": { "multiple": "any", "operator": "equals", "value": "On Sale", "long_value": "", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 } }, "actions": [ { "type": "product_remove_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "On Sale", "token_object_type": "product" }, "weight": 50, "target_key": "product" } ] } ], "shared_workflow_id": 37779 }, "description": "This automation will add the On Sale tag every time the price of any variant is reduced below the compare_at_price. The workflow will also remove the tag once the price down is reverted." } ]