Conditional Fields: If / Else Logic
Transforms & Logic · Updated 12 Jul 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
Tip
Order matters. Put the most specific, highest-priority rule first, since evaluation stops at the first match.