[ { "label": "Tag products with the \"pre purchase\" tag if any of the variants has stock below zero", "trigger_type": [ "product_created", "product_updated" ], "object_type": "product", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "product.variants.inventory_quantity", "settings": { "multiple": "any", "operator": "lt", "value": "0", "token_object_type": "product", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "product_sync_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "pre purchase", "token_object_type": "product" }, "weight": 999, "target_key": "product" } } } }, "shared_workflow_id": 45180 }, "description": "This automation is fired every time a product is created or updated. It checks to see if any of the variants are out of stock, adds the \"pre-purchase\" tag, and removes it once all variants are restocked. " } ]