Knowledge Base
Deviking Product feeds Pro

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:
outofstock
 

The logic is:

 
Stock Status = outofstock
→ Exclude from feed
 

Products with other WooCommerce stock states remain eligible.

For example:

 
Product A → instock      → Included
Product B → outofstock   → Excluded
Product C → onbackorder  → Included
 

This 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
onbackorder
 

Deviking 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 = onbackorder
 

The result becomes:

 
instock
→ Included

outofstock
→ Excluded

onbackorder
→ Excluded
 

This 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:
instock
 

Only products matching:

 
Stock Status = instock
 

remain 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 = onbackorder
 

Option B — Require in-stock status

 
INCLUDE

Stock Status = instock
 

Using 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:
0
 

The result is:

 
Stock: 15 → Included
Stock: 4  → Included
Stock: 0  → Excluded
 

Numeric 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 < 5
 

Example:

 
Product A
Stock Quantity: 20
→ Included

Product B
Stock Quantity: 5
→ Included

Product C
Stock Quantity: 3
→ Excluded

Product D
Stock Quantity: 0
→ Excluded
 

This 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 >= 5
 

Only 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 = outofstock
 

Use Stock Quantity

When the rule depends on an exact inventory number:

 
Stock Quantity < 5
 

For 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 <= 2
 

This 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 >= 5
 

A 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 > 0
 

The feed now requires products to:

 
Be in stock
AND
Have a price greater than zero
 

You could extend this further:

 
Stock Status = instock
AND
Current Price > 0
AND
Featured Image URL Is not empty
 

This 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: instock
 

If the feed uses:

 
Product & Variation Mode:
Variations only
 

and the filter is:

 
Exclude:
Stock Status = outofstock
 

the generated feed contains:

 
Black / Small
White / Small
 

while:

 
Black / Medium
 

is 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 = outofstock
 

the 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 order
 

using 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 = outofstock
 

Result:

 
instock     → Included
onbackorder → Included
outofstock  → Excluded
 

You can then map the remaining availability values separately:

 
instock     → In stock
onbackorder → Available for order
 

This 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 = instock
 

or:

 
EXCLUDE

Stock Status = outofstock
OR
Stock Status = onbackorder
 

Both 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 = outofstock
 

starts 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:

  1. Save the feed
  2. Click Preview
  3. Check both in-stock and out-of-stock products
  4. If variations are included, check several variations independently
  5. Run Validate Feed
  6. 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:
outofstock
 

To keep only products immediately available for sale:

 
Group Mode:
Include

Source:
Stock Status

Operator:
Equals

Value:
instock
 

To maintain a minimum inventory threshold:

 
Group Mode:
Exclude

Source:
Stock Quantity

Operator:
<

Value:
5
 

This gives you precise control over product availability without changing the original WooCommerce inventory data.