Excluding Out of Stock Products from a Feed
Keeping unavailable products out of a product feed can help ensure that marketplaces and advertising channels receive only products that can currently be sold.
Deviking Product Feeds Pro lets you control this directly through Advanced Filter Groups. You can remove products based on their WooCommerce Stock Status, or use Stock Quantity when you need a specific inventory threshold.
Open the Feed Filters
Go to:
Deviking Feeds → Feeds
Edit the required feed and open the Filters section.
Advanced Filter Groups support both Include and Exclude modes. An Exclude group acts as a veto: when a product matches the group, it is removed from the feed.
Method 1: Exclude Products by Stock Status
For most feeds, the simplest way to remove unavailable products is to check their WooCommerce Stock Status.
Create an Advanced Filter Group with:
Group Mode:
Exclude
Source:
Stock Status
Operator:
Equals
Value:
outofstockThe logic is:
Stock Status = outofstock
→ Exclude from feedProducts with other WooCommerce stock states remain eligible.
For example:
Product A → instock → Included
Product B → outofstock → Excluded
Product C → onbackorder → IncludedThis method follows WooCommerce’s actual availability status rather than relying only on the numeric quantity.
WooCommerce Stock Status Values
WooCommerce commonly provides stock states such as:
instock
outofstock
onbackorderDeviking Product Feeds exposes Stock Status as a WooCommerce source, and marketplace templates can also transform these values into destination-specific availability text.
Exclude Backordered Products as Well
If the feed should contain only products that are currently in stock, you can also remove backordered items.
Create an Exclude Group containing:
Stock Status = outofstock
OR
Stock Status = onbackorderThe result becomes:
instock
→ Included
outofstock
→ Excluded
onbackorder
→ ExcludedThis is useful for destinations where backordered products should not be advertised as currently available.
Alternative: Include Only In-Stock Products
Instead of creating an Exclude rule, you can create an Include Group:
Group Mode:
Include
Source:
Stock Status
Operator:
Equals
Value:
instockOnly products matching:
Stock Status = instockremain eligible.
Include Groups define which products qualify, while Exclude Groups remove matching products from the eligible catalog.
Include or Exclude?
These two configurations can produce a similar result:
Option A — Exclude unavailable statuses
EXCLUDE
Stock Status = outofstock
OR
Stock Status = onbackorderOption B — Require in-stock status
INCLUDE
Stock Status = instockUsing an Exclude group is convenient when most of your catalog should remain available and you only want to remove specific stock states.
Using an Include group is useful when instock should be an explicit requirement for every exported product.
Method 2: Filter by Stock Quantity
You can also filter products based on their numeric inventory.
For example, to remove products when stock reaches zero:
Group Mode:
Exclude
Source:
Stock Quantity
Operator:
<=
Value:
0The result is:
Stock: 15 → Included
Stock: 4 → Included
Stock: 0 → ExcludedNumeric comparison operators are supported by the Advanced Filter system, making quantity-based filtering useful when you need more control than a simple stock status check.
Exclude Products Below a Minimum Quantity
You are not limited to zero stock.
For example, a marketplace feed may need to contain only products with at least five units available.
Configure:
Group Mode:
Exclude
Stock Quantity < 5Example:
Product A
Stock Quantity: 20
→ Included
Product B
Stock Quantity: 5
→ Included
Product C
Stock Quantity: 3
→ Excluded
Product D
Stock Quantity: 0
→ ExcludedThis lets you create a safety threshold before products disappear from stock completely.
Or Require a Minimum Stock Level
The same requirement can be expressed with an Include Group:
Group Mode:
Include
Stock Quantity >= 5Only products meeting the minimum inventory requirement remain eligible.
This can be useful for feeds where you deliberately want to advertise products only when enough stock is available.
Stock Status vs Stock Quantity
The two sources serve different purposes.
Use Stock Status
When the main question is:
Can WooCommerce currently consider this product available?Example:
Stock Status = outofstockUse Stock Quantity
When the rule depends on an exact inventory number:
Stock Quantity < 5For a general “remove unavailable products” rule, Stock Status is usually the cleaner approach.
Use Stock Quantity when the destination or your inventory strategy requires a numerical threshold.
Combining Status and Quantity
Advanced Filter Groups allow several conditions to be combined.
For example:
EXCLUDE GROUP
Stock Status = outofstock
OR
Stock Quantity <= 2This removes:
- products explicitly marked out of stock;
- products whose remaining inventory has fallen to two units or fewer.
Another configuration could require:
INCLUDE GROUP
Stock Status = instock
AND
Stock Quantity >= 5A product must satisfy both conditions to remain eligible.
Conditions inside Advanced Filter Groups can use AND or OR logic.
Example: Keep Only Available Products with a Valid Price
Inventory filtering can also be combined with other product requirements.
For example:
INCLUDE GROUP
Stock Status = instock
AND
Current Price > 0The feed now requires products to:
Be in stock
AND
Have a price greater than zeroYou could extend this further:
Stock Status = instock
AND
Current Price > 0
AND
Featured Image URL Is not emptyThis creates a more restrictive feed containing only marketplace-ready products.
Out-of-Stock Variations
Stock filtering becomes particularly useful when individual WooCommerce variations are exported.
Consider:
Premium T-Shirt
Black / Small
Stock Status: instock
Black / Medium
Stock Status: outofstock
White / Small
Stock Status: instockIf the feed uses:
Product & Variation Mode:
Variations onlyand the filter is:
Exclude:
Stock Status = outofstockthe generated feed contains:
Black / Small
White / Smallwhile:
Black / Mediumis removed.
The available variations of the same parent product can remain in the feed independently.
Example XML Result
Before filtering:
<products>
<product>
<sku>TS-BLK-S</sku>
<availability>instock</availability>
<quantity>8</quantity>
</product>
<product>
<sku>TS-BLK-M</sku>
<availability>outofstock</availability>
<quantity>0</quantity>
</product>
<product>
<sku>TS-WHT-S</sku>
<availability>instock</availability>
<quantity>12</quantity>
</product>
</products>After applying:
Exclude:
Stock Status = outofstockthe feed becomes:
<products>
<product>
<sku>TS-BLK-S</sku>
<availability>instock</availability>
<quantity>8</quantity>
</product>
<product>
<sku>TS-WHT-S</sku>
<availability>instock</availability>
<quantity>12</quantity>
</product>
</products>Do Not Confuse Filtering with Availability Mapping
Removing unavailable products and changing their availability text are two separate operations.
For example, you can map WooCommerce stock values:
instock → in stock
outofstock → out of stock
onbackorder → available for orderusing Value Map. Deviking’s marketplace configuration supports this kind of Stock Status transformation.
However, this only changes the output value.
It does not remove the product.
To completely exclude a product from the feed, use a Filter.
Example: Keep Backorders but Remove Out-of-Stock Products
If backorders are acceptable:
EXCLUDE
Stock Status = outofstockResult:
instock → Included
onbackorder → Included
outofstock → ExcludedYou can then map the remaining availability values separately:
instock → In stock
onbackorder → Available for orderThis keeps filtering logic separate from the text required by the destination.
Example: Only Products Ready for Immediate Delivery
If backorders should also disappear:
INCLUDE
Stock Status = instockor:
EXCLUDE
Stock Status = outofstock
OR
Stock Status = onbackorderBoth approaches can be used depending on how the rest of your filter logic is structured.
Using Only an Exclude Group
You do not need an Include Group just to remove unavailable products.
A feed containing only:
EXCLUDE
Stock Status = outofstockstarts from the normal eligible product catalog and removes matching records.
This makes the configuration particularly simple when stock availability is the only restriction.
Preview the Result
After adding the stock filter:
- Save the feed
- Click Preview
- Check both in-stock and out-of-stock products
- If variations are included, check several variations independently
- Run Validate Feed
- Generate the final feed
Confirm that unavailable products no longer appear in the preview.
Recommended Configuration
To simply remove WooCommerce products marked as unavailable:
Group Mode:
Exclude
Source:
Stock Status
Operator:
Equals
Value:
outofstockTo keep only products immediately available for sale:
Group Mode:
Include
Source:
Stock Status
Operator:
Equals
Value:
instockTo maintain a minimum inventory threshold:
Group Mode:
Exclude
Source:
Stock Quantity
Operator:
<
Value:
5This gives you precise control over product availability without changing the original WooCommerce inventory data.