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 four ways to optimize your data feed:
- Add static value
- Edit values
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.
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.
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 match static values with the right products.
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.
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.
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".
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".
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.
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.
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:
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. For 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:
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:
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.
This option is available for 2 mapping types: Rename and Combine. It allows you to rewrite original values in addition to mapping fields.
There are 7 different ways to Edit the Values of your fields:
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.
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”.
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. 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” 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”. Put “!” as the text you want to replace and “.” as the new text. Exclamation marks in product names will be replaced with dots.
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.
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://.
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.
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.
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.
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.
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.
If you are using our new rules you will see this view:
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.
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'
If you are using our new rules you will see this view: