Follow

Map Fields

Mapping data feed is a process of “translating” fields (attributes describing products) from the format provided by your shopping cart to:

  • the format required by a given channel
  • a format that better suits your commercial objectives

There are five primary ways to optimize your data feed:

You can then edit values of your products fields data. Here you can:

RENAME

You can change the name of an input field (a field from your shopping cart | input data feed) to the name that is required by the channel you are creating a data feed for.

Example:

Renaming “sku” to “id” will change the name of the input-field "sku" to an output-field "id" (so that it meets Google’s requirement) and that field will still contain the values of the input-field "sku" from your shopping cart | input data feed.
Rename.png

ADD STATIC VALUE

You can add a new field and populate it with the same, fixed value, for all the products or a different value for different products. Rule-based conditions will allow you to match static values with the right products.

Example:

You can map availability as a static value "in_stock" for products where quantity is greater than 0 and a static value "out_of_stock" for products where quantity less or equal to 0.

Although these two simple rules should cover all the products it is a good practice to always have an extra rule for other products (not included by the rules above) to make sure there are no empty values in the output feed.
add_static.png

COMBINE

You can combine multiple input fields and text fields into one output field. You can create conditions for each 'combination' or combine fields for some products and enter a single field for others.

Example:

Imagine you have two types of products: watches and cameras. Watches have nice names including brand, model and product type whereas for cameras, name = model. You would like to tune up the titles of your cameras in the output data feed by including brand and category.

You can achieve that by mapping Title as a combination of Brand, Name and Category and separating them by a space. However, you want to limit this only to cameras, as watches already include a brand and a product type in the name. Change "for all products" to "if" and add a condition: if category is equal to "cameras". For other products (watches) map title simply from name.

For a product where brand = "Sony", name = "Alpha A37", category = "camera" and separator = "space" the output field title would be "Sony Alpha A37 camera".

combine.png

Imagine you want to add a tracking code to your links where each product would be tracked as a separate source.

You can achieve that by combining the input field 'Product-URL' with the text field '?utm_source=' and the input field 'id' into the output field 'Link', using “none” as a separator.

For a product with product_URL = "http://camerastore.com/products/Sony_Alpha_A37" and id=378, the output field 'Link' would be: "http://camerastore.com/products/Sony_Alpha_A37?utm_source=378".
tracking.png

 

LOOKUP TABLE

If you want to provide fixed text for your products, you could use the Add static value option. However, if you need to have different value for every product or group of products, it would require a lot of rules.

Instead, you can upload a Google Spreadsheet or comma separated CSV files that we will process in order to match values from the list with your products. You need to prepare a file with 2 columns:

1. First column contains values that can be found in your input and allow us to identify your products or groups of products.
2. Second column contains values that you would like to provide for your products or group of products.

Example:

Imagine you have non-standard sizes in your input: Little, Small, Medium, Large and Big and you would like to have standard sizes: S, M and L in your output.

You need to prepare a spreadsheet with 2 columns: input values in the first one and corresponding values.
lookup_table_1.png

Save your spreadsheet as comma separated CSV or copy the shareable link of your Google spreadsheet. Then you need to select Use lookup table option and a field we should use to look for values from your first column. Upload your CSV file or provide the URL of Google Spreadsheet:

lookup_table_2.png

You can read more about it here:

How to do Bulk Edits in your Data Feeds

EXTRACT FROM

if you want to map one of attributes by extracting values from your input field, you could use 'Add static value' option with IF condition.

Example:

Let's say that you would like to map colors based on values that can be found in your descriptions.

In this case your rule could look like this: 
add_static_value_color.png

However, our new 'Extract from' option can help you to get the same result much faster.
First you need to create a list of values you would like to extract. It can be either .csv or .txt file with each value provided in a separate line:
list_color.png

Once your list is ready, select 'Extract from' option in DataFeedWatch and choose the field the system should use to look for the values from your list. Upload your list file - click the 'Add from drive' button. You can also connect Google Spreadsheet instead of a file uploaded manually.
extract_from.png

EDIT VALUES

There are 10 different ways to Edit the Values of your fields:

 

Overwrite

Overwrites the original values with new values. You can create conditions to specify for which products you want to do the overwrite. If you are combining a few fields you need to specify which field you want to overwrite.

Example:

Imagine you want to map field color from field hue. However, you noticed that some of the values are misspelled: gren instead of green. Of course you need to correct this in your shopping cart eventually, but for know you can use overwrite to correct the typo in the output feed.

Rename hue to color and click “edit values” button. In the first dropdown choose “overwrite”. Put “green” as a new value. Change “for all products” to “if” and add a condition: hue is equal to “green”.



Replace single value

Replaces any text in the original value with a new text. You can create conditions to specify for which products you want to replace something.

Example:

If you are combining a few fields, you need to specify in which field you want to make the replacement.

Some Channels do not accept exclamation marks in the product titles and descriptions. If you do have exclamation marks you can use the “replace single value” functionality to get rid of them.

Use rename as a mapping type for your title field and click the “edit values” button. In the first dropdown choose “replace single value”. Put “!” as the text you want to replace and “.” as the new text. Exclamation marks in product names will be replaced with dots.



2019-02-06_1647.png

As you can see there is also RegExp option. To read more about our feed regexp optimization go here:

RegExp Optimization

Replace multiple values

Replaces many different original values with new ones. You can create conditions to specify for which products you want to replace something.

To use this option you need to provide a lookup table with two columns:

1. Old values that need to be replaced.

2. New values.

Upload your list file - click the 'Add from drive' button. You can also connect Google Spreadsheet instead of a file uploaded manually.

2019-02-06_1523.png

With that solution, you can select as many incorrect values as you want and replace every one of them with chosen custom texts.

In this section you can find out what is the structure of lookup table:

Use lookup table

Remove single value

Removes a text from the original values. You can create conditions to specify for which products you want to remove something.

If you are combining a few fields you need to specify in which field you want the remove something.

Google doesn’t allow any promotional texts in product descriptions. Imagine you put “20% discount!” in the descriptions of all products where price is lower than $100 and “10% discount!” for all products where price is higher or equal to $100. You need to get rid of these promotional texts.

Use rename as a mapping type for your product description field and click “edit values” button. In the first dropdown choose “remove”. Put your first promotional text “20% discount!” in the input field. Change “for all products” to “if” and add a condition: if price is less than 100.

Next add a second rule; choose remove and put the second promotional text “10% discount!” in the input field. Change “for all products” to “if” and add a condition: if price is greater or equal to 100.

2019-02-06_1651.png

Remove multiple values

Removes many different original values with new ones. You can create conditions to specify for which products you want to replace something.

To use this option you need to provide a lookup table with ONLY one column - values that need to be removed. Such lookup table need to be in .csv or .txt formats and it should contain every value you want to remove in separate line:

2019-02-06_1603.png

Upload your list file - click the 'Add from drive' button. You can also connect Google Spreadsheet instead of a file uploaded manually.

2019-02-06_1605.png

Add prefix

Adds a text in front of the output fields’ values. You can create conditions to specify for which products you want to add a prefix.

Example:

Most of the CSEs require that product URLs contain a protocol (http or https). If your product URLs don’t include protocol you can use “add prefix” functionality.

Use rename as a mapping type for your product URL field and click “edit values” button. In the first dropdown choose “add prefix”. Put “http://” in the input box.

If you are not sure whether your product URLs include protocol or not change “for all products” to “if” and add a condition: product URL doesn’t include http://.

Add suffix

Adds a string at the end of the output fields’ values. You can create conditions to specify for which products you want to add a suffix.

Example:

Imagine you want to add a line “Wide range of colors and sizes available.” to the original descriptions of the t-shirts.

Use rename as a mapping type for your product description field and click the “edit values” button. In the first dropdown choose “add suffix”. Put “ Wide range of colors and sizes available.” in the input box. Change “for all products” to “if” and add a condition: if category is equal to t-shirts.


Recalculate

Recalculates the original values. There are four available operations: addition, subtraction, multiplication and division. You can create conditions to specify for which products you want to recalculate. Please note, that recalculation cannot be performed on non-numerical values.

Example:

Imagine you want to add 100 grams to your product weight (expressed in grams) in order to create the shipping weight values.

Use rename as a mapping type for your shipping weight field and click the “edit values” button. In the first dropdown choose “recalculate”. In the second dropdown choose “add” Put “100” in the input box.



Recapitalize

Enables you to change your text to uppercase, lowercase or capitalized. You can select the length of words that you would like to apply your changes to. What is more, you can create conditions to specify for which products you want to recapitalize.

Example:

Imagine you want to change your title from 'GPS TRACKER' to 'GPS Tracker'.

Use rename as a mapping type for your title field and click the “edit values” button. In the first dropdown choose “recapitalize”. In the second dropdown choose “capitalized” Put “3” in the input box. As a result 'GPS' will not be modified, bur 'TRACKER' will be changed to 'Tracker'


Round

Enables you to round numbers. You have option here to choose to which place round should be applied (Ex. choosing 3 will leave you with number rounded to 3 digits). What is more, you can create conditions to specify for which products you want to to round those number fields.

Example:

Imagine that you have recalculated your price by multiplying it with 0.17 (great sale -83%!). Your 176 $ price changes into 29,92 $. It does not look good, you do not want any cents in your price. Lets round it to whole dollars:

2019-02-06_1636.png

Now all the prices are rounded to whole dollars (30 $)!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

  • Avatar
    Niamh Katee

    Wow thanks for sharing. It will help me in my new business of Logo Design Firm. Highly Appreciated.
    https://www.designvation.com

Powered by Zendesk