Tags: Auto-Tag, Orders, Out of Stock
This task watches for newly-created orders, and checks each line item for that variant's total inventory quantity. If any are found with an inventory level of 0 or less, the task will add the tag of your choice to the order – and, optionally, will add a tag to the customer and to each product related to an out-of-stock line item.
- View in the task library: tasks.mechanic.dev/auto-tag-orders-that-contain-an-out-of-stock-item
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"apply_this_order_tag__required": "",
"apply_this_customer_tag": null,
"apply_this_product_tag_for_each_out_of_stock_line_item": null
}
Learn about task options in Mechanic
shopify/orders/create
Learn about event subscriptions in Mechanic
This task watches for newly-created orders, and checks each line item for that variant's total inventory quantity. If any are found with an inventory level of 0 or less, the task will add the tag of your choice to the order – and, optionally, will add a tag to the customer and to each product related to an out-of-stock line item.
Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!