Value Transformations

How to change data before export: replacements, text cleanup, rule chains, calculations, default values, and new fields.

Value transformations change data from the source file before it is written to the final format. They are used when you need to remove extra characters, normalize SKU, build a name from several fields, prepare a price, fill a default value, or adapt data to the requirements of a website, ERP, CMS, marketplace, or other applications.

How to Run a Transformation

The Transformations block is inside the settings of a specific value, field, node, or column. First select a value in the snapshot or table, then open its settings and add one or more rules.

  1. Open the profile and go to the snapshot or structure editor.
  2. Select the result field, such as sku, price, name, a table column, or a consolidated catalog field.

In the table editor, open a transformation from the result column. Click the needed header or cell, then open the value settings.

Animation showing the transformations window opening in the table editor
Clicking price column settings opens the real column window with the Transformations block.

In the XML editor, select the node or attribute that goes to the result. After the click, the settings window for that value opens.

Animation showing the transformations window opening in the XML editor
Clicking an XML node opens value settings where you can add a transformation rule.

In the JSON editor, select a key or value in the result tree. The settings open for the selected JSON block.

Animation showing the transformations window opening in the JSON editor
Clicking a JSON field opens the same transformations window for the selected value.

In the consolidated catalog, open a transformation from the catalog field binding. Click the selected field, for example "Name [NAME]" or "SKU [SKU]", then open the value settings.

Animation showing the transformations window opening in the consolidated catalog
Clicking a consolidated catalog field opens the same settings window with the Transformations block.
  1. Open value settings and add a rule in the Transformations block.
  2. Save the settings and check the preview on several rows or products.
SKU value transformation rule row with the action and result highlighted
In this example, the rule checks the current SKU value, finds a hyphen, and replaces it with an empty value.

What a Rule Contains

A rule reads like a sentence: which value to check, under which condition to run the action, and what to write to the result. If the condition does not match, the current value continues unchanged.

Rule partMeaningExample
Value to checkUsually the current field. In advanced settings, the rule can check a neighboring node, column, or another product field.{/catalog/product/stock}
ConditionDecides when the rule runs: any value, empty, not empty, contains text, greater than a number, and so on.greater than 100
ActionDefines what to do: replace, clean, append text, calculate, round, or stop loading the field.increase by %
Result or parameterSets the new text, number, percent, rounding precision, or another action parameter.12

Rule Chains

A field can contain several rules. They run from top to bottom: the result of the first rule becomes the input for the next one. This makes order important.

Animation of adding a value transformation rule chain for a product name

For example, price preparation is often best as a chain: first remove extra spaces from the value, apply markup, then check stock conditions, and round only at the end.

Sequential price transformations with a neighboring stock field check
The third rule checks the neighboring stock value, so the price can change based on another field from the same record.

What Transformations Can Do

  • clean text from HTML, extra spaces, line breaks, and service characters;
  • replace fragments, for example remove hyphens from SKU or replace an old category name;
  • add a prefix, suffix, or value from another field;
  • build one output field from several source values;
  • convert text to uppercase or lowercase;
  • transform numbers, dates, and prices;
  • calculate markup, discount, supplier multiplier, or final price;
  • round values at the end of the chain;
  • create default values for empty fields;
  • stop loading a specific field when it should no longer appear in the result.

All Transformation Operators

A rule has two operator groups: the condition operator decides when the rule runs, and the action operator changes the value or field parameter. Operators can be combined into chains and can check not only the current value, but also neighboring fields from the same record.

Condition Operators

OperatorHow it works
AnyThe rule always runs and does not check the field contents.
Equals / Not equalChecks whether the value equals the parameter or is different from it.
Greater than / Less than / Greater than or equal / Less than or equalCompares numeric values.
Contains substring / Does not contain substringChecks whether the value contains the specified text fragment.
Starts with / Ends withChecks the beginning or end of the string.
Empty / Not emptyRuns for empty or filled values.
Regular expression / Not a regular expressionChecks the value with a regular expression. Useful for patterns such as numbers, letters, prefixes, SKUs, and codes.

Action Operators

OperatorHow it works
Replace withFully replaces the current value with the specified text, number, or value from another field.
Add to beginning / Add to endAdds text, a prefix, suffix, or another field token to the beginning or end of the current value.
Convert dateConverts a date to the required format.
Collect values by path / Sum values by pathUsed in the XML editor to collect or sum values from repeated nodes by the specified path.
Replace substringReplaces one fragment with another. The parameter uses the format search=>replace.
Remove substringRemoves the specified fragment from the value, such as hyphens, spaces, or a service prefix.
Remove after / Remove before / Remove everything exceptCuts the value relative to a found fragment: keep the part before it, after it, or only the matched fragment. Works with Contains substring, Starts with, Ends with, and regular expression conditions.
Trim spaces at edges / Remove spaces / Collapse double spacesRemoves edge spaces, removes all spaces, or collapses multiple spaces into one.
Remove HTML tagsRemoves HTML tags from descriptions and other text fields.
Lowercase / Uppercase / Capitalize first letter / Capitalize each wordChanges letter case.
TransliterationTransliterates Cyrillic to Latin, useful for codes, URL parts, and technical fields.
RoundRounds a number with the specified precision and rounding rules.
Multiply / Divide / Add / SubtractRuns a math operation on a number.
Increase by % / Decrease by %Adds or subtracts a percent of the current value, for example for markup or discount.
Do not export fieldClears the field result so the selected value does not appear in the final export.
SkipChanges nothing and passes the current value further down the chain. Useful as a conditional branch.

Regular Expressions

Regular expressions are used in the Regular expression condition and in cutting operators. Enter the pattern without /.../ delimiters: the service applies it to the value automatically. By default, matching is case-insensitive; if case sensitivity is enabled, lowercase and uppercase letters are treated differently.

TaskPatternHow to apply it
Keep only digits from SKU-123-A\d+Use Regular expression with Remove everything except to get 123. This effectively removes letters and extra characters around the number.
Keep only letters from AB-123[A-Za-zА-Яа-яЁё]+Use Regular expression with Remove everything except to get AB.
Find a value that starts with a temporary prefix^TMP-Use Regular expression to process only temporary SKUs.
Check for a decimal price\d+([.,]\d+)?Useful before math actions and rounding.
Find extra spaces\s{2,}First detect such rows with a regular expression, then apply Collapse double spaces.

The regular expression toolkit is large: you can use character ranges, classes such as \d and \s, start of string ^, end of string $, groups, and repetitions. Test complex patterns in the preview: if the expression is invalid, the rule will not run.

Default Values and New Fields

Transformations are useful not only for existing values. A new field can receive a base value first, and later rules can replace it under conditions. For example, Product class starts as Mid-range, and later rules can replace it with Budget or Premium based on price.

New Product class field with a default value rule
The field does not have to exist in the source. It is created in the profile and filled by rules.

Transformation or Export Condition

A transformation changes a value. An export condition decides whether a field, row, product, or element appears in the result. If you need to remove the whole product, use export conditions. If you only need to change one field, use a value transformation.

TaskUse this
Remove a hyphen from SKU but keep the productValue transformation for the SKU field
Skip a description if it becomes empty after cleanupCleanup transformation plus a field condition after transformations
Skip the whole product when price is zeroExport condition for the element or product
Calculate price with markup and roundingRule chain for the price field

How to Check the Result

  1. Save the field settings.
  2. Open the preview or a test profile run.
  3. Check a normal value, an empty value, and an unusual source example.
  4. If there are several rules, temporarily leave one rule and test it separately.
  5. After changing rule order, check the final value again.
  • Do not use aggressive cleanup without checking real examples: useful parts of a name or SKU may disappear.
  • Run math actions after cleaning the number, and keep rounding as the last step.
  • If a rule uses another field, check rows where that field is empty or missing.
  • If you need to remove the whole record, use export conditions instead of replacing a value with empty text.