Overview
When entering the Output mapping section of a feed you are presented with a list of all the output fields that are available for mapping. The list is grouped by the type of output field. Showing all the required fields first, followed by the recommended fields and then the optional fields.
Mapping a field
When mapping a field you have many options to choose from. The first thing you must decide is the Block Type. For required fields you can only choose value, but for recommended and optional fields you can choose from all four block types.
Block Types
- Value - A value block means that what ever is output from the mapping will be included in the feed.
- Value or omit - A value or omit block means that what ever is output from the mapping will be included in the feed, unless the value is empty. Then the tag will be omitted from the feed.
- Leave empty - The output tag will be left empty. For instance
<g:id></g:id>
- Omit - The output tag will be omitted from the feed.
Value
The value is the actual value that will be output in the feed. The value can be a static value, a dynamic attribute from the product or a combination of both.
If you hit the plus icon you can add more values that will be combined into one value.
When you have more values you can change the order of them by dragging them up and down with the handle in the left side.
Mutations
By clicking the pencil icon to the right of the value you can add mutations to the value. Mutations are used to change the value in some way. For instance you can change the case of the value, or you can add a prefix or suffix to the value.
This will open the mutation modal where you can add mutations to the value. Mutations are applied in order from top to bottom. This means you can transform the value in many ways.
Each mutation can also have rules that determine if the mutation should be applied or not. For instance you can add a rule that says that the mutation should only be applied if the value is not empty.
Rules
Rules are used to determine if a mapping should be applied or not. For instance you can add a rule that says that the mapping should only be applied if the value is not empty.
Rules can get quite complex, so you have the abillity to precisely control how your feed should be generated.
Let's look at the example above. This example uses AND
,OR
, Not
and a Group
In the example we want to construct our title as [title] - Size: [size].
However we don't want to that for every product, so we have some rules to control the behaviour.
The rules means: The title must include 'Nike' and not include either 'Air Max' or 'Free Run'.
As you can imagine the rules can be more complex or simple depending on what you need.