[ { "version": 1, "label": "Send backorder notification to customer when a product is out of stock", "trigger_type": [ "order_paid" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": [ { "field": "order.line_items.variant.inventory_quantity", "settings": { "multiple": "any", "operator": "lte", "value": "0", "condition_type": "AND" }, "weight": 999 } ], "actions": [ { "type": "email", "settings": { "token_object_type": "order", "to": "{{ order.email }}", "cc": "", "bcc": "", "reply_to": "", "subject": "MotoUsher Order ORD{{ order.order_number }} - Backordered Items ", "plain_text": "0", "body": "Hi {{order.customer.first_name}},\r\nThanks for your order! We appreciate it very much. \r\n\r\n

Some items in your order were backordered when you ordered and we thought we should keep you posted incase you missed that. We will ship them as soon as they are here! <\/p>\r\n\r\n

\r\n{% for line_item in order.line_items %}\r\n{% if line_item.variant.inventory_quantity <= 0 %}\r\n{{ product_link(line_item.product) }} is backordered.
\r\n{% endif %}\r\n{% endfor %}<\/p>\r\n\r\n\r\n", "wait": "0", "cw_timezone": "Africa\/Nairobi", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "order" } ] } ] }, "description": "This automation is fired when an order is paid. It checks for any product from the ordered items that might be out of stock and sends out a back-order email notification to the customer, letting them know that the item is out of stock." } ]