Tags: Inventory, Products, Sync, Variants
Useful for multiple price points, or for offering customizations of the same item, this task lets you offer multiple variant listings for what is ultimately the same stock. A purchase of a particular variant results in the inventory for all other variants, for the same product, being lowered by the amount ordered.
- View in the task library: tasks.mechanic.dev/sync-inventory-across-product-variants
- Task JSON, for direct import: task.json
- Preview task code: script.liquid
{
"product_types_to_monitor__array_required": [
"Shirt"
]
}
Learn about task options in Mechanic
mechanic/user/trigger
mechanic/scheduler/10min
Learn about event subscriptions in Mechanic
Useful for multiple price points, or for offering customizations of the same item, this task lets you offer multiple variant listings for what is ultimately the same stock. A purchase of a particular variant results in the inventory for all other variants, for the same product, being lowered by the amount ordered.
- Populate the list of product types that you'd like this task to monitor.
- In the Shopify admin, navigate to the Products > Inventory area. Use the tools here to ensure that all products, for the types you care about, have the same "available" level for all of their variants.
- Back in Mechanic, click the "Run task" button. Mechanic will scan your products, and cache the current available inventory level for each one.
- Wait! :) Every ten minutes, Mechanic will check your inventory, and make any adjustments necessary to keep everything in sync. For example, if three different inventory items - within the same product - are each sold three different times, Mechanic will ensure that each of those items are lowered by a further 6, and that all others are lowered by 9.
- This task only counts and adjusts available inventory at the default location configured in Shopify.
- To manually change inventory levels for a product, adjust only one variant to the desired level. During the next scheduled run, the task will bring the other variants into sync.
- By default, Mechanic will check your inventory every 10 minutes. Feel free to change that subscription to "mechanic/scheduler/hourly", or something else that suits your needs.
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!