How it works
Follow these 5 simple steps to automatically archive products that stay sold out for 30 days
Schedule
Schedule
Query Database for Long-Term Stockouts
Query Database for Long-Term Stockouts
Loop Through Products
Loop Through Products
Update Database Record
Update Database Record
Archive Product in Shopify
Archive Product in Shopify
Make it your own
Customize this workflow even further:
Adjust the 30-day threshold
Modify the database query to use a different day count (like 14, 60, or 90 days) based on your product types, restock timelines, and how long you want to show unavailable products before archiving.
Send notifications before archiving
Add a Slack or email step before the archive action to notify your team which products are about to be archived, giving them a chance to expedite restocking or make exceptions for high-value items.
Archive only specific product types
Add a filter after the loop that checks product type, vendor, or tags and only archives products that match certain criteria, allowing you to keep some sold-out products visible (like limited editions or seasonal items).
Create restock reminders
Instead of or in addition to archiving, add a step that creates tasks in Asana or sends vendor emails for products that have been sold out for 20+ days, giving your team time to restock before the 30-day archive threshold.
Frequently asked questions
What if a product gets restocked before the 30-day mark?
You'll need a companion workflow that monitors inventory and removes or updates the database record when products come back in stock. Without this, the archiving workflow might archive a restocked product if its database record still shows it as sold out for 30+ days.
Can I change the 30-day threshold to something shorter or longer?
Yes, edit the database query in Step 2 to change the day calculation. Replace "30" with your desired threshold (like "14" for two weeks or "60" for two months). The query typically uses a SQL condition like WHERE (CURRENT_DATE - "Sold Out Start Date") >= 30.
What happens to archived products in Shopify?
Archived products are removed from your online store but remain in Shopify admin under Products > Archived. They retain all data (images, descriptions, variants, inventory) and can be easily unarchived by changing their status back to "Active" or "Draft" when you're ready to restock and republish them.
What is a template?
MESA templates are fully pre-configured workflows built and vetted by Shopify Experts. Unlike competitor templates that provide basic scaffolds requiring extensive setup, MESA templates come with all data variables properly mapped, required fields configured, and steps ready to activate. You can turn them on immediately and start automating.
Can I customize a template?
Absolutely! While our templates work out-of-the-box, every step can be personalized to match your exact business requirements. Add conditional logic, integrate additional apps, or build more sophisticated workflows. MESA's templates provide a solid foundation that you can expand as needed.
Are templates free?
Yes! Our entire library of expert-built, production-ready templates is free to use. Unlike platforms that charge for premium templates or provide only basic scaffolds, MESA gives you access to hundreds of fully-configured, vetted workflows at no additional cost.
Ready to automatically archive products that stay sold out for 30 days?
Join thousands who've automated their work and saved an average of 3.5 hours every week.
Start with this template — It's free7-day free trial • 5 min setup • Cancel anytime