How to structure your catalogue (Feed)

Created by Pedro Ondiviela · last update June 10, 2020

What is this about?

Your catalogue is very important to us and we want to make the most of it!

Before sending a catalogue, with the data of all the products and associated behaviour of these, a series of steps should be important to take into account so that Empathy can recognize it.

Format

First, the feed files must be sent in XML/Json format or Zip containing them.

Encoding of the file should be “utf-8”

Feed types

There can be two types:

  • Catalog (complete feed):

    • One with all languages → must have a field language inside
    • One per language
  • Deltas: types:

    • Update data (replace invalid data by new ones)
    • Delete data.
    • Insert data.

Required fields

There are some minimum required fields needed to be valid:

  • ID: identifier of each product: Must be unique
  • Name: String of the name of a product (should have sense)
  • Image:

    - Check url (should not be broken or partial)

    - Sizes of them

  • Product url: Check url (should not be broken or partial)
  • Price: Number format
  • Category: Must follow a hierarchy (see example below)
  • Language, can be:

    - One feed for one language

    - One feed with all the languages: the content MUST have a field language

NOTE: None of them should be empty.

Desired fields

And some desired fields would be also great to be included:

  • Category id: A unique value for the category
  • Description: Must be specific for the product
  • Sale price: Number format
  • Color:

    - Css value format

    - Common name (blue instead of aquamarina)

  • Aditional image
  • Brand

Let us see an example of this in xml

Example in JSON format

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
[
    {
        "id_product": "119040",
        "id_manufacturer": "323",
        "reference": "119040-0",
        "name": "The Mandalorian t-shirt Star Wars retro",
        "link": "https://www.customer.com/the-mandalorian-t-shirt-star-wars-retro.html",
        "includes": "",
        "description": "T-shirt with the mandalorian symbol, so you can show the power of force",
        "brand": "Disney",
        "image": "https://www.customer.com/media/i/img_397.jpg",
        "thumb": "https://www.customer.com/media/i/cache/image/240x240/q3df78eab93725d0gs685fb8d27136e9p/i/m/img_397.jpg",
        "visualizations": "0",
        "conversion_rate": "0",
        "sales_period": "0.000",
        "sales_total": "0",
        "available_date": "",
        "stock": 0,
        "colour": "grey",
        "discount_type": "",
        "tematicas": [
            {
                "id": "370",
                "name": "Star Wars"
            },
            {
                "id": "1968",
                "name": "The Mandalorian"
            }
        ],
        "category": [
            {
                "id": "292",
                "name": "Ropa"
            },
            {
                "id": "293",
                "name": "T-shirts & Shirts"
            },
            {
                "id": "358",
                "name": "Merchandising"
            },
            {
                "id": "446",
                "name": "Fashion"
            }
        ],
        "price": 19.99,
        "price_discounted": 16.99,
        "skus": [
            {
                "id_product_attribute": "0934751",
                "reference": "119040-119234",
                "visualizations": null,
                "conversion_rate": "0.0000",
                "sales_period": "0",
                "sales_total": null,
                "available_date": "",
                "size": "S",
                "stock": "0"
            }
        ]
    }
]

When is a feed not valid?

  • Incorrect format: tags to close, missing commas….
  • Incorrect codification: of characters inside feeds

If these instructions are followed it will be much easier to start working with a proper feed. :)