Template
Merchant Center feed rules template
Feed rules are now called attribute rules in Merchant Center and sit behind the Advanced data source management add-on. Whether you write them there or upstream in a feed tool, the same dozen rules cover most catalogs. This template lists them with the Google operation and the equivalent Textfinity transform side by side, so you can keep a rule inventory, move rules between the two, and know which ones Merchant Center cannot do at all.
We connect your store, build the feed and keep it in sync. Updated 2026-10-27.
At a glance
- In Merchant Center: Data sources → primary data source → Attribute rules tab. Operations: Set to, Extract, Take latest, Prepend, Append, Find & Replace, Calculate, Split & Choose, Clear. Rules cascade in order.
- Attribute rules need the Advanced data source management add-on and a reprocess of the data source after you apply changes.
- Upstream in a feed tool the same rules are mapping transforms: rename, combine, add prefix/suffix, replace from regexp, replace from Google Sheet, advanced DSL. They apply to every channel, not only Google.
- Rules cannot add products, fix a broken landing page or supply a GTIN you do not have; a merged source can add the missing column.
The feed rules template: twelve rules, two ways to write each
Each row is a rule most Google Shopping feeds end up needing. The middle column is the Merchant Center attribute rule using Google's operation names; the right column is the equivalent in Textfinity's mapping tab. Keep this table as your rule inventory; the CSV download holds the same rows for a spreadsheet.
| # | Rule | Merchant Center attribute rule | Textfinity mapping |
|---|---|---|---|
| 1 | Build title from brand, name, color, size | title: Set to [brand] + [title] + [color] + [size] | title → combine brand, title, color, size, delimiter ' ' |
| 2 | Normalize brand spellings | brand: Find & Replace 'nike inc' → 'Nike' (regex on) | brand → replace from regexp (?i)^nike( inc\.?)?$ → Nike |
| 3 | Strip HTML from description | description: Find & Replace <[^>]+> → '' (regex on) | description → remove from regexp <[^>]+> |
| 4 | Availability from stock quantity | availability: Set to 'out_of_stock' if stock equals 0 | availability → advanced: if calc{[stock]} > 0 then "in_stock" else "out_of_stock" |
| 5 | Google category from store category | google_product_category: Set to value, with one condition per category | google_product_category → replace from google sheet (store path → Google path; substring find-and-replace, so list full paths) |
| 6 | Price with currency | price: Append ' USD' | price → add suffix ' USD' |
| 7 | Sale price only when on sale | sale_price: Set to [sale_price] if on_sale equals yes | sale_price → rename, with condition [on_sale] is equal to 'yes'; otherwise leave empty |
| 8 | Condition default | condition: Set to 'new' if condition is empty | condition → add static value 'new' with condition matches regexp ^\s*$ |
| 9 | identifier_exists when no GTIN | identifier_exists: Set to 'no' if gtin is empty | identifier_exists → advanced: if [gtin] is empty then "no" else "yes" |
| 10 | Custom label price band | custom_label_0: Set to '0-19' if price less than 20 (one rule per band) | custom_label_0 → advanced: if calc{[price]} < 20 then "0-19" else if calc{[price]} < 50 then "20-49" else "50-plus" (all bands in one rule) |
| 11 | Clean tracking from link | link: Optimize URL, remove utm_* parameters | link → remove from regexp \?utm_[^&]*(&utm_[^&]*)*$ |
| 12 | Exclude a product set | excluded_destination: Set to multiple 'Shopping_ads' if product_type contains 'gift card' | Exclude filter: [product_type] includes 'gift card' (removes the row from every channel) |
Google operation names from the Merchant Center attribute rules help page, checked 2026-10-27. Conditions in Merchant Center are case-insensitive; prices are entered without the currency symbol.
What Merchant Center attribute rules do and do not do
Google's rule set has two halves. Data source operations decide where a value comes from: Set to (a column, a static value or a combination), Set to multiple for repeated fields such as excluded_destination, Extract with optional regex, and Take latest for price and availability across two sources. Modification operations change the value: Prepend, Append, Add repeated field, Optimize URL, Find & Replace with optional regex, Calculate, Split & Choose, and Clear. Any operation can carry a condition compared against the raw or processed attribute, combined with AND or OR.
Rules cascade in the order listed, Google's default rule runs first (take the value from the supplemental or primary source), and after Clear runs on a product no later rule touches it. The ID attribute lives in a separate ID rules section. Everything requires the Advanced data source management add-on, saving as draft, testing and applying, and then reprocessing the data source. None of it reaches Meta, Microsoft or TikTok; those channels never see Merchant Center's processed values.
When to move the rule upstream
Keep a rule in Merchant Center when it is Google-only and small: an excluded_destination for one country, a Take latest between two data sources, a last-minute Find & Replace while a plugin fix ships. Move it upstream when the same logic should reach other channels, when it needs a lookup table, when it depends on data the store export lacks, or when three people need to see why a title looks the way it does.
Upstream rules also profile. Textfinity's feed hygiene checks completeness per column, flags titles over 150 characters, finds spelling variants of the same value and validates URLs before the feed is fetched, so a rule's effect shows up in a column distribution rather than in a disapproval a day later. Textfinity does not read Merchant Center's diagnostics, so the check still happens in Merchant Center; the rules just run earlier.
Rules that need a merged source instead
A rule can only rearrange what the feed already contains. GTINs the store never stored, a cost column for margin labels, translated titles, a supplier's lead time: none of these can be produced by Set to or Find & Replace. In Merchant Center the answer is a supplemental source keyed on id; in a feed tool it is a merged source, a second CSV, XML or Google Sheet joined onto the catalog by SKU before any rule runs.
The practical test: if you would need to type the value for each product, it is data, not a rule, and belongs in a sheet. If you can describe how to derive it from existing columns in one sentence, it is a rule.
Rule 1 and rule 4 in the advanced DSL
title: [brand] + " " + [title] + " - " + [color] + ", " + [size]
availability: if calc{[stock]} > 0 then "in_stock" else "out_of_stock"Examples
Worked examples, by situation
Three stores, three rules from the template, each shown as a before/after row and as the rule that produced it.
Rule 3: strip HTML, keep the first sentence readable
Before
<p><strong>Hydrating Face Cream 50 ml</strong><br>Lightweight daily moisturizer.</p>
After
Hydrating Face Cream 50 ml Lightweight daily moisturizer.
How we set it up
We map description with replace from regexp (?:\s*<[^>]+>)+ to a single space, so the <br> leaves a gap instead of gluing the sentences together; the output is trimmed at both ends. In Merchant Center the same is Find & Replace with the regex option on and a space as the replacement. Google wants plain text and truncates at 5,000 characters.
Rule 5: category lookup that both channels share
Before
category_path Default Category/Cycling/Helmets/Road
After
google_product_category Sporting Goods > Outdoor Recreation > Cycling > Bicycle Accessories > Bicycle Helmets
How we set it up
We map google_product_category with replace from google sheet on a two-column lookup (Magento path → Google category); it replaces substrings, so each row holds a full path. Merchant Center would need one Set to rule per category; the sheet has 140 rows and is maintained by the merchandiser.
Rules 8 and 9: condition default and identifier_exists
Before
id,gtin,condition RING-AU-07,,
After
id,gtin,condition,identifier_exists RING-AU-07,,new,no
How we set it up
We map condition as add static value 'new' when condition matches regexp ^\s*$ (empty), otherwise rename, and identifier_exists as an advanced rule: if [gtin] is empty then "no" else "yes". Handmade jewelry without GTINs is accepted once identifier_exists is set to no.
Copy this plan
Build the rule inventory in an afternoon
Six steps. Steps four and five happen in Textfinity (we write those) or in Merchant Center, depending on where you keep the rule.
01
Download the rule inventory and delete what you do not need
Start from the twelve rules in the CSV. Cross out the ones your source already handles (Shopify sends clean availability; many XML plugins send currency with the price).
02
Decide the home of each rule
Google-only and small stays in Merchant Center; shared across channels, lookup-based or data-dependent moves upstream. Write the choice in the inventory so nobody duplicates it.
03
Connect the catalog and start the Google Shopping feed
The channel template lists every Google attribute, so transforms only go on the columns in your inventory.
What we set up: We connect your catalog and create the feed from the Google Shopping channel template.04
Write the upstream rules
One transform per column: combine for titles, replace from regexp for brand and HTML, advanced DSL for availability and identifier_exists, replace from Google Sheet for categories, add suffix for currency.
What we set up: We write one transform per column from your inventory and check each against a few real products.05
Write the remaining rules in Merchant Center
Data sources → primary source → Attribute rules → add rule → save draft → test → Apply changes → reprocess the data source. Needs the Advanced data source management add-on. This step is outside Textfinity.
06
Check the result before and after fetch
Upstream: the feed hygiene profile and the product explorer show each product's mapped output. In Merchant Center: the Needs attention tab after reprocessing.
What we set up: We run feed hygiene and walk through a sample of products in the product explorer with you.
Customization tips
Make it yours
Put rules that change meaning upstream, rules that patch values in Merchant Center
A title formula changes what the product is called everywhere; it belongs with the feed. A Find & Replace for one typo while the store fixes it belongs in Merchant Center and gets deleted next week.
Order matters in both places
Merchant Center cascades rules top to bottom and stops touching a product after Clear. Textfinity applies one transform per column, so 'strip HTML then combine' is two columns or one advanced expression, not two rules on one column.
Keep regex short and anchored
^ and $ prevent 'Nike' matching inside 'Nike Air'. Both Google's Find & Replace and Textfinity's replace from regexp accept them; a regex without anchors is the most common cause of a rule rewriting the wrong products.
Treat Take latest as a reason to fix the source, not a strategy
If two sources disagree on price often enough that you need Take latest, one source is stale. Fix the sync schedule upstream; the rule hides the symptom.
Downloads
Take the files
FAQ
Questions about merchant center feed rules template
Where are feed rules in Google Merchant Center now?
They are called attribute rules. Open Data sources, choose the primary product data source, and use the Attribute rules tab. They require the Advanced data source management add-on, which you enable under Add-ons in Settings. After applying a rule you reprocess the data source.
What operations do Merchant Center attribute rules support?
Data source operations: Set to, Set to multiple, Extract (with regex) and Take latest. Modification operations: Prepend, Append, Add repeated field, Optimize URL, Find & Replace (with regex), Calculate, Split & Choose and Clear. Each can carry conditions combined with AND or OR, and rules cascade in order.
Should I write feed rules in Merchant Center or in a feed tool?
In Merchant Center when the rule is Google-only and temporary. In a feed tool when the same logic should reach Meta, Microsoft or TikTok, when it needs a lookup table, or when it depends on data the store export lacks. Textfinity applies rules per feed and profiles the result before Merchant Center fetches it, but it does not read Merchant Center's diagnostics.
Can a feed rule add a missing GTIN?
No. A rule can only rearrange values already in the feed. It can set identifier_exists to 'no' when gtin is empty, which is what Google expects for products without a GTIN. To add real GTINs, join a supplier sheet onto the catalog by SKU: a supplemental source in Merchant Center or a merged source in a feed tool.
Set up for you
Have the twelve rules moved upstream and run on every sync.
Send us your catalog and your current Merchant Center rules. We rebuild them as transforms on a Google Shopping feed, and the same rules feed Meta and Microsoft.
Tell us your store and channels. We reply within 24 hours.