Ducted
Knowledge BaseTransforms & LogicConditional Fields: If / Else Logic

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.

A conditional field with if / else-if / otherwise rules producing a custom label

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 rating is at least 4.5, output top-rated
  • else if discountPercentage is greater than 15, output clearance
  • 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 / refurbished from 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.

← Back to Knowledge Base