Clean up variant colors and sizes in your Shopify product feed without Liquid
Variant options in Shopify grow over years. One product line says Size: XL, an older one says size: xl, a supplier import brought Extra large, and somewhere a color is called BLK-01 because that is how it came from the warehouse system. In the store nobody notices, because the shopper sees the product page and the photos. In a product feed, those values travel on their own, and channels read them literally.
This article explains why messy option values cost you visibility, what channels such as Google and price comparison sites expect, and how to fix the values in the feed with Option and Metafield mapping in Feedyio, without touching your Shopify products and without writing Liquid.
Why option values matter in a product feed
When a feed sends a color or a size, the channel uses it for more than display:
- Filters. Price comparison sites and marketplaces build filters from parameters. If the same size arrives as "XL", "xl" and "Extra large", those are three different filter values, and a shopper who ticks one of them misses two thirds of your products.
- Variant grouping. Google groups variants with the same item group ID and tells them apart by color, size and similar attributes. Values that are unclear or inconsistent make that grouping harder.
- Validation. Some values are rejected outright. Google, for example, does not accept a hex code such as
#fff000or a number as a color.
The fix is not always to rename products in Shopify. Your option values may be exactly right for your storefront and your team, and a bulk edit across hundreds of products is risky. What you need is a translation layer between your shop and each channel.
What Google expects from color and size
Google publishes clear rules for the color attribute. The most important ones for option values:
- Submit a color for every product that varies by color, one color value per variant.
- Use the same color name that appears on your landing page.
- For multicolor items, separate up to three colors with a slash, primary color first, for example
Red/Green/Black. Commas are not a separator. - No numbers, no codes such as
#fff000, no single letters, and no values that are not colors, such as "N/A" or "see image". - Up to 100 characters in total and 40 per color.
The landing page rule is worth repeating: mapping is not a way to give Google a different color name than your shop shows. It is the way to turn internal codes, typos and inconsistent spelling into the clean name the shopper actually sees, and to put multicolor values in the format Google asks for.
Sizes are less strict, but consistency still decides how well filtering and grouping work. "M", "m" and "Medium " with a trailing space should end up as one value.
How variant options get into the feed today
Feedyio already sends variant options in two ways:
- Automatic parameters. On channels with parameters, such as Heureka, Zboží, Glami or Google, the setting "Create attributes/params from variant options automatically" sends each option as a parameter, for example
PARAM_NAMESize andVALM on Heureka. It is on by default. - A field from an option. In "Additional fields for feed" you can fill any channel field, such as Google's
g:colororg:size, from a variant option with the "Option" source.
Both send the option value as it is. Until now, changing it meant Liquid with a replace for every single value. That works for three values and becomes unmanageable for thirty.
Option and Metafield mapping: one table instead of Liquid
Option and Metafield mapping is a source for any feed field. You pick the options to read, Feedyio lists every value they have in your shop, and you type the value the channel should get next to each one.
Step 1: add the field
- Open your feed and go to Additional fields for feed.
- Click Create Field and choose the channel field, for example Color (
g:color) in a Google feed, or a PARAM with a parameter name on Heureka. - In the case, set Source to Option and Metafield mapping.
Step 2: pick the sources
Under Sources, pick one or more options of your products, up to 10. This helps when the same thing lives under different option names, for example "Color" on newer products and "Colour" or "Barva" on older ones. The order is the priority: for each variant, the first option that has a value is used.
Step 3: map the values
The Values table lists every value of the selected options in your shop with the number of Products that use it, so you can start with the ones that matter most. Up to 500 values are listed; you can search, filter by All, Unmapped or Mapped, and add a value manually if it is not in the list yet. Type the target next to each Shopify value:
BLK-01→BlackRed / Black→Red/BlackExtra large→XL
Letter case and surrounding spaces are ignored by default (Matching options), so "xl" and "XL " are matched by one rule. If a mapped value stops being used in your shop, the row is marked Not in shop and you can remove it.
Step 4: decide what happens with the rest
Unmapped values covers values you did not map:
- Keep the original value: good when only a few values need fixing.
- Leave empty (attribute is skipped): good when the channel should only get values you have checked.
- Use the default value: sends the value from Set default value.
Values are matched as they are in your shop's primary language. When you keep the original value, the feed gets it in the feed's language, translated if you use translations.
Use one mapping in every feed
If you send colors to Google, Meta and a price comparison site, you do not want to maintain the same table three times. Create a rule in the Library with a single "All products" case and Option and Metafield mapping as its value, then add it to each feed with Add shared rule. When you add a new color to the mapping, every feed that uses the rule picks it up at its next rebuild. More about shared conditions and rules on the filters and rules page.
Automatic parameters and your own values together
A common question: if automatic parameters already send "Size", and I add my own "Size" parameter with mapped values, do I get it twice? No. A custom parameter with the same name replaces the automatic one, and a custom parameter with an empty value removes it. So you can keep the automatic parameters for everything else and override just the one that needs cleaning up.
Tips before you start
- Start with the biggest values. The Products column shows where a fix helps most.
- Check your landing pages for Google. Map codes and typos to the name the shopper sees, not to a different name.
- Prefer "Keep the original value" at first, then switch to "Leave empty" once the table is complete, if the channel should only get checked values.
- Look at the feed preview after saving to see the values a few products really get.
FAQ
Does mapping change my products in Shopify?
No. It only changes what goes into the feed. Your option values in Shopify stay as they are.
Can I map metafields or CSV columns?
Metafields, yes. Under Sources you can also pick product metafields of the type single line text or metaobject reference, including lists. For a metaobject you choose which of its fields is matched, and a list is mapped item by item. CSV columns, no: columns of a Custom CSV feed and -- XML Elements -- fields do not offer the mapping. It works in the cases of "Additional fields for feed" and in rules in the Library.
What if a variant has none of the selected options?
Then the setting for unmapped values applies: the field is left out, or it gets your default value if you chose "Use the default value".
Can different feeds get different values?
Yes. Each field has its own mapping. Use a shared rule only where the values should be the same everywhere.
Clean option values are one of the quickest wins in a product feed: better filters, cleaner variant groups and fewer rejected items, without editing your catalog. Try Feedyio on the Shopify App Store.
