Examples

Merchant Center feed rules examples

Google renamed feed rules to attribute rules. They transform product data inside Merchant Center after the feed arrives: combine columns, find and replace words, calculate prices, tag URLs, split category paths, clear junk values. Below are seven worked examples, one per operation, each with the Merchant Center rule and the equivalent rule in a feed tool, so you can decide where the logic should live.

We connect your store, build the feed and keep it in sync. Updated 2026-10-27.

At a glance

  • "Feed rules" are now "attribute rules". You need the Advanced data source management add-on, then Data sources → a product source → Attribute rules → Add attribute rule.
  • Data source operations: Set to, Set to multiple, Extract, Take latest. Modifications: Prepend, Append, Add repeated field, Optimize URL, Find & Replace, Calculate, Split & Choose, Clear.
  • Rules run in order (cascading), can carry AND/OR conditions, are saved as drafts, tested with Test rules and only apply after Apply changes and a reprocess.
  • The same logic can live in the feed instead. Textfinity maps each output column with rename, combine, regex, Google Sheet lookups or an advanced expression before Merchant Center sees the file.

Merchant Center feed rules: each operation and its feed equivalent

Attribute rule operationWhat it doesTextfinity equivalent
Set toFill from a column, a static value or a concatenationrename, add static value, combine, advanced
ExtractPull matching words from another attributeextract from google sheet, replace from regexp
Take latestNewest price or availability across sourcesMerged source plus advanced (every product needs a row in the merged source)
Prepend / AppendAdd text before or afteradd prefix, add suffix
Find & ReplaceSwap words, optionally regexreplace from regexp, remove from regexp, replace from google sheet
CalculateAdd, subtract, multiply, divideadvanced with calc{} and round()
Split & ChoosePick nodes from a listreplace from regexp
Optimize URLAdd or remove URL parametersadvanced with an includes check
ClearEmpty a valueleave empty with a condition

Operations from Google Merchant Center Help, Set up your attribute rules, checked 2026-10-27.

Where to find feed rules in the new Merchant Center

In Merchant Center, attribute rules are behind the Advanced data source management add-on. Once it is on, go to Data sources, open a primary product source, and select the Attribute rules tab. Pick the target attribute, add data source operations or modifications, optionally add conditions, then save as draft. Test rules shows the draft value on sample products before you apply.

Rules apply in sequence, so a Find & Replace placed after a Set to works on the combined value. Conditions compare against data source or processed attributes; Google notes that prices in conditions are entered as plain numbers without currency, and that equals needs an exact match (13.00 is not 13).

Google Shopping feed rules in Merchant Center or in the feed?

  • Merchant Center rules suit small fixes on a feed you cannot change, such as a platform app that owns the primary feed.
  • Feed-side rules suit logic you also need on other channels: the same title formula or category cleanup applied to Meta, Snapchat and Microsoft feeds, instead of rebuilt in each tool.
  • Feed-side rules can read data Merchant Center never sees, such as cost from a spreadsheet for margin labels, without uploading it as a supplemental source.
  • Neither replaces the diagnostics: disapprovals still show in Merchant Center, and Textfinity does not import them.

Examples

Worked examples, by situation

Each example is a different vertical and operation. The first line of the snippet is the Merchant Center attribute rule; the second is the Textfinity mapping that produces the same output.

Fashion · Set to · brand missing from titles

Put the brand in front of the title

Before

title: Linen Shirt - Sand - M
brand: Marlow

After

title: Marlow Linen Shirt - Sand - M

Merchant Center / Textfinity

GMC: Set title to: feed.brand + " " + feed.title
TF:  title = combine brand, title
     delimiter " "

How we set it up

We map title as a combine of brand and title with a space as delimiter. If some titles already contain the brand, the brand appears twice. Merchant Center needs a condition for that; we use an advanced rule instead, since it can compare two columns: if [title] includes [brand] then [title] else [brand] + " " + [title].

Footwear · Find & Replace · search terms

Swap a store term for the search term

Before

title: Leather pumps, block heel, black

After

title: Leather pump heels, block heel, black

Merchant Center / Textfinity

GMC: title → Find & Replace "pumps" with
     "pump heels" (whole words only)
TF:  title = replace from regexp
     find \bpumps\b  replace "pump heels"

How we set it up

Google's own example of Find & Replace. We use replace from regexp with a word boundary to do the same; regex replacements use \1-style backreferences when part of the match has to stay.

Electronics · Calculate · 15% promotion

sale_price as a percentage of price

Before

price: 199.00 EUR

After

sale_price: 169.15 EUR

Merchant Center / Textfinity

GMC: Set sale_price to price, Calculate
     multiply by 0.85
TF:  sale_price = advanced
     round(calc{[price] * 0.85}, 2) + " EUR"

How we set it up

We write sale_price as an advanced rule; calc reads the first number in the value, so "199.00 EUR" works. The landing page must show the same reduced price, so the rule is switched off when the promotion ends, or conditioned on a promo tag.

Home goods · Optimize URL · campaign tracking

UTM parameters on the landing page URL

Before

link: https://shop.example.com/p/lamp-01

After

link: https://shop.example.com/p/lamp-01?utm_source=google&utm_medium=shopping

Textfinity advanced transform on link

if [link] includes "?"
then [link] + "&utm_source=google&utm_medium=shopping"
else [link] + "?utm_source=google&utm_medium=shopping"

How we set it up

Merchant Center's Optimize URL adds parameters to link or ads_redirect and handles ? versus & for you. We write the advanced expression above, which makes the same choice explicitly.

Garden tools · Split & Choose · category path

Keep only the last node of the category

Before

product_type: Home & Garden > Tools > Pruning Shears

After

custom_label_1: Pruning Shears

Merchant Center / Textfinity

GMC: Split product_type on ">", select last
TF:  custom_label_1 = replace from
     regexp  find ^.*>\s*  replace ""

How we set it up

The regex removes everything up to the last >. Google's example then appends the leaf to the title; in Textfinity, one transform per column means we either use the leaf as a label like this or build the title in one advanced expression.

Fashion · Extract · color hidden in titles

Pull the color out of the title

Before

title: Wool Scarf Navy 180 cm
color: (empty)

After

color: Navy

How we set it up

Merchant Center: Set color to title with Extract and a list of colors, keep first match. Textfinity: we map color with extract from google sheet, with the color list in column A of the sheet's first tab; it returns the first listed color found in the title, so longer names (Light Blue) go above shorter ones (Blue).

Marketplace import · Clear · placeholder values

Remove n/a brands and GTINs

Before

brand: n/a
gtin: 0000000000000

After

brand: Hallberg (from vendor)
gtin: (empty)

How we set it up

Merchant Center's Clear empties the value and stops further rules for that product. In Textfinity we map brand by rename from vendor with the condition brand is equal to n/a, else rename brand, and leave gtin empty when gtin matches regexp 0+$. Brand is required for new products, so we fill it rather than clear it.

Copy this plan

Plan: move your rules into one place

Whether you keep rules in Merchant Center or in the feed, write them down first.

  1. 01

    List the rules you already have

    Open each attribute in the Attribute rules tab and copy the operations and conditions into a sheet. This happens in Merchant Center.

  2. 02

    Decide where each rule lives

    Keep channel-specific fixes in Merchant Center if you prefer; move anything shared by several channels into the feed.

  3. 03

    Recreate the shared rules in the feed

    Use the table above to translate each operation into a mapping transform or a filter rule.

    What we set up: We rebuild each shared rule as a combine, replace from regexp or advanced mapping, or as a filter rule.
  4. 04

    Compare outputs product by product

    Check the feed's output against Merchant Center's active value for a sample of products before switching off the old rule.

    What we set up: We compare the per-product mapping output in the product explorer with you.
  5. 05

    Switch off the duplicates

    Delete or disable the Merchant Center rule once the feed produces the same value, so the two do not apply the change twice. This happens in Merchant Center.

Customization tips

Make it yours

Double application is the classic bug

If the feed already prefixes the brand and a Merchant Center rule prefixes it again, titles read "Marlow Marlow Linen Shirt". Move a rule, then remove the old one the same day.

Regex is anchored differently in different places

Textfinity's replace from regexp and its filter "matches regexp" match anywhere in the value, while the mapping condition "matches regexp" is anchored at the start. Write ^ explicitly wherever you mean the start, and test a sample before relying on a pattern copied from another tool.

Keep calculations close to the data

A Calculate rule in Merchant Center that multiplies price for a promotion is easy to forget. In the feed it can be conditioned on a promo column the merchandiser controls.

FAQ

Questions about merchant center feed rules examples

Where are feed rules in Google Merchant Center?

They are now called attribute rules. Turn on the Advanced data source management add-on, then go to Data sources, select a product source and open the Attribute rules tab.

What can Merchant Center attribute rules do?

Set an attribute from columns or static values, extract words, take the latest price or availability, prepend, append, add repeated values, optimize URLs, find and replace (including regex), calculate, split and choose list nodes, and clear values, each with optional conditions.

Do Merchant Center rules change my feed file?

No. They change the product data inside Merchant Center after each fetch or upload. The source file stays the same, so other channels using that file do not get the fixes.

Can I test a rule before applying it?

Yes. Rules are saved as drafts, and Test rules previews the draft value on sample products. Apply changes saves them, and they take effect on the next processed upload.

Set up for you

Have your feed rules written once and used on every channel.

Send us your store and a list of your Merchant Center rules. We recreate them as mappings and send the same cleaned data to Google, Meta and Snapchat.

Have us move your rulesOr email support@textfinity.io

Tell us your store and channels. We reply within 24 hours.