Managing item catalogs

There are two kinds of feeds for recommendations in Synerise:

The possibility of introducing the IDs of item attributes, which lets you group item variants in terms of their feature such as colors, sizes, models is available upon Synerise support request.

Requirements for item catalogs


Limitations


  • The name of the item catalog must be an alphanumeric string without any special characters nor whitespaces, following this regex pattern: [a-zA-Z0-9]*.

  • Item attribute names must be an alphanumeric string without whitespaces, following this regex pattern ^[_a-zA-Z0-9]+[\-_a-zA-Z0-9]*$.

  • Item attribute string values must be alphanumeric. They can’t contain following characters:

    • " - quotation mark
    • ’ - inverted comma
    • . - dot
    • , - comma
    • space or any whitespace character

    Therefore, complex.name is forbidden and you should rather use camelCase: complexName (preferred) or underscore format: complex_name.

  • Attribute names are case-sensitive.

  • Synerise accepts any properly formatted JSON which contains itemId and with proper key names. Later, item attributes are being returned by the API without changing or parsing values, which also applies to HTML/XML tags as values. You should handle the raw data retrieved from API in a way that will avoid the risk of XSS attack.

Format


The format of an item is a JSON. Each object represents an item with its attributes, for instance:

{
    "itemId": "Xa34ad3d",
    "intAttribute": 5,
    "floatAttribute": 2.5124,
    "stringAttribute": "asfdqw",
    "timestampAttribute": 1356846157,
    "booleanAttribute": true,
    "arrayOfStringsAttribute": ["A", "B", "C"],
    "nestedObject": {
        "a": 1,
        "b": "value"
    },
    "nestedObjectsArray": [
        {
            "x": "y"
        }
    ]
}

Attributes


Required attributes

Accepted attribute values

  • string: "foo"
  • integer: 12
  • float: 12.34
  • boolean: true/false
  • nested objects: { "sub": { "a1": "v1", "a2": "v2" } }
  • array (of strings, integers, floats, booleans, nested objects, arrays): ["foo", "bar"]
  • timestamp: should be formatted as Unix timestamp, for example, 1356846157
  • date: 2024-01-01T10:00:00Z or Unix timestamp (12345664000) sent as a string

Item availability attribute


If you want to include the item availability attribute (availability) in your item catalog, the attribute’s value must be a boolean.

Category attribute


category is a special attribute which is used to define the hierarchy of categories which an item belongs to. It must have the following format:

X > Y > Z

Where X is a top level category and Z is the lowest category level. For example, Electronics > Phone and Smartphones > Smartphones. Category levels should be joined with > (literally space>space). When you have an item which belongs to more than one category, you can pass the additionalCategories field in the following format:

"additionalCategories": ["A > B > C", "D > E > F"]

Both category and additionalCategories are used when you filter by categories.

Unique identifier


Each item (each JSON document) must contain an itemId field which is a reserved key used as a unique item identifier. Its value type must be a string and it’s case sensitive. As itemId is an item identifier it is specially treated:

  • It is always returned by search API
  • It is always returned by recommendations API
  • Events (especially page.visit and transaction.charge) should contain matching itemID

Item feed

There are two ways to import an item feed to Synerise:

  • Create a catalog, prepare an XML file, and set the automatic import of the feed to a catalog (the imported element is later referred to as an item catalog).
  • Import Google Merchant feed.
    Before you submit your Google Merchant feed to Synerise, you can use external XML schema validator tools to make sure that the file does not contain errors.
Important: An item may represent a product, an article, a movie, an entry in documentation, and so on.
WARNING: We recommend using Google Merchant XML instead of XML files due to the size limits (an XML file cannot exceed 10 MB).

Requirements for Google Merchant feed


For instructions on building a Google Merchant Center XML file compatible with Synerise, see Google Merchant Center XML item feed.

Metadata catalog


The metadata catalog is used to enrich the standard item feed or catalog for section page and attribute recommendation campaigns. This catalog must contain the itemId column, which is the unique value of the attribute. For example, in a catalog that stores categories (category is an attribute), the values in the itemId may include “Hoodie”, “Longsleeve”, “T-shirt”, and so on.

Typically, the catalog contains at least an image that is used as the recommendation tile and the URL of the recommended attribute or category. It can also store data such as descriptions of the attribute (“This category includes the comfiest hoodies”), an alternative title that you want to show in the recommendation (“Comfy hoodies”), and any other data that your implementation requires.

This catalog is usually uploaded as a CSV file.

Metadata for attribute recommendations

Attribute recommendations do not recommend items from the feed or catalog. Instead, they recommend attribute values. When you recommend attribute values, the catalog must contain at least the itemId (the attribute value) and an image link.

Metadata for section recommendations

Section page recommendations recommend both attribute values and items within those values. The metadata catalog enriches the sections that correspond to attribute values (for example brands or categories).

Example:

An attribute recommendation is used to recommend categories. Each category value (for example, “Hoodies”) in the recommendation frame should be displayed with an image that illustrates it.

The link to the image (such as a hoodie for the “Hoodie” category) must be provided in the metadata catalog so it can be shown in the recommendation. You can then use that image in the recommendation frame as a tile that links to the “Hoodie” category page. In the recommendation response, this is what a single recommended category could look like:

        {
            "itemId": "Hoodies",
            "image": "/yourcdn.com/hoodie.png"
            "link": "/yourstore?category=hoodies"
            ...//  additional data from the metadata catalog, if you added some
        },

Example:

An attribute recommendation is used to recommend brands: BRAND1, BRAND2, BRAND3.

Each brand needs an image which represents it, and a link to that image is stored in the metadata catalog, where the brand name is the itemId. When you make a recommendation request and all three brands are recommended, the returned data will be similar to this:

{
    "data": [
        {
            "itemId": "BRAND1",
            "link": "/yourstore?brand=brand1",
            "image": "/yourcdn.com/brand1.png"
            ...//  additional data from the metadata catalog, if you added some
        },
        {
            "itemId": "BRAND2",
            "link": "/yourstore?brand=brand2",
            "image": "/yourcdn.com/brand2.png"
            ...//  additional data from the metadata catalog, if you added some
        },
        {
            "itemId": "BRAND3",
            "link": "/yourstore?brand=brand3",
            "image": "/yourcdn.com/brand3.png"
            ...//  additional data from the metadata catalog, if you added some
        }
    ]
}

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker