Creating Reusable Conditional Values with Dynamic Attributes
Dynamic Attributes in Deviking Product Feeds Pro let you create reusable values that change automatically according to product data.
They can be used for simple labels, conditional product data, merged fields, dynamic prices, discounts, marketplace-specific values, and many other feed requirements.
Once created, a Dynamic Attribute becomes available as a source in your feed mappings.
Where to Find Dynamic Attributes
Go to:
Deviking Feeds → Dynamic Attributes
Create a new Dynamic Attribute and give it a descriptive name.
Examples:
- Custom Availability
- Feed Brand
- Promotional Label
- Marketplace Price
- Product Identifier
- Product Title Extension
Each Dynamic Attribute receives its own source token:
dynamic:<id>You can then select that Dynamic Attribute as a source in any feed mapping.
How Dynamic Attributes Work
A Dynamic Attribute consists of:
- One or more conditional rules
- A result for each rule
- An ELSE / Default Result
Rules are processed from top to bottom.
The first enabled rule that matches the product returns its result.
Once a rule matches, later rules are not evaluated.
If no rule matches, the ELSE / Default Result is used.
Creating a Rule
Inside a Dynamic Attribute, add an IF rule and define the conditions that must match.
Conditions can use the same product sources and comparison operators available in Advanced Filters.
For example:
IF Category contains Shoesor:
IF Stock Status equals instock
AND
Current Price greater than 100You can combine multiple conditions using AND or OR logic.
Rules themselves can also contain multiple condition groups.
Result Types
Deviking Product Feeds Pro supports several result types inside Dynamic Attribute rules.
Static Value
Returns a fixed value when the rule matches.
Example:
IF Stock Status equals instock
Result:
AvailableThis is useful for marketplace-specific labels such as:
Available
Out of stock
Preorder
Yes
No
New
UsedSource Field
Returns the value of another product source.
Example:
IF Brand is not empty
Result Type:
Source Field
Source:
BrandThis is useful when the returned value should come directly from WooCommerce product data.
Composite / Merged Value
Composite values let you combine multiple product sources together with your own text.
For example:
{{source:name}} - {{source:attr:pa_color}} - {{source:attr:pa_size}}A product could therefore produce:
Running Shoes - Black - XLComposite values can contain:
- Static text
- Product fields
- Attributes
- Custom fields
- Taxonomies
- Other supported product sources
Use Insert Source to add source placeholders without manually typing the complete token.
Example: Building a Custom Product Label
Suppose you want products in the Shoes category to produce a label containing the product name, color and SKU.
Create a rule:
IF Category contains ShoesChoose:
Result Type → Composite / Merged Value
Then build:
{{source:name}} - {{source:attr:pa_color}} - {{source:sku}}Possible result:
Trail Runner - Blue - TR-1024Numeric Modifier
Dynamic Attributes can also perform mathematical adjustments on numeric values.
Choose:
Result Type → Numeric Modifier
Then select a Base Source.
For example:
Base Source:
Current PriceYou can then apply one of the available operations:
- Add fixed amount
- Subtract fixed amount
- Increase by percentage
- Decrease by percentage
- Multiply by
- Divide by
Example: Conditional 10% Discount
Create a rule:
IF Category contains WomenSet:
Result Type:
Numeric Modifier
Base Source:
Current Price
Operation:
Decrease by %
Value:
10If the original product price is:
100the Dynamic Attribute returns:
90The WooCommerce product price itself is not changed.
Only the value generated for the feed is modified.
Different Adjustments for Different Products
You can create several rules inside the same Dynamic Attribute.
For example:
Rule 1
IF Category contains Women
Current Price
Decrease by 10%Rule 2
IF Category contains Men
Current Price
Decrease by 20%ELSE
Source Field
Current PriceThe same Dynamic Attribute can therefore produce a different feed price depending on the product.
ELSE / Default Result
Every Dynamic Attribute can define what should happen when none of its rules match.
The ELSE result can use the same result types as normal rules:
- Static Value
- Source Field
- Composite / Merged Value
- Numeric Modifier
For example:
IF Sale Price is not empty
→ Source Field
→ Sale Price
ELSE
→ Source Field
→ Regular PriceOr:
IF Category contains Clearance
→ Current Price
→ Decrease by 25%
ELSE
→ Current PriceRule Priority
Rules are evaluated in their displayed order.
For example:
Rule 1:
IF Category contains Clearance
→ 30% discount
Rule 2:
IF Category contains Shoes
→ 10% discountIf a product belongs to both categories, Rule 1 returns the result because it appears first.
The second rule is never evaluated.
Use drag-and-drop ordering to place more specific rules before more general ones.
Using Multiple Conditions
A rule can require several conditions.
For example:
Category contains Shoes
AND
Stock Status equals instock
AND
Current Price greater than 100The result could then be:
Current Price
Decrease by 15%This makes Dynamic Attributes useful for advanced promotional or marketplace-specific logic.
Using Dynamic Attributes in Feed Mapping
After saving the Dynamic Attribute, open a feed and go to its field mapping.
Select the Dynamic Attribute as the source for the output field.
The feed generator evaluates the Dynamic Attribute independently for every product.
For example:
Output Field:
sale_price
Source:
Marketplace Discount PriceThe value returned by the Dynamic Attribute becomes the value written to the feed.
Dynamic Attributes and Variations
Dynamic Attributes are evaluated for the record currently being exported.
When exporting variations, variation-aware sources can therefore return variation-specific data such as:
- SKU
- Price
- Sale Price
- Stock
- Selected attributes
- Variation name
Parent-aware sources can also be used when parent product information is required.
Common Uses
Dynamic Attributes can be used for many different feed requirements.
Typical examples include:
Availability Labels
Convert WooCommerce stock values into marketplace-specific values.
instock → Available
outofstock → Out of stock
onbackorder → PreorderConditional Prices
Choose or calculate different feed prices depending on product data.
Promotional Labels
IF Sale Price is not empty
→ On SaleCustom Product Titles
Combine several product fields:
{{source:brand}} {{source:name}} - {{source:attr:pa_color}}Custom Identifiers
Combine SKU, brand, attributes or custom metadata into a single value.
Marketplace-Specific Values
Create one reusable value and use it in multiple feeds.
Best Practices
Give Dynamic Attributes clear names so their purpose is immediately obvious.
For example:
Google Availability
Marketplace Discount Price
Custom Feed Brand
Extended Product TitlePlace the most specific rules first.
Always configure an appropriate ELSE result unless an empty value is intentionally required.
For complex pricing logic, use a dedicated Dynamic Attribute instead of duplicating the same conditions across multiple feeds.
Because Dynamic Attributes are reusable, changes made in one place automatically affect every feed using that Dynamic Attribute.