Knowledge Base
Deviking Product feeds Pro

Selecting and Calculating Product Prices Conditionally with Dynamic Attributes

Deviking Product Feeds Pro can dynamically select or calculate the price exported for each product.

Using Dynamic Attributes, you can create pricing rules based on categories, attributes, stock status, product data, custom fields and other available sources.

This makes it possible to create marketplace-specific pricing without changing the actual prices stored in WooCommerce.


Why Use Conditional Pricing?

Different products may require different pricing rules.

For example:

  • Apply a 10% feed discount to one category
  • Apply a 20% discount to another category
  • Export Sale Price when available
  • Fall back to Regular Price when no sale exists
  • Add a marketplace margin to selected products
  • Export tax-inclusive prices for one feed
  • Export tax-exclusive prices for another
  • Apply a different calculation only when specific conditions are met

Dynamic Attributes let you build this logic once and use it as a normal source in your feed.


Creating a Conditional Price

Go to:

Deviking Feeds → Dynamic Attributes

Create a new Dynamic Attribute.

For example:

 
Marketplace Price
 

Add your pricing rules.


Example: Use Sale Price When Available

Create the first rule:

 
IF Sale Price is not empty
 

Set:

 
Result Type:
Source Field

Source:
Sale Price
 

Then configure the ELSE result:

 
Result Type:
Source Field

Source:
Regular Price
 

The resulting logic is:

 
Sale Price when available
Otherwise Regular Price
 

You can now use this Dynamic Attribute as the price source in your feed.


Applying Conditional Discounts

The Numeric Modifier result type lets you calculate a new price directly inside a Dynamic Attribute.

For example, suppose products in the Women category should receive a 10% feed discount.

Create:

 
IF Category contains Women
 

Then configure:

 
Result Type:
Numeric Modifier

Base Source:
Current Price

Operation:
Decrease by %

Value:
10
 

A product priced at:

 
100
 

will return:

 
90
 

The original WooCommerce price remains unchanged.


Different Discounts for Different Product Groups

You can add several rules to the same Dynamic Attribute.

Example:

 
Rule 1

IF Category contains Women

Base Source:
Current Price

Operation:
Decrease by %

Value:
10
 
 
Rule 2

IF Category contains Men

Base Source:
Current Price

Operation:
Decrease by %

Value:
20
 

Then configure:

 
ELSE

Result Type:
Source Field

Source:
Current Price
 

The resulting logic is:

 
Women products → Current Price -10%
Men products → Current Price -20%
Everything else → Current Price
 

Applying a Fixed Discount

Numeric Modifier can also subtract a fixed amount.

Example:

 
Base Source:
Current Price

Operation:
Subtract fixed amount

Value:
5
 

A price of:

 
49.90
 

becomes:

 
44.90
 

Adding a Marketplace Margin

You can also increase a price.

Example:

 
Base Source:
Current Price

Operation:
Increase by %

Value:
8
 

A price of:

 
100
 

becomes:

 
108
 

This is useful when a marketplace requires a different selling price from your main WooCommerce store.


Multiply and Divide

Numeric Modifier also supports multiplication and division.

Example:

 
Base Source:
Current Price

Operation:
Multiply by

Value:
1.15
 

or:

 
Base Source:
Current Price

Operation:
Divide by

Value:
1.24
 

These operations are useful when a feed requires a specific numeric conversion.


Using WooCommerce Tax-Aware Prices

Deviking Product Feeds Pro also provides WooCommerce tax-aware price sources.

Available sources include:

Including Tax

  • Regular Price incl. tax
  • Sale Price incl. tax
  • Current Price incl. tax

Excluding Tax

  • Regular Price excl. tax
  • Sale Price excl. tax
  • Current Price excl. tax

These values are calculated using WooCommerce tax handling rather than a manually entered fixed VAT percentage.

This means the result can respect the product’s WooCommerce tax configuration.


Combining Tax-Aware Prices with Conditional Discounts

A tax-aware source can also be used as the base of a Numeric Modifier.

For example:

 
IF Category contains Promotion
 

Then:

 
Result Type:
Numeric Modifier

Base Source:
Current Price incl. tax

Operation:
Decrease by %

Value:
15
 

The calculation starts from the tax-inclusive WooCommerce price and then applies the 15% feed adjustment.


Example: Different Pricing by Stock Status

You can also use non-price data to decide which price should be exported.

For example:

 
IF Stock Status equals onbackorder
 

Result:

 
Current Price
Increase by 5%
 

ELSE:

 
Current Price
 

This illustrates that pricing conditions are not limited to categories.

Any compatible source available to Dynamic Attribute conditions can participate in the rule.


Example: Category and Price Condition Together

Multiple conditions can be combined.

For example:

 
Category contains Clearance
AND
Current Price greater than 50
 

Result:

 
Current Price
Decrease by 25%
 

Only products satisfying both conditions receive the calculated feed price.


Rule Order Matters

Dynamic Attribute rules are processed from top to bottom.

The first matching rule returns the value.

For example:

 
Rule 1
Clearance → -30%

Rule 2
Shoes → -10%
 

A product belonging to both Clearance and Shoes receives the Rule 1 result.

Place more specific pricing rules above broader rules.


Formatting the Final Price

After selecting the Dynamic Attribute as the mapping source, you can use Number Format on the mapping row to control how the calculated result appears in the feed.

For example:

 
89.9
 

can be formatted as:

 
89.90
 

or:

 
89,90
 

depending on the destination feed requirements.

Numeric calculation and numeric display formatting are separate operations.


Processing Order

When a Dynamic Attribute is used as a mapping source, its returned value becomes the source value for that mapping row.

The mapping can then continue through the normal output processing.

For mapping-level Numeric Modifier, the processing order is:

 
Source
→ Fallback Source
→ Numeric Modifier
→ Transform
→ Prefix / Suffix
→ Feed Output
 

This allows you to separate:

  • Conditional business logic
  • Numeric calculation
  • Output formatting

Does Conditional Pricing Change WooCommerce Prices?

No.

Conditional pricing in Deviking Product Feeds Pro changes only the value generated for the feed.

It does not modify:

  • Regular Price
  • Sale Price
  • WooCommerce product data
  • Checkout prices
  • Existing orders

This makes it suitable for channel-specific pricing.


Dynamic Attribute vs Mapping Numeric Modifier

Use a Mapping Numeric Modifier when the same calculation should apply to every product in that field.

Example:

 
Current Price
→ Increase by 5%
 

for every exported product.

Use a Dynamic Attribute with Numeric Modifier when the calculation depends on conditions.

Example:

 
Category A → -10%
Category B → -20%
Everything else → unchanged
 

Recommended Workflow

For simple global price adjustments:

  1. Select the price source in Mapping.
  2. Apply Numeric Modifier.
  3. Apply Number Format if required.

For conditional pricing:

  1. Create a Dynamic Attribute.
  2. Add the required conditions.
  3. Use Numeric Modifier as the rule result.
  4. Configure an ELSE result.
  5. Save the Dynamic Attribute.
  6. Select it as the mapping source.
  7. Apply Number Format if required.

This keeps complex pricing logic centralized and reusable.