[ { "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": "Items in your order are backordered", "plain_text": "0", "body": "Some items in your order are backordered.
\r\n\r\n{% for line_item in order.line_items %}\r\n{% if line_item.variant.inventory_quantity <= 0 %}\r\n{{ line_item.name }} is backordered. View in store: {{ product_link(line_item.product) }}
\r\n{% endif %}\r\n{% endfor %}\r\n", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "order" } ] } ], "shared_workflow_id": 1255 }, "description": "This workflow checks if all items in an order are available. If any items in the order are not currently in your store's inventory, an email will be sent to the customer with details about the out-of-stock item. " } ]