[ { "label": "Tag customer and orders with alternating tags", "trigger_type": [ "order_created" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "order.customer.tags_array", "settings": { "multiple": "any", "operator": "equals", "value": "first time subscriber", "long_value": "", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "order.customer.tags_array", "settings": { "multiple": "none", "operator": "equals_one", "value": "", "long_value": "sticker\r\nnonsticker", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 }, "3": { "field": "order.twig_condition", "settings": { "title": "Check if order number ends with an even number", "value": "{% if (order.name|last|plus('+0')\/2)==0 %}\r\ntrue\r\n{% endif%}", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "customer_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "sticker", "token_object_type": "order" }, "weight": 999, "target_key": "order.customer" }, "2": { "type": "order_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "sticker", "token_object_type": "order" }, "weight": 1009, "target_key": "order" } } }, "4": { "conditions": { "1": { "field": "order.customer.tags_array", "settings": { "multiple": "any", "operator": "equals", "value": "first time subscriber", "long_value": "first time subscriber", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "order.customer.tags_array", "settings": { "multiple": "none", "operator": "equals_one", "value": "sticker", "long_value": "sticker\r\nnonsticker", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 }, "3": { "field": "order.twig_condition", "settings": { "title": "Check if the order number is odd", "value": "{% if (order.name|last|plus('+0')\/2)==1 %}\r\ntrue\r\n{% endif%}", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "customer_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "nonsticker", "token_object_type": "order" }, "weight": 999, "target_key": "order.customer" }, "2": { "type": "order_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "nonsticker", "token_object_type": "order" }, "weight": 1009, "target_key": "order" } } } }, "shared_workflow_id": 39989 }, "description": "This automation will tag a customer and the order with alternating tag everytime an order is created." } ]