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 PriceAdd your pricing rules.
Example: Use Sale Price When Available
Create the first rule:
IF Sale Price is not emptySet:
Result Type:
Source Field
Source:
Sale PriceThen configure the ELSE result:
Result Type:
Source Field
Source:
Regular PriceThe resulting logic is:
Sale Price when available
Otherwise Regular PriceYou 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 WomenThen configure:
Result Type:
Numeric Modifier
Base Source:
Current Price
Operation:
Decrease by %
Value:
10A product priced at:
100will return:
90The 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:
10Rule 2
IF Category contains Men
Base Source:
Current Price
Operation:
Decrease by %
Value:
20Then configure:
ELSE
Result Type:
Source Field
Source:
Current PriceThe resulting logic is:
Women products → Current Price -10%
Men products → Current Price -20%
Everything else → Current PriceApplying a Fixed Discount
Numeric Modifier can also subtract a fixed amount.
Example:
Base Source:
Current Price
Operation:
Subtract fixed amount
Value:
5A price of:
49.90becomes:
44.90Adding a Marketplace Margin
You can also increase a price.
Example:
Base Source:
Current Price
Operation:
Increase by %
Value:
8A price of:
100becomes:
108This 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.15or:
Base Source:
Current Price
Operation:
Divide by
Value:
1.24These 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 PromotionThen:
Result Type:
Numeric Modifier
Base Source:
Current Price incl. tax
Operation:
Decrease by %
Value:
15The 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 onbackorderResult:
Current Price
Increase by 5%ELSE:
Current PriceThis 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 50Result:
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.9can be formatted as:
89.90or:
89,90depending 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 OutputThis 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 → unchangedRecommended Workflow
For simple global price adjustments:
- Select the price source in Mapping.
- Apply Numeric Modifier.
- Apply Number Format if required.
For conditional pricing:
- Create a Dynamic Attribute.
- Add the required conditions.
- Use Numeric Modifier as the rule result.
- Configure an ELSE result.
- Save the Dynamic Attribute.
- Select it as the mapping source.
- Apply Number Format if required.
This keeps complex pricing logic centralized and reusable.