Update Product Status When Variant is Out of Stock | Inventory Management
Update Product Status When Variant Goes Out of Stock
7 min setup
No coding required
Runs automatically
Effortlessly manage inventory and avoid overselling by automatically updating a product's status when one of its variants goes out of stock. This MESA workflow template helps keep your product listings accurate, ensuring customers are informed of current availability. Minimize the risk of disappointing customers and streamline inventory management with real-time updates on product availability.
How it works
6 steps to start automatically updating product status when inventory runs out
Variant Out of Stock (Trigger)
Why this matters: This monitors your Shopify store for any product variant that goes out of stock, instantly triggering the workflow to take action. This trigger automatically detects when any product variant in your store reaches zero inventory. Once activated, it captures the variant details and product information needed to update the product status. The trigger runs continuously in the background, so no manual monitoring is required. It passes the out-of-stock variant data to the next step for product retrieval.
Retrieve Product
Why this matters: This step fetches the complete product information needed to check other variants and make updates to the product listing. The workflow automatically retrieves the full product details using the product ID from the out-of-stock variant. This includes all variants, inventory levels, product description, and current status information. No configuration is needed as it uses the product ID from the trigger. The retrieved product data gets passed to the counting step to analyze remaining inventory across all variants.
Count Variants Still In Stock
Why this matters: This counts how many variants of the product still have inventory available to determine if the entire product should be marked as out of stock. This loop examines all variants of the product and counts only those with inventory quantity greater than zero. The counting logic filters through each variant's inventory level automatically. If the count reaches zero, it means all variants are out of stock and the product should be updated. The final count number determines whether the workflow continues to the next filtering step.
Filter: All Variants Are Out of Stock
Why this matters: This acts as a decision point that only allows the workflow to continue updating the product if all variants are truly out of stock. The filter checks if the variant count from the previous step is less than or equal to zero. Only when this condition is true (meaning no variants have inventory) does the workflow proceed to update the product. This prevents premature updates when some variants are still available for purchase. If variants with inventory exist, the workflow stops here without making changes.
Update Product Description
Why this matters: This modifies the product description to inform customers about the out-of-stock status while preserving the original content. The workflow appends an out-of-stock message to the existing product description in your Shopify store. The default message "This product is currently out of stock, please check back soon!" gets added to the end of your current product description. You can customize this message by editing the text in the body_html field. The updated description immediately appears on your storefront to inform customers.
Remove Product from Sales Channel
Why this matters: This removes the out-of-stock product from your chosen sales channel to prevent customers from seeing unavailable items. This step unpublishes the product from a specific sales channel that you select during setup. You'll need to choose which publication (like your Online Store, Facebook Shop, or other sales channels) to unpublish from by entering the publication ID. The product remains in your Shopify admin but becomes hidden from the selected storefront. You can find publication IDs in your Shopify admin under Sales Channels settings.
Frequently asked questions
Can I customize the out-of-stock message that gets added to product descriptions?
Yes, you can edit the message in Step 5 (Update Product). Simply modify the text "This product is currently out of stock, please check back soon!" to match your brand voice or include specific information like expected restock dates.
What happens if I want to unpublish from multiple sales channels at once?
Currently, the workflow unpublishes from one sales channel per run. To remove from multiple channels, you can duplicate Step 6 and configure each copy with a different publication ID for each sales channel you want to target.
Will this workflow trigger if I manually set inventory to zero for testing purposes?
Yes, the workflow triggers whenever any variant reaches zero inventory, whether from actual sales or manual adjustments. If you're testing inventory changes, consider temporarily disabling the workflow to avoid unwanted product updates.
Make this template your own!
Customize this workflow even further:
- Set restock notifications
- Create customer waitlists
- Update multiple sales channels
- Track inventory patterns
You're in good company
Avg. App Store rating
4.9/5
Merchant reviews
157
Avg. time saved per week
3.5 hrs
"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."
PetFriendly
"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."
Zailys
"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"
Rothy's