Conditional Fields: If / Else Logic
Transforms & Logic · Updated 1 Nov 2026
A Conditional field outputs different values depending on your data, using plain if / else-if / otherwise rules. It's how you produce availability, condition, and custom labels that aren't clean columns in your source.
Building rules
Add rules top to bottom. Each rule has a condition (a column, an operator, and a value) and an output. Ducted evaluates them in order and the first rule that matches wins; if none match, the otherwise value is used.
Example - a custom label for ad bidding:
- if
ratingis at least4.5, outputtop-rated - else if
discountPercentageis greater than15, outputclearance - otherwise output
standard
Operators
The same operators as filters are available - equals, contains, greater/less than, is empty, matches regex, and their negations - so you can branch on text or numbers.
Common uses
- Availability: map stock counts to
in stock/out of stock - Condition: derive
new/used/refurbishedfrom a source flag - Custom labels: bucket products for campaign bidding
Mapping values onto an accepted list (the quick way)
Some template fields only accept specific values - for example a drivetrain field that must be one of 4x4, awd, or rwd. When your feed uses different wording (4WD, AWD, RWD), Feed Health flags the mismatched rows.
Instead of writing the if / else rules by hand, open the field and click "Map these values" on the warning. Ducted lists every distinct value in your feed with a dropdown of the accepted values next to each one:
- Values that already line up (like
AWD->awd) are matched and filled in for you automatically. - Close-but-not-exact values are matched too (like
Diesel Fuel->Diesel) and flagged with a confidence badge so you can confirm them at a glance. Genuinely ambiguous values (that could fit two accepted values) are left for you to decide. - You only pick targets for the real mismatches (like
4WD->4x4). - A Default handles anything not in the list, and each value can also be set to leave empty or keep original.
This is just a friendlier editor for a conditional field - you can switch to the full if / else rules at any time with Switch to advanced conditional.
Tip
Order matters. Put the most specific, highest-priority rule first, since evaluation stops at the first match.