skip to Main Content

The imported file is processed in the following sequence:

The Import type can be:

  • JSON – no conversion is necessary
  • CSV – comma separated items. First line needs to have column names. No conversion necessary.
  • XML – No conversion necessary. If the fields are named differently than e.g. <item>, then you can insert the name in the field “itemElementName”.
  • Google Product Feed v1 XML – Has fields with a prefix “g:”, e.g. <g:id>. These prefixes are removed automatically by Persoo. Format is converted to the Persoo format. Additional fields are changed from “camel_case” to “camelCase”
  • Google Product Feed v2 XML – Same as v1, but does not have “g:” prefixes.
  • Heuréka Product Feed XML – Persoo runs conversion to the required format. E.g. “PRODUCT_NAME” is renamed to “title”. Additional fields are converted to a  camelCase standard.

Your own fuction

Which gets the import item (now in JSON format) and returns it in the format you want for the Persoo DB.

This function is generally useful for:

  • Creating a new field derived from the existing onesvytvořit nový field odvozený z ostatních
    • E.g. if the title contains name of the brand/color, and this information is not available elsewhere, you can pull it from here.
    • “New” item might be defined as released in the last two weeks. You can fill this field by using the field of release date.
  • Changing the field format
  • Changing the structure e.g. from item.x.y.z to item.z.
  • Anything else JS allows

You can choose from which import variables should the values be taken.  Additionally, you can choose the data type.

If the data received does not match the data type, it will try to convert it (e.g. “123” string to a number 123). If the type conversion does not work, the import will return an error.

Earlier processed products are saved into the table “productVariants” under a key “itemID”.

“productVariants” are in the same format as you’ve imported them (there are no additional data).

There is a mandatory key “itemID” for every product. Another key, “itemGroupID” is optional. Items with the same “itemGroupID” belong to the same product group. One group then contains product variants, such as different sizes or colors of clothing.

The group representative is selected in this step. Persoo works with this representative in the recommendations.

How is the representative selected?

If some of the items contains field “isMaster:true” or if the “itemID = “itemGroupID”, this item is elected as the representative. In other cases, the item with lexicographically smallest “itemID” is chosen.

The value “itemGroupID” can be completely different from the “itemID” (but it must be different from all “itemID” except the one from it’s group).

Example 1 (itemGroupID is also a master itemID):

Item i123 is chosen as the representative of the group.

Example 2 (itemGroupID is different than itemID):

Since the first row does not contain a value for “isMaster”, it is by default considered as “false”.
If exactly one item in the group has “isMaster:true”, then it is chosen as Master.
If none of those items have “isMaster:true”, the item “i122” will be chosen as Master.

Persoo calculates certains fields to each product, such as view rate, sell rate, connections to other products viewed with this one, products sold with this one etc.

Certain classifiers are also calculated, such as the price group “low”, “med”, “high” depending on it’s price compared to the other products of the same Product type.

Final JSONs with products are saved to the table “products” and are available for other use.

Back To Top
×Close search
Search