Rules clean up and reshape your product feed before it reaches your ads. A rule has conditions that decide which
products it applies to, and actions that change those products. Read it as one sentence: when these conditions are
true, do these actions. A rule with no conditions runs for every product, and the editor shows the caption
"Always — no conditions, this runs for every product."
Rules live on a catalog's Rules tab. Open a catalog from your project's Catalogs list, then choose Rules.
Your changes aren't live until you Publish#
Everything you change in the catalog is saved as a draft. Nothing is reprocessed, and no channel or ad sees your changes,
until you Publish. Publishing starts an import by itself within about 15 minutes.
Import now uses your last published configuration, not your draft. The button sits in the health strip at the top of
the catalog page. If you have unpublished changes and click it, Renable warns you: "Importing now uses your last
published configuration — your current edits won't be applied until you publish". You then choose:
- Publish & import publishes your draft, then imports with your new rules. Choose this to see your edits take effect.
- Import anyway imports with the last published rules and ignores your draft. Choose this to refresh your data only.
- Cancel doesn't import.
Revert throws away the draft and goes back to what's live. Your draft is saved to history first. More on drafts in
Transforming your feed.
The Feed columns rail#
The Feed columns rail on the left lists your feed's columns, the same rail as on the
Mapping tab.
- Drag a column into a rule. Drop it on a condition or on a value, such as a Set field value.
- Set a column's type. Click its type badge to choose Text, Number, Date or Boolean, which decides
the comparisons its conditions offer. It's the same setting as on the Mapping tab.
Under your feed's columns, Rule outputs lists the columns your rules write. Click one to open the rule or ruleset
that writes it.
Conditions: which products a rule applies to#
Each condition compares one of your feed columns with a value. The comparisons depend on the column's type:
| Column type | Comparisons |
|---|
| Text | contains, doesn't contain, is exactly, is not, is blank, is not blank, matches pattern, doesn't match pattern, and both pattern comparisons with (ignore case) |
| Number | is exactly, is not, is less than, is at most, is greater than, is at least, is between, is blank, is not blank |
| Date | is before, is on or before, is after, is on or after, is between, is exactly, is not, is blank, is not blank |
| Boolean | is true, is false |
Numbers. Type numbers plain: 1000, not 1 000 or 12 kr. See Typing a number.
Dates. Pick the day in a calendar, and the rule compares whole days. Click { } next to the date to compare with
another column instead. If a date typed there can't be read as a date, Publish stops and names the rule. To compare
with a day counted from today, such as 60 days ago, click the clock button (Compare with N days ago instead).
Rules that depend on dates explains how that works and how often it updates.
Combining conditions. You can combine conditions in one level of groups. An ANY OF group matches when any
condition inside it is true, and an ALL OF group when they all are. Join the top-level items with AND or OR.
Missing columns. Once Renable has read your whole feed, the rule card tells you if a rule reads a column that isn't
in it: "Reads list_price, which isn't in the current feed". The rule still runs and the column has no value. That's
fine if an earlier rule creates the column. If your shop stopped sending it, you'll want to look into it.
The actions a rule can take#
A rule can do any of these to the products it matches:
| Action | What it does |
|---|
| Set field | Writes or overwrites a feed column's value: fixed text, another column, or a value built with steps |
| Remove field | Clears a feed column's value |
| Exclude product | Drops the product from this catalog, so it never reaches a channel or ad |
| Process images | Gives the matching products image processing of their own, replacing the catalog's Categorize images switch and steps for those products. Use it for the premium model on your best sellers, for example. See Image background removal and classification |
| Split into variants | Turns one feed row into several products, one per size, color or other variant. See Splitting variants into products |
| Group products | Adds values computed across a group to each of its products, or keeps one product per group. See Grouping products |
| Apply ruleset | Runs a ruleset (sometimes called a shared or master ruleset) from the Rulesets page, for just the products the rule matches. One rule can apply several, which run in order. See Working with Rulesets |
| Map product fields | Writes a product field (Title, Price, an attribute) for just the products the rule matches. It wins over your mapping for those products |
The "Otherwise…" branch#
Every rule has an "Otherwise…" setting for the products its conditions don't match. By default it reads "Otherwise,
do nothing". Open it to add actions for those products, so one rule can handle both cases. Any action works here. For
example, "if it's a simple product keep it as-is, otherwise split it into variants" is one rule, and so is "apply one
ruleset to these products and another to the rest". To handle a group key that's blank on some products, see
Grouping products.
Rules run in order#
Rules run top to bottom, and each rule sees what the rules above it changed, not the original feed value. So put a rule
that depends on another's result below it.
Your catalog's Mapping comes last and fills in whatever is still empty. So when a product field is written from
several places (a Map product fields action, a rule from an applied ruleset, the mapping), the last rule to write it
wins, and the mapping covers the products no rule claimed.
Each row of a Map product fields action has a menu that changes this for one field:
- Always set replaces what came before. It's the default for a field that holds one value, like Title or Price.
- Only if not already set writes only when nothing earlier gave the field a value. Use it for a fallback: if
nothing has set the title yet, set it from this column.
- Add to the list adds your value to what's there. It's offered only for fields that hold several values (additional
images, Product highlights, product attributes), and it's the default for them.
An empty value doesn't count as written: it overwrites nothing, and a later rule or your mapping can still fill the
field.
The Mapping tab has the same three choices per field, but a single-value field defaults to Only if not already set
there. See Mapping your feed to catalog fields.
Changing values with steps#
Click "+ Add step" on a value to change it step by step: trim whitespace, replace text, change case, strip HTML,
format a number or date, map values, and more. Steps run in order, so you can strip HTML from a description and then trim
the leftover whitespace. Every step is explained in Steps: changing a value before it is used.
A Product picker at the top of the editor shows each step's result for a real product. You can search your whole feed
or type a sample value of your own.
If a step can't produce a value for a product, its row shows No value, the reason and what to do about it: "Shift
date gives a date, and Math needs a number. Put Math before Shift date, or use Date difference to count the days." The
field's fallbacks are used for that product, and the next import lists the rule under its warnings. Inside a Map each
step it works differently: an item that gets no value is left out, nothing falls back, and the step's row says how many
items were left out and why.
If a column holds several values, such as several image links, a text step changes all of them. Where only one value
fits (a field like Title or Price, a group key, a condition's value), the first is used and the catalog's Activity tab
warns you. Add a First, Last, Nth or Join step to choose.
For dates, see Working with dates. A catalog has no Today's date, so to pick out products by
how recent a date is, compare it with days ago in a condition.
To convert many values at once, say your own category names into the categories a destination expects, pair the Map
values step with a mapping table.
Formatting numbers#
A number is written exactly as it is unless a Format number step says otherwise; a Format number step's separators
left on their first option are the catalog language's.
Languages and localization explains the rule. So a rule that sets a
text column to {{price}} kr writes 4490.5 kr for a feed that says 4490.5, and a number a step or a group works out
is written plainly, like 4490.5.
Add a Format number step, under Numbers in "+ Add step", to choose how the number is written:
- Round to decimals sets how many decimals to keep. Left empty (As is), the number keeps its own.
- Decimal separator and Thousands separator each start on the catalog language's, and the menu says which, for
example Catalog language (sv-SE: 4 490,50). Pick one to override it for this step.
With Round to decimals set to 2 and both separators left alone, a Set field that writes {{price}} into a column
price_text writes 4 490,00 on a Swedish catalog. A later rule that writes {{price_text}} kr gives 4 490,00 kr.
Before you add one:
- Put it last. Format number turns the number into text. Math and conditions that compare numbers have to come
before it.
- Leave it off your Price field. Price is always stored as a number, and a channel formats it again for its
destination. Publish stops on a Format number step mapped straight into Price, Sale price or Member price. A price
with separators that arrives through another column can be misread.
- Leave it off whole-number fields. Publish stops the same way for Stock count and Multipack. A value that arrives
through another column as
1 234 or 5.00 doesn't import and shows a warning. Use Math there instead.
A Math step can use another column instead of a fixed number. If that column is empty for a product, the result is
empty too.
Checking a rule did what you expected#
- Each rule shows how many products it matched on the last import. A rule with conditions that matched none of the
sampled products gets a "never matched" warning.
- Trace, on the Rules tab toolbar, walks one product through every rule in order. It shows which rules applied and
how each field changed, ending in the final catalog output. See
Imports, warnings, and tracing a value.
If imports stop because of a Process images rule#
If a Feed import failing error names a Process images rule, the rule was saved in an old draft with no
Categorize images choice. The catalog stops importing until it's fixed, so prices and stock stop updating. Open the
rule, set the switch, and publish the catalog, or the ruleset if the rule lives in one.
Or ask Aimée#
Describe the rule to Aimée ("exclude everything that's out of stock") and she'll set up the conditions and actions, then
publish once you approve.
Where to go next#