Tags: Auto-Update, Products, Tag, Watch
This task manages your published product catalog, checking for the presence of a "preorder" tag, or a tag that starts with "preorder_" (like "preorder_summer"). If this tag is found, the task updates the product to allow customers to purchase the product after it's out of stock. If no preorder tag is found, the task makes sure customers cannot purchase the product if it's out of stock.
- View in the task library: tasks.mechanic.dev/auto-update-inventory-policy-based-on-a-preorder-tag
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
mechanic/scheduler/daily
mechanic/user/trigger
Learn about event subscriptions in Mechanic
This task manages your published product catalog, checking for the presence of a "preorder" tag, or a tag that starts with "preorder_" (like "preorder_summer"). If this tag is found, the task updates the product to allow customers to purchase the product after it's out of stock. If no preorder tag is found, the task makes sure customers cannot purchase the product if it's out of stock.
This task scans your product catalog nightly or when you hit the "Run task" button, checking for the presence of a "preorder" tag, or a tag that starts with "preorder_" (like "preorder_summer"). If this tag is found, the task updates the product to allow customers to purchase the product after it's out of stock. If no preorder tag is found, the task makes sure customers cannot purchase the product if it's out of stock.
Notes:
-
For efficiency, this task only scans published products in your catalog.
-
This task supports four event topics:
- Use
mechanic/scheduler/daily
for a daily scan, at midnight. - Use
mechanic/user/trigger
to run the task on-demand, with the push of a button. - Use
shopify/products/create
to run the task for each product as it's created. - Use
shopify/products/update
to run the task for each product as it's updated.
Out of the box, the task comes configured with
mechanic/scheduler/daily
andmechanic/user/trigger
. Use the "Subscriptions" setting (under "Show Advanced", in the task editor) to swap out subscriptions as needed. - Use
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!