Transformation Rules
Overview
Transformation Rules allow you to modify, clean, and enhance your product feed data before exporting it to advertising channels. Rules are applied automatically during export, transforming your raw feed data into optimized content that meets channel requirements.
How Rules Work
- Create rules on the Rules page by selecting a transformation type, source field, and target field
- Configure parameters specific to each rule type (e.g. search/replace patterns, numeric factors)
- Add optional conditions to apply rules only to specific items (item filters)
- Set the execution order — rules run from top to bottom and can be reordered via drag & drop
- Rules apply at export time — your original feed data is never modified
Rule Scope
Rules can be applied at two levels:
| Scope | Description |
|---|---|
| Global Rules | Apply to all exports in your project |
| Export-Specific Rules | Apply only to a specific export (e.g. Google Shopping, Meta) |
Export-specific rules are useful when different channels require different data formatting.
Rule Categories
Text Transformations
| Rule | Description | Example |
|---|---|---|
| Uppercase | Convert text to uppercase | "blue shirt" → "BLUE SHIRT" |
| Lowercase | Convert text to lowercase | "Blue SHIRT" → "blue shirt" |
| Capitalize | Capitalize first letter | "blue shirt" → "Blue shirt" |
| Trim | Remove whitespace from start/end | " blue shirt " → "blue shirt" |
| Replace | Find and replace text (regex supported) | Replace "cm" with "centimeters" |
| Concatenate | Combine multiple fields into one | brand + " - " + title |
| Prepend | Add text before the value | Add "NEW: " before title |
| Append | Add text after the value | Add " - Free Shipping" after title |
| Extract | Extract text using regex | "Size 42" → "42" |
| Truncate | Limit text to max length | Shorten description to 150 chars |
| Pad Left / Right | Pad with characters | "123" → "00123" |
Cleaning Transformations
| Rule | Description | Use Case |
|---|---|---|
| Remove HTML | Strip all HTML tags and decode entities | Clean website descriptions |
| Strip Tags | Same as Remove HTML | Remove rich text formatting |
URL Transformations
| Rule | Description | Example |
|---|---|---|
| Append URL Params | Add tracking parameters to URLs | utm_source=google&utm_medium=shopping |
URL parameters support dynamic placeholders using {field_name} syntax
Example: utm_content={product_id}
Numeric Transformations
| Rule | Description | Example |
|---|---|---|
| Multiply | Multiply by factor | Currency conversion |
| Divide | Divide by value | Cents → dollars |
| Add | Add fixed value | Handling fee |
| Subtract | Subtract value | Fixed discount |
| Percentage | Percentage change | +10% markup |
| Round | Round decimals | 19.999 → 20.00 |
| Floor | Round down | 19.7 → 19 |
| Ceiling | Round up | 19.1 → 20 |
| Absolute | Convert to positive | -5 → 5 |
| Minimum | Enforce minimum | Price ≥ 1.00 |
| Maximum | Enforce maximum | Shipping ≤ 10.00 |
Conditional Transformations
| Rule | Description | Example |
|---|---|---|
| If / Then | Full conditional | If brand = Nike |
| If Empty | Set value if empty | Copy title |
| If Contains | Text match | "sale" |
| If Greater Than | Numeric comparison | Price > 100 |
| If Less Than | Numeric comparison | Stock < 5 |
| If Equals | Exact match | Color = red |
| If Not Equals | Not equal | Status != active |
| If Between | Range check | Price 50–100 |
Value Mapping
| Rule | Description | Example |
|---|---|---|
| Default Value | Set if empty | Brand = Generic |
| Static Value | Always set value | feed_name |
| Copy Field | Copy from field | sale_price → price |
| Lookup | Map via table | Category mapping |
Item Filters (Conditions)
By default, rules apply to all items. Conditions restrict rules to specific items.
Condition Operators
| Operator | Description |
|---|---|
| Equals | Exact match |
| Not Equals | Does not match |
| Contains | Substring |
| Not Contains | Exclusion |
| Starts With | Prefix |
| Ends With | Suffix |
| Greater Than | Numeric > |
| Less Than | Numeric < |
| Greater or Equal | ≥ |
| Less or Equal | ≤ |
| Between | Range |
| Is Empty | No value |
| Is Not Empty | Has value |
| Matches Regex | Regex match |
Condition Logic
- ALL – all conditions must match (AND)
- ANY – at least one condition must match (OR)
Common Use Cases
1. UTM Tracking Parameters
Append campaign tracking to product links.
2. Channel-Specific Price Markup
Add a 10% margin for a specific channel.
3. Title Enhancement
Concatenate multiple fields into optimized titles.
4. Clean HTML Descriptions
Remove HTML formatting from descriptions.
5. Default Shipping Label
Set free shipping for orders over $50.
6. Stock-Based Availability
Update availability based on inventory.
7. Category Mapping
Map internal categories to Google Shopping taxonomy.
8. Ensure Minimum Price
Prevent $0 prices from being exported.
Best Practices
- Test rules before exporting
- Rule order matters — cleaning before enhancement
- Use item filters selectively
- Prefer global rules for universal logic
- Start simple and iterate
Tips
- Drag rules to reorder execution
- Duplicate rules for similar use cases
- Preview results before exporting
- Rules are non-destructive — source data is preserved