Try it

Data mapping

Sortyra team · · 3 min read

Field mapping is the assignment that decides which data from one feed belongs in which field of another format. For example, a supplier's "Price incl. VAT" column is assigned to the PRICE_VAT field for Heureka or g:price for Google. Without mapping, the system wouldn't know which value is the price and which is the product code.

What is field mapping

Every supplier, online shop and channel names its data in its own way. One sends the price in a cena_s_dph element, another in a "Price incl. VAT" column, and Heureka wants it in PRICE_VAT. Mapping is a translation dictionary between these forms: "whatever you have in box A, write in box B".

Mapping can be simple (one field to one field) or more complex:

  • first non-empty field – if the sale price is missing, use the regular price,
  • combining several fields – the main image and additional images into one list,
  • building from text – a code assembled from a prefix and the original code, for example DOD-SPAC-310,
  • converting values – "in stock" to in_stock for Google.

What it looks like in a feed

<!-- Input from the supplier -->
<produkt>
  <kod>SPAC-310</kod>
  <nazov>Horal Mumia 300 sleeping bag</nazov>
  <cena_s_dph>79,90</cena_s_dph>
</produkt>

<!-- After mapping for Heureka -->
<SHOPITEM>
  <ITEM_ID>SPAC-310</ITEM_ID>
  <PRODUCTNAME>Horal Mumia 300 sleeping bag</PRODUCTNAME>
  <PRICE_VAT>79.90</PRICE_VAT>
</SHOPITEM>

The same data got new element names, and the price is now written with a decimal point.

What it is used for

  • Importing goods from suppliers into an online shop – the wholesaler's fields are assigned to your shop's fields.
  • Combining several suppliers into one catalogue in which all products have the same structure.
  • Outputs for channels – the same catalogue is mapped once to Heureka's format, another time to Google's or Meta's.

What to watch out for

  • Similar fields. The price excluding VAT mapped instead of the price including VAT, or the purchase price instead of the selling price, are expensive mistakes.
  • Number and unit formats. A decimal comma, grams instead of kilograms or a different currency must be converted during mapping.
  • A change in the supplier's structure. When a supplier renames a column, the mapped field suddenly ends up empty.
  • Forgotten fields. An unmapped EAN or brand means poorer matching on comparison sites.
  • Categories are a separate task – assigning the supplier's categories to your category tree is a mapping of its own.

How Sortyra helps

When you add a source, Sortyra suggests a mapping based on both the names and the content of the fields. In Sources you click Edit on the source, and on the Mapping tab you choose a Value source for each Target field – from the feed's fields or with a template, for example DOD-%CODE%. The Preview with this mapping button shows side by side the data As sent by the supplier and what it will be After mapping.

Frequently asked questions

Do I have to set up mapping every time the feed updates?

No. Mapping is set once and used at every subsequent download, until the supplier changes the feed's structure.

What is the difference between field mapping and category mapping?

Field mapping decides where each piece of data belongs (price, title, EAN). Category mapping decides which category of the channel or of your shop a product belongs in.

Try it on your own feed