How-to guide

How to Clean Product Feed Data with Transformation Rules

Fix messy product feed data automatically: trim titles, fill blanks, add prefixes and format prices with Product Feed Master transformation rules on every sync.

Last verified · 4 min read

To clean product feed data in Product Feed Master, add a transformation rule to the field's mapping row: a chain of operations such as trim | uppercase that runs on the value every time the channel syncs. Rules fix whitespace, fill blank values, add prefixes and reformat numbers without touching your source system, so the cleanup never has to be repeated by hand.

Where transformation rules live

Every channel attachment has its own mapping rows. Each row has a from field, a to field and an optional transform: the chain of rules applied to the value on its way through (how field mapping works).

Because rules belong to a channel attachment, the same canonical value can be cleaned one way on import and shaped differently for each destination. A rule on an input channel changes what is stored in your feed; a rule on an output channel changes only what that destination receives (input vs. output channels).

How a rule chain is written

A transform is a list of operations separated by | and applied left to right. Operations that take an argument use a colon (prepend:SKU-), and operations with two arguments separate them with a comma (replace:old,new) (transformation rule reference).

The operations available today:

Rule What it does
trim (alias strip) Removes leading and trailing whitespace
uppercase / lowercase Changes the case of the whole value
prepend:value / append:value Adds text before or after the value
default:value Uses value only when the field is empty
static:value Replaces the value with value, ignoring the source
replace:from,to Replaces every occurrence of from with to
number_format:decimals Formats a number to fixed decimals (2 if omitted)

Recipes for common feed problems

Each recipe below is a transform you can paste into a mapping row.

Stray spaces in titles or identifiers. Exported spreadsheets often leave trailing spaces that make two identical values look different. Use trim on the title, and trim | uppercase on SKU-style identifiers to normalise them.

Prices with the wrong number of decimals. A price exported as 19.9 becomes 19.90 with number_format:2.

A currency symbol inside the price. replace:$, replaces every $ with nothing. Shopping channels such as Google expect the price as a number with a separate currency code rather than a symbol, as described in Google Merchant Center required attributes.

Blank fields that must not be blank. default:0 fills an empty quantity with 0 while leaving real values alone. Use default: with care on attributes a channel validates: a placeholder value can be worse than a missing one. Google, for example, rejects placeholders such as "N/A" in brand and gtin (GTIN, MPN and identifier_exists explained).

IDs that need a prefix. prepend:SKU- turns 1042 into SKU-1042, useful when two sources share numeric IDs.

A constant value for every product. static:new sends the same value for every product, for example a condition column for a store that only sells new goods.

Check the result before you publish

After saving a mapping, run Sync now on the channel and review the output: imported products on the feed for an input channel, or the destination file for an output channel. A rule chain runs in order, so if a result looks wrong, read the chain left to right; uppercase | prepend:sku- and prepend:sku- | uppercase give different results.

If a value needs a one-off correction rather than a rule, edit the product directly. Manual edits are protected from later imports (editing products).

Frequently asked questions

Do transformation rules change my source data?

No. Rules apply to values as they flow through Product Feed Master. Your Shopify store, spreadsheet or other source is not modified.

In what order do rules run?

Left to right, in the order they are written in the chain. Each rule receives the output of the one before it.

Can I use a different rule for each channel?

Yes. Rules belong to each channel's mapping rows, so the same field can be transformed differently for Google, Meta or any other output.

What happens to an empty mapping row?

Rows with an empty from or to are dropped when you save, so a blank row is a safe way to skip a field.

Sources

Product behaviour described in this guide comes from Product Feed Master's documentation: Transformation rule reference, How field mapping works, Input vs. output channels and Editing products.