Conditions in transformations: when a rule runs

How rule conditions work: any, equals, greater than, contains substring, empty, regular expression, and checks against other nodes or columns.

A condition in a transformation answers one question: should this rule run now, or should Eofferix skip it and continue with the next rule? For example: if the price is greater than 100, add markup; if the SKU is not empty, add a prefix; if the value contains USD, remove that substring.

The same checks can appear in transformations and in export conditions, but the result is different. A transformation changes a field value. An export condition decides whether a field, row, product, or XML/JSON element appears in the output file.

Where The Condition Is Used

In a transformation row, the condition sits between the value source and the action. Eofferix first takes the value from the selected source, checks the condition, and only then runs the action.

  • Source - the current value or another node, attribute, column, or system value.
  • Condition - the check: any, equals, greater than, contains substring, empty, regular expression, and other options.
  • Condition value - the value used for comparison. Conditions such as "any", "empty", and "not empty" do not need it.
  • Action - what to do when the condition is true: replace, remove spaces, increase by percent, do not load the field, and so on.

A condition does not have to use the current field. For example, an Availability value can be changed based on the neighboring stock node, and a price can be changed based on currency or an activity flag.

Before Or After Transformations

Inside a transformation chain, rules run from top to bottom. Each next row receives the result of the previous row. If you need to clean a price from spaces and currency first and then check it as a number, place the cleanup rules above the numeric condition.

Condition Reference

The reference keeps only the useful columns: condition name, when to use it, and how it behaves. A separate Example column is not needed here because practical scenarios are shown below.

ConditionWhen to useBehavior
anyThe rule should always run.Matches any value, including an empty one.
equalsYou need an exact match.Compares the whole value. Letter case matters only when case sensitivity is enabled.
not equalYou need to process all values except one.Matches when the value differs from the specified value.
greater thanYou need to check a number: price, weight, stock, quantity.Both sides of the comparison are read as numbers.
less thanYou need to find values below a threshold.Works as a numeric check.
greater than or equal toThe threshold itself should also match.Matches a value that is equal to or above the threshold.
less than or equal toThe threshold itself should also match.Matches a value that is equal to or below the threshold.
contains substringYou need to find a fragment inside text.Matches when the specified text is found anywhere in the value.
does not contain substringYou need to exclude values with a specific word, code, or fragment.Matches when the specified text is not present in the value.
starts withThe first part of the value matters.Matches when the value starts with the specified text.
ends withThe last part of the value matters.Matches when the value ends with the specified text.
emptyYou need to handle empty fields.A string containing only spaces is treated as empty.
not emptyThe action is needed only for filled values.Matches when something remains after trimming spaces around the value.
regular expressionYou need to check the value by a pattern.Matches when the regular expression finds a match.
not regular expressionYou need to process values that do not match a pattern.Matches when the regular expression does not find a match.

Practical Example

Below is one XML snapshot fragment and two configuration variants for the same nodes. The animation shows that clicking a snapshot value opens the transformation window for the selected node.

<workbook>
  <sheet>
    <row>
      <SKU>37227</SKU>
      <Name>Garden watering can planter, cream, 13.5x10 cm</Name>
      <Unit>pcs</Unit>
      <Pack>1</Pack>
      <Price>269</Price>
      <Stock>3</Stock>
      <CategoryPath>Home decor / Planters</CategoryPath>
    </row>
  </sheet>
</workbook>
Animation showing how to open the transformation window in an XML snapshot
Clicking an XML snapshot value opens value settings, where you can add a transformation rule.

Variant 1: Prepare The Price

In this snapshot, the price is already numeric: 269. The rule can check the number directly, without first removing currency or spaces.

  1. Condition greater than with value 100: increase the price by 10%.
  2. Condition less than or equal to with value 100: replace the value with 100 as the minimum price.
Price transformation window with greater than and less than or equal to conditions
Conditions let you process a price above the threshold and a price below the minimum differently.
BeforeRules That RunAfter
269greater than 100, increase by 10%295.9
80less than or equal to 100, replace with 100100

Variant 2: Convert Stock Into A Status

The stock node contains a number. If the receiver needs a text status, the value can be replaced by conditions.

  1. First, a rule with condition any sets the base value to in_stock.
  2. If the current value is less than or equal to 0, it is replaced with out_of_stock.
Stock transformation window that converts quantity into availability status
The first rule sets the default value; the second overrides it for zero stock.
Snapshot StockResult
3in_stock
0out_of_stock