[ { "label": "Tag a draft order if any items are out of stock", "trigger_type": [ "draft_order_created" ], "object_type": "draft_order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "draft_order.line_items.variant.inventory_quantity", "settings": { "multiple": "any", "operator": "lte", "value": "0", "token_object_type": "draft_order", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "order_add_tags", "settings": { "token_object_type": "draft_order", "tags": "out of stock", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "" }, "weight": 999, "target_key": "draft_order" } } } }, "shared_workflow_id": 75401 }, "description": "This automation is fired when a draft order is created. It checks to see if any of the items are out of stock, and tags the draft order with the tag \"out of stock\"." } ]