Skip to content

Latest commit

 

History

History

auto-update-inventory-policy-based-on-a-preorder-tag

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Auto-update inventory policy based on a "preorder" tag

Tags: Auto-Update, Products, Tag, Watch

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.

Default options

{
  "run_on_product_create_and_update_instead_of_daily__boolean": false
}

Learn about task options in Mechanic

Subscriptions

{% if options.run_on_product_create_and_update_instead_of_daily__boolean %}
  shopify/products/create
  shopify/products/update
{% else %}
  mechanic/scheduler/daily
{% endif %}
mechanic/shopify/bulk_operation
mechanic/user/trigger

Learn about event subscriptions in Mechanic

Documentation

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.

Optionally, choose whether to "Run on product create and update instead of daily", which includes events such as product tagging, inventory level adjustments, and inventory policy changes.

Notes:

  • For efficiency, this task only scans published products in your catalog.

Installing this task

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.

Contributions

Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.

Task requests

Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!