Knowledge Base
Deviking Product feeds Pro

Customizing Availability Values in Product Feeds

WooCommerce stock status values do not always match the terminology required by the system receiving your product feed.

WooCommerce uses stock status values such as:

 
instock
outofstock
onbackorder
 

while a feed destination may require values such as:

 
in stock
out of stock
available for order
 

or:

 
available
unavailable
backorder
 

With Deviking Product Feeds Pro, you can convert WooCommerce stock status into the exact availability terminology required by each feed without changing the product’s actual WooCommerce stock status.

For straightforward conversions, use Value Map. For more complex availability logic that depends on additional product conditions, use a Dynamic Attribute.


Method 1: Convert Stock Status with Value Map

When each WooCommerce stock status simply needs to become another value, Value Map is the simplest option.

Open:

Deviking Feeds → Feeds

Edit the required feed and go to Mapping.

Create or edit the field that will contain the availability value.

For example:

 
Output Field:
availability

Source:
Stock Status

Transform:
Value Map
 

Then enter the required conversions:

 
instock=>in stock;
outofstock=>out of stock;
onbackorder=>available for order
 

The generated values become:

WooCommerce Stock StatusFeed Value
instockin stock
outofstockout of stock
onbackorderavailable for order

The WooCommerce stock status itself is not modified.


Use Any Required Availability Terminology

The output values are configurable.

For example, another destination may expect:

 
instock=>available;
outofstock=>unavailable;
onbackorder=>backorder
 

or:

 
instock=>yes;
outofstock=>no;
onbackorder=>yes
 

The important part is that the values on the left are the WooCommerce source values, while the values on the right are the values written to the feed.

The general syntax is:

 
source value=>output value
 

Multiple mappings can be separated with semicolons or new lines.


XML Example

With:

 
instock=>available;
outofstock=>unavailable;
onbackorder=>backorder
 

a product that is currently in stock can generate:

 
<product>
    <sku>ABC-100</sku>
    <availability>available</availability>
</product>
 

An unavailable product can generate:

 
<product>
    <sku>ABC-101</sku>
    <availability>unavailable</availability>
</product>
 

and a product on backorder can generate:

 
<product>
    <sku>ABC-102</sku>
    <availability>backorder</availability>
</product>
 

CSV Example

The same Value Map configuration works in CSV feeds:

 
sku,title,availability
ABC-100,"Product A",available
ABC-101,"Product B",unavailable
ABC-102,"Product C",backorder
 

The conversion is independent of whether the feed uses XML or CSV.


Different Availability Values for Different Feeds

Each feed has its own Mapping configuration.

This means the same WooCommerce stock status can be exported differently depending on the destination.

For example:

 
Feed A

instock=>in stock;
outofstock=>out of stock;
onbackorder=>available for order
 

while another feed can use:

 
Feed B

instock=>available;
outofstock=>unavailable;
onbackorder=>backorder
 

Both feeds use the same WooCommerce product data, but each produces the vocabulary expected by its destination.


Method 2: Use a Dynamic Attribute

Use a Dynamic Attribute when the availability output depends on more than a simple one-to-one stock status conversion.

Go to:

Deviking Feeds → Dynamic Attributes

and click:

Add Dynamic Attribute

Enter a descriptive name such as:

 
Feed Availability
 

You can then create IF / ELSE rules using WooCommerce product data.


Basic Stock Status Dynamic Attribute

For example:

 
Rule 1

IF
Stock Status = instock

RESULT
Static value:
available
 

Add another rule:

 
Rule 2

IF
Stock Status = onbackorder

RESULT
Static value:
backorder
 

Then configure the default result:

 
ELSE

Static value:
unavailable
 

The resulting logic is:

 
instock
→ available

onbackorder
→ backorder

everything else
→ unavailable
 

Add the Dynamic Attribute to a Feed

After saving the Dynamic Attribute, open:

Deviking Feeds → Feeds

Edit the feed and go to Mapping.

Configure the availability field:

 
Output Field:
availability

Source:
Feed Availability
 

The Dynamic Attribute is evaluated for every exported product record.


Use Additional Conditions

A Dynamic Attribute becomes useful when stock status is only one part of the availability rule.

For example, you may want products with very low stock to use a different feed value.

A rule could be:

 
Rule 1

IF
Stock Status = instock

AND

Stock Quantity <= 5

RESULT
Static value:
limited availability
 

followed by:

 
Rule 2

IF
Stock Status = instock

RESULT
Static value:
available
 

and:

 
Rule 3

IF
Stock Status = onbackorder

RESULT
Static value:
backorder
 

with:

 
ELSE
→ unavailable
 

The result could be:

 
In stock, quantity 3
→ limited availability

In stock, quantity 25
→ available

On backorder
→ backorder

Out of stock
→ unavailable
 

Rule Order Matters

Dynamic Attribute rules are evaluated from top to bottom.

The first enabled rule whose conditions match returns its result.

For example:

 
Rule 1
Stock Status = instock
AND
Stock Quantity <= 5
→ limited availability
 

must appear before:

 
Rule 2
Stock Status = instock
→ available
 

Otherwise, every in-stock product would match the broader second condition before the more specific low-stock rule could be used.

When conditions overlap, place the more specific rules first.


Stock Quantity Conditions

The built-in Stock Quantity source can also be used in Dynamic Attribute conditions.

For example:

 
Stock Quantity <= 0
 
 
Stock Quantity <= 5
 
 
Stock Quantity > 5
 

Numeric comparison operators include:

 
>
>=
<
<=
 

This lets you create feed-specific stock classifications such as:

 
0 or less
→ unavailable

1–5
→ low stock

more than 5
→ available
 

When the required output depends only on WooCommerce’s stock state, however, using Stock Status is usually simpler.


Example: Detailed Availability Labels

You can create a Dynamic Attribute such as:

 
Dynamic Attribute:
Availability Label
 

with:

 
Rule 1

IF
Stock Status = instock

AND
Stock Quantity <= 5

→ Static value: Limited stock
 
 
Rule 2

IF
Stock Status = instock

→ Static value: In stock
 
 
Rule 3

IF
Stock Status = onbackorder

→ Static value: Available on backorder
 
 
ELSE

→ Static value: Out of stock
 

A generated feed could then contain:

 
<availability>Limited stock</availability>
 

or:

 
<availability>Available on backorder</availability>
 

depending on the current product data.


Use a Source Field as the Result

A Dynamic Attribute rule does not have to return fixed text.

The result can also be another Source field.

For example:

 
IF
Stock Status = instock

RESULT
Source field:
Stock Quantity
 

This can be useful when a destination expects one type of information for one condition and another value for a different condition.

For most availability fields, however, a Static value is easier to control.


Configure the Default Result

If none of the Dynamic Attribute rules match, the ELSE / Default Result can:

 
Return empty value
 
 
Return a Static value
 

or:

 
Return a Source field
 

For availability logic, a Static default is often useful.

For example:

 
ELSE
→ Static value: unavailable
 

This ensures that any product not handled by an earlier rule still receives a predictable output value.


Variations and Stock Status

When variations are exported as individual feed records, stock-related sources are resolved for the current variation.

For example:

 
T-Shirt
├── Black / Small   — instock
├── Black / Medium  — outofstock
└── White / Large   — onbackorder
 

With:

 
instock=>available;
outofstock=>unavailable;
onbackorder=>backorder
 

the generated variation records can contain:

 
Black / Small
→ available
 
 
Black / Medium
→ unavailable
 
 
White / Large
→ backorder
 

This allows each variation to carry its own availability value in the feed.


Changing Availability Values Is Different from Filtering Products

Changing the availability value does not remove products from the feed.

For example:

 
outofstock=>unavailable
 

means that an out-of-stock product can still appear in the feed with:

 
availability = unavailable
 

If the product should not appear in the feed at all, use a product filter instead.

For example, an Exclude rule can remove products where:

 
Stock Status = outofstock
 

These are two separate operations:

 
Value Map / Dynamic Attribute
→ Changes the exported value
 
 
Filter
→ Determines whether the product is exported
 

Value Map or Dynamic Attribute?

Use Value Map when the requirement is a direct conversion:

 
instock → available
outofstock → unavailable
onbackorder → backorder
 

Configure:

 
Source:
Stock Status

Transform:
Value Map
 

Use a Dynamic Attribute when availability depends on multiple conditions:

 
IF Stock Status = instock
AND Stock Quantity <= 5
→ limited availability

IF Stock Status = instock
→ available

IF Stock Status = onbackorder
→ backorder

ELSE
→ unavailable
 

A practical rule is:

 
Direct stock-status conversion
→ Value Map

Conditional availability logic
→ Dynamic Attribute
 

Preview the Result

After configuring the availability conversion:

  1. Save the Dynamic Attribute if you created one.
  2. Open the required feed.
  3. Configure the availability Mapping row.
  4. Save the feed.
  5. Run Preview.
  6. Check an instock product.
  7. Check an outofstock product.
  8. Check an onbackorder product if available.
  9. Check several variations if the feed exports variations.
  10. Run Validate Feed.
  11. Use Save & Generate when the output is correct.

Recommended Configuration

For most feeds that only require different availability terminology, use:

 
Output Field:
availability

Source:
Stock Status

Transform:
Value Map
 

with:

 
instock=>in stock;
outofstock=>out of stock;
onbackorder=>available for order
 

Use Dynamic Attributes only when the resulting availability value needs additional conditions such as stock quantity or other product data.

This keeps the configuration simple while allowing each feed to export exactly the stock and availability terminology required by its destination.