Skip to content

Auto Mapping

The Hello Retail system will attempt to automatically index whatever product data you deliver in your product feed. It will do this based on two things;

  • Does the key of a provided key-value pair resemble the name of a native Hello Retail data field?
  • What data type is the key of a provided key-value pair?
  • If a key of a provided key-value pair resembles the name of a native Hello Retail data field, the Hello Retail feed reader will automatically attempt to map this field to the native Hello Retail data field;

You provide a key-value pair where the key is named imgUrl. Hello Retail has a native data field called imgUrl, so the Hello Retail feed reader has automatically mapped this key-value pair to imgUrl.

If a key of a provided key-value pair does not resemble the name of any native Hello Retail data field, the Hello Retail feed reader will attempt to automatically map this key-value pair based on its data type.

- You provide a key-value pair where the key is named type. Hello Retail does not have a native data field called type, so the Hello Retail feed reader has taken note of which data type this is (a string) and proceeded to map this key-value pair as an extraData, where the provided key name is reused as the property name of this mapped value in the extraData object.

As a rule of thumb, this is how the Hello Retail feed reader attempts to automatically map data; - any key-value pair that does not resemble a native Hello Retail data field, and is a string or boolean, will automatically be mapped as extraData. - any key value pair that does not resemble a native Hello Retail data field, and is an array, will automatically be mapped as extraDataList.

The automapping happens due to this selector: "automapping selector"

This is simply the Hello Retail feed reader utilizing the JavaScript spread operator but with a slight twist on our end that allows us to control where the spread values should be mapped to (extraData or extraDataList). Should you encounter a data field that is mapped automatically as an extraData, when you in fact wanted it mapped as an extraDataList, you can overwrite this automapping for the specific data field like so: "automapping override"

Hello Retail product feeds are able to ingest the following data types nested in the objects of the product array;

  • String
  • Number
  • Boolean
  • Array

❗ Hello Retail also parses Object data types nested within the objects of the product array, but will de-structure the data prior to indexing.