Understanding the Feed Rules System
The Feed Rules System is a powerful feature that allows you to filter, transform, and optimize your product data before it's exported to various marketplaces. Rules are applied sequentially during feed generation, giving you complete control over your product catalog.
Rule Types
Simple Rules
Single condition with one action. Perfect for straightforward transformations.
Complex Rules
Multiple conditions with IF/THEN/ELSE logic. Ideal for sophisticated data processing.
All Available Conditions
Conditions determine when a rule should be applied to a product. Here's a complete list with examples:
Text Comparison Conditions
| Condition | Description | Example |
|---|---|---|
contains |
Checks if field contains specified text (case-insensitive) | Title contains "Sale" → Matches "Summer Sale Items" |
not contains |
Checks if field does NOT contain specified text | Title not contains "Draft" → Excludes draft products |
starts with |
Checks if field begins with specified text | SKU starts with "WS-" → Matches "WS-12345" |
ends with |
Checks if field ends with specified text | Title ends with "- Refurbished" → Matches refurbished items |
equals |
Exact match (case-insensitive) | Status equals "active" → Only active products |
not equals |
Does not exactly match | Category not equals "Uncategorized" |
List Comparison Conditions
| Condition | Description | Example |
|---|---|---|
contains one of |
Matches if field contains ANY of the listed values | Brand contains one of: Nike Adidas Puma |
not contains one of |
Matches if field contains NONE of the listed values | Title not contains one of: Test Demo Sample |
in list |
Exact match against a list of values | Category in list: Electronics Computers Accessories |
not in list |
Does not match any value in the list | Status not in list: discontinued out_of_stock |
Numeric Comparison Conditions
| Condition | Description | Example |
|---|---|---|
greater than |
Numeric value is greater than specified | Price greater than 100 |
less than |
Numeric value is less than specified | Inventory less than 5 |
greater or equal |
Numeric value is greater than or equal to | Weight greater or equal 1.5 |
less or equal |
Numeric value is less than or equal to | Discount less or equal 50 |
between |
Numeric value falls within a range | Price between 10-50 |
Value Checking Conditions
| Condition | Description | Example |
|---|---|---|
is empty |
Field has no value or only whitespace | Description is empty |
is not empty |
Field has a value | Image URL is not empty |
always |
Always applies (no condition check) | Use for global transformations |
Text Metrics Conditions
| Condition | Description | Example |
|---|---|---|
length exceeds |
Text length is greater than specified characters | Title length exceeds 150 |
length not exceeds |
Text length is within limit | Description length not exceeds 5000 |
word count exceeds |
Number of words exceeds specified | Description word count exceeds 50 |
word count not exceeds |
Number of words is within limit | Title word count not exceeds 10 |
Advanced Pattern Matching
| Condition | Description | Example |
|---|---|---|
matches regex |
Matches regular expression pattern | SKU matches regex: ^[A-Z]{2}-d{4}$ |
not matches regex |
Does not match regular expression | Description not matches regex: (spam|junk) |
All Available Actions
Actions define what happens when a condition is met. Here's a complete list:
Feed Control Actions
| Action | Description | Example Use Case |
|---|---|---|
exclude |
Remove product from feed entirely | Exclude products with price = 0 |
deduplicate products ⭐ |
Remove duplicate products based on matching field | Keep only lowest priced variant per SKU |
Text Transformation Actions
| Action | Description | Example |
|---|---|---|
replace text |
Find and replace text (case-insensitive) | Replace "Free Shipping" with "Ships Free" |
transform field ⭐ |
Complete field transformation using template | Transform to: {{brand}} - {{title}} ({{color}}) |
combine fields |
Merge multiple fields with template | Combine: {{title}} | Size: {{size}} |
strip HTML |
Remove all HTML tags from text | Clean product descriptions |
change case |
Convert to UPPER, lower, or Title Case | Make brand names uppercase |
trim whitespace |
Remove extra spaces and line breaks | Clean up messy data |
add prefix |
Add text to beginning of field | Add "SALE: " to title |
add suffix |
Add text to end of field | Add " - Free Shipping" to title |
truncate text |
Limit text to specified length | Limit description to 500 chars |
Numeric Operations
| Action | Description | Example |
|---|---|---|
math operation |
Add, subtract, multiply, divide, round | Multiply price by 1.2 (20% markup) |
percentage change |
Increase/decrease by percentage | Decrease price by 15% |
round price |
Round to specified decimal places | Round price to nearest dollar |
extract number |
Extract numeric value from text | Extract "12.5" from "Weight: 12.5 kg" |
Advanced Text Processing
| Action | Description | Example |
|---|---|---|
split text |
Extract part of text by delimiter | Split "Color|Size|Material" get element 1 |
clean text |
Remove special characters and clean formatting | Clean messy product titles |
regex replace |
Advanced find/replace with patterns | Remove all prices: /$[d,]+.?d*/ |
remove non-alphanumeric |
Keep only letters, numbers, and spaces | Clean SKUs or IDs |
URL Operations
| Action | Description | Example |
|---|---|---|
add UTM parameters |
Add tracking parameters to URLs | Add utm_source=google&utm_medium=shopping |
URL encode |
Encode special characters in URLs | Make URLs safe for all systems |
URL decode |
Decode encoded URLs | Convert %20 back to spaces |
validate URL |
Clear invalid URLs | Remove malformed links |
Date & Formatting
| Action | Description | Example |
|---|---|---|
format date |
Change date format | Convert to Y-m-d or d/m/Y format |
Featured Action: Transform Field
The Transform Field action is one of the most powerful features in the rules system. It allows you to completely rebuild a field's content using a template with placeholders.
How It Works
Use {{field_name}} placeholders to insert values from any product field:
Template: {{brand}} - {{title}} | {{color}} {{size}}
Product: {brand: "Nike", title: "Running Shoes", color: "Red", size: "10"}
Result: Nike - Running Shoes | Red 10
Common Use Cases
- SEO Titles:
Buy {{title}} - {{brand}} | Free Shipping - SKU Generation:
{{brand}}-{{category}}-{{id}} - Description Headers:
About This {{category}}: {{title}} - Variant Titles:
{{parent_title}} - {{color}} / {{size}}
Featured Action: Deduplicate Products
The Deduplicate Products action helps you remove duplicate products from your feed based on matching criteria.
Configuration Options
| Match Field | The field to identify duplicates (e.g., SKU, GTIN, title) |
| Priority Field | The field to determine which duplicate to keep (e.g., price, stock) |
| Priority Direction | Keep product with lowest or highest priority value |
Example Scenarios
Scenario 1: Keep Cheapest Variant
- Match Field:
parent_sku - Priority Field:
price - Priority Direction:
lowest
Result: For products with same parent_sku, only the cheapest variant is kept.
Scenario 2: Keep Most In-Stock Item
- Match Field:
gtin - Priority Field:
inventory - Priority Direction:
highest
Result: For products with same GTIN, keep the one with most stock.
Complex Rules (IF/THEN/ELSE)
Complex rules allow you to create sophisticated logic with multiple conditions and different actions based on whether conditions are met.
Structure
Example Complex Rule
Rule: Premium Product Pricing Strategy
IF:
- Brand equals "Premium Brand" AND
- Category contains "Electronics" AND
- Price greater than 100
THEN:
- Add prefix "[PREMIUM] " to title
- Math operation: Add 50 to price
- Transform description: "Exclusive {{brand}} Product - {{title}}"
ELSE:
- Percentage change: -10% on price
- Add suffix " - Great Value!" to title
Best Practices & Tips
Rule Order Matters
Rules are processed sequentially. Place exclusion rules before transformation rules to avoid unnecessary processing.
Test Before Applying
Use the product preview tabs to see how rules affect your products before publishing the feed.
Use Descriptive Titles
Give your rules clear, descriptive titles so you can easily understand their purpose later.
Combine Simple and Complex Rules
Use simple rules for straightforward tasks and complex rules for sophisticated logic.
Field Placeholders
Remember you can use {{field_name}} placeholders in most text values, not just in transform actions.
Common Questions
Can I use multiple deduplication rules?
Yes! Each deduplication rule works independently. For example, you could first deduplicate by SKU keeping lowest price, then deduplicate by title keeping highest stock.
What happens if a field placeholder doesn't exist?
If a field referenced in {{field_name}} doesn't exist, it will be replaced with an empty string.
Can I combine conditions with OR logic in simple rules?
Simple rules only support single conditions. For OR logic, use complex rules or create multiple simple rules.
How do I debug why a product was excluded?
Check the "Excluded Products" tab in the feed rules interface. It shows all products removed by exclusion rules.