Transform rules let you modify field values after normalization but before validation. They cover everything from simple text changes to math operations and conditional logic. Rules can be scoped per supplier (adapter) or applied workspace-wide.
The 12 Operation Types
1. set_value
Set a field to a constant value. Useful for adding fixed metadata or overriding supplier data with a known correct value.
Example: Set brand to Acme Corp for all products from a specific supplier.
2. math
Perform arithmetic on numeric fields. Supported operations: add, subtract, multiply, divide, round, ceil, floor, and percentage_add.
The percentage_add operation is especially useful for tax: applying +25% to a net price to get a gross price with VAT.
Math rules automatically extract numeric values from currency strings. A value like $29.99 is parsed as 29.99, and 148.75 DKK is parsed as 148.75 before the operation is applied.
3. find_replace
Find a specific text string in a field and replace it with another. Straightforward text substitution.
Example: Replace colour with color in product descriptions.
4. prepend
Add a prefix to a field's value, with an optional space between the prefix and existing value.
Example: Prepend SKU- to a product code to get SKU-12345.
5. append
Add a suffix to a field's value, with an optional space between the existing value and suffix.
Example: Append mm to a dimension value.
6. concatenate
Combine the values of multiple fields into a single field with a configurable separator.
Example: Combine brand + name + color with a space separator to produce Acme Widget Red.
7. copy
Copy one field's value to another field. The source field remains unchanged.
Example: Copy name to meta_title as a starting point for SEO fields.
8. slugify
Convert a value to a URL-friendly slug: lowercase, remove special characters, and replace spaces with hyphens.
Example: Oslo Dining Chair (Black) becomes oslo-dining-chair-black.
9. uppercase / lowercase
Convert a field's value to all uppercase or all lowercase.
Example: Lowercase SKU codes for consistency: ABC-123-XL becomes abc-123-xl.
10. truncate
Limit a field's value to a maximum character length, with an optional suffix appended when truncation occurs.
Example: Truncate description to 150 characters with a ... suffix for a short description field.
11. regex_replace
Pattern-based replacement using regular expressions. For advanced text manipulation where simple find/replace isn't enough.
Example: Use the pattern \(\d+\) with an empty replacement to strip parenthetical numbers from product names.
12. conditional_set
Set a field's value based on a condition evaluated against another field. The condition follows the format: "If field X [operator] Y, then set field Z to W."
Supported operators:
equals— Field value exactly matches the comparison value.not_equals— Field value does not match.empty— Field has no value (null or empty string).not_empty— Field has a value.contains— Field value contains the comparison string.greater_than— Numeric comparison, field value is greater than threshold.less_than— Numeric comparison, field value is less than threshold.
Example: If weight is greater than 30, set shipping_class to freight.
When Rules Are Applied
Transform rules run after normalization (column mapping, value mapping, unit conversion) but before validation. This means rules operate on already-normalized data and their output is what gets validated against your schema.
Live Preview
Before saving a transform rule, you can use the live preview to see its effect on sample data from your feed. This lets you verify the rule does what you intend before it runs on the full dataset.
Rule Scope
Rules can be configured at two levels:
- Per-supplier (adapter) — The rule only applies to feeds from a specific supplier. Use this when the transformation is specific to how that supplier formats data.
- Workspace-wide — The rule applies to all feeds regardless of supplier. Use this for universal transformations like adding VAT or generating slugs.