---
title: "Auto-draft sold-out products"
id: "1112"
type: "page"
slug: "shopify-auto-draft-out-of-stock"
published_at: "2026-11-15T03:05:26+00:00"
modified_at: "2026-11-15T03:05:26+00:00"
url: "https://flexsync.app/formulas/shopify-auto-draft-out-of-stock/"
markdown_url: "https://flexsync.app/formulas/shopify-auto-draft-out-of-stock.md"
---

Formula recipe# Hide sold-out products with one formula

`=IF(On_hand=0,"DRAFT","ACTIVE")`Put the formula in the Status column. Products at zero stock move to Draft in Shopify. The rest stay Active.

[Start for Free](https://apps.shopify.com/flex-stock-sync/install?utm_source=flexsync.app&utm_medium=formula-page&utm_campaign=shopify-auto-draft-out-of-stock)
[See how it works](#how)

[#](#)

Formula**IF**

Shopify field**Status**

Tested result**Product moved to Draft**

4.9/5 on Shopify App Store

Built for Shopify

20 formula cells free

How it works## Zero stock in the Sheet, Draft in Shopify

FlexSync reads the formula result, not the formula. Shopify sees DRAFT and hides the product from your store.

- No more sold-out products on collection pages
- One formula, filled down the whole column
- Works on every product in the Sheet

Products · FlexSync**Synced**

fx`=IF(T2=0,"DRAFT","ACTIVE")`

| 1 | Product | On hand | Status |
| --- | --- | --- | --- |
| 2 | Black Swimsuit | 0 | DRAFT |
| 3 | Hooded Wetsuit | 10 | ACTIVE |
| 4 | Soft Surfboard 5'7 | 2 | ACTIVE |
| 5 | Fullsuit 3XS | 10 | ACTIVE |

Shopify admin

### Black Swimsuit

Status**Draft *Draft***

Inventory**0 in stock *Synced***

Copy and paste## Ready-to-use variations

Native Google Sheets formulas. Paste one in the yellow column and fill down.

`=IF(T2=0,"DRAFT","ACTIVE")`### Draft at zero

Hide a product the moment it sells out.

`=IF(T2<=2,"DRAFT","ACTIVE")`### Draft before you run out

Pull products at two units left to avoid overselling.

`=IF(AND(T2=0,Z2="DENY"),"DRAFT","ACTIVE")`### Respect backorders

Only draft products that can't sell when out of stock.

Good to know## Tips before you start

### Use the right words

Shopify status accepts `ACTIVE`, `DRAFT` or `ARCHIVED`. Any other word is rejected and the cell resets.

### After a restock

Fill the Status formula down again after you update stock. FlexSync then sends Active back to Shopify.

### Counts toward your plan

Each formula cell counts as one formula-driven cell. Free includes 20.

Setup## Up and running in three steps

1### Turn on formulas

In FlexSync, open Settings, then Advance Settings, and switch on Allow Sheet Formula.

2### Paste the formula

Add it to the first row of the yellow column you want to change.

3### Fill down

Drag it down the column. FlexSync sends each result to Shopify.

[Read the formula guide](/docs/how-to-enable-and-use-flexsync-shopify-formula-feature/)

More recipes## More formulas that change your store

[Sitewide sale pricing =Compare_at*0.85 Explore →](/formulas/shopify-sale-pricing-formula/)
[Supplier price sync =IMPORTRANGE(supplier_url,"Sheet1!B2") Explore →](/formulas/shopify-supplier-price-sync/)
[Cost-plus pricing =VLOOKUP(SKU,Costs,3,0)*1.6 Explore →](/formulas/shopify-cost-plus-pricing/)
[Auto-tag low stock =IF(Available<10,"low-stock","") Explore →](/formulas/shopify-low-stock-tags/)
[Clean up product titles =PROPER(raw_title) Explore →](/formulas/shopify-clean-product-titles/)
[Generate SKUs ="FB-"&RIGHT(Variant_id,6) Explore →](/formulas/shopify-auto-generate-skus/)

Questions## Frequently asked questions

Still have questions? Our support team is available 24/7 at [support@flexsync.app](mailto:support@flexsync.app)
.

### Will a drafted product disappear from my store?

    Yes. Draft products are hidden from all sales channels until you set them back to Active.

### Which stock column should I use?

    Use On hand or Available. Available is On hand minus committed orders.

### Can I archive instead of draft?

    Yes. Replace "DRAFT" with "ARCHIVED" in the formula.

## Let your formulas run your store

Free plan includes 500 SKUs and 20 formula cells.

[Install FlexSync Free](https://apps.shopify.com/flex-stock-sync/install?utm_source=flexsync.app&utm_medium=formula-page&utm_campaign=shopify-auto-draft-out-of-stock)
[See pricing](/pricing)

×
