Mapping tells Feedsmith how to fill each channel field for each product. You do it on the channel's Map fields tab. Global store fields work the same way. See Global store fields.
The tab lists the channel's fields in three groups, Required fields, Recommended fields and Optional fields. A field with no rules shows "Not mapped" and is left empty.
If a required field has no rule, the page shows "1 required field isn't mapped", and Feedsmith won't build a new feed until you map it.
Feedsmith fills the fields from the top of the list to the bottom. A rule can use a channel field that's higher in the list, e.g. output:title, but not one lower down.
Each field has one or more rules. A rule has three parts.
product_type includes Shoes. See Conditions.title, or Add static value new. See Mapping types.For each product, Feedsmith goes down the rules and uses the first rule that applies. It ignores the rules below it. If no rule applies, the field is empty.
So a rule for All products after one or more Only if rules works as "otherwise". The editor labels it Otherwise.
For example, the title field could have these rules:
product_type is equal to Gift Card. Add static value Kiwi Outdoor Co Gift Card.vendor, a space and title.| Product | product_type | Result |
|---|---|---|
| Gift card | Gift Card | Kiwi Outdoor Co Gift Card |
| T-shirt | T-Shirts | Kiwi Outdoor Co Merino Crew Tee |
A rule for All products always applies, so any rule below it is never used. The editor warns you with "Never used: an earlier rule already covers all products". Move the All products rule to the bottom with the arrows.
Some channel fields can hold several values, e.g. Google's product_highlight, additional_image_link and excluded_destination. For these, tick Use every matching rule (one value each) on the field. Feedsmith then uses every rule that applies, not just the first one, and each rule adds one value. Rules after the first are labelled Also.
For example, product_highlight could have these rules:
tags includes merino. Add static value 100% New Zealand merino.tags includes machine-washable. Add static value Machine washable.Free returns within 30 days.A product tagged merino, machine-washable gets three values. A product with neither tag gets one. Rules that give an empty value add nothing.
How the values appear depends on the feed format:
<g:product_highlight> elements.{{output:product_highlight}}, the values are separated by a comma and a space.Click the eye icon (Preview) on a field to test it. Feedsmith shows 15 random products with:
Click Shuffle for 15 other products, or search for a product by any value, e.g. a SKU. The preview uses your unsaved changes, so you can test before you save.
Your changes aren't saved until you click Save changes. Click Discard changes to go back to the saved mapping. After you save, Feedsmith rebuilds the feed a few seconds later.