The special "attributes" field

or send an email to support@doofinder.com

In this article

The initial problem

When the type of the feed you provide to Doofinder is a CSV and you have a very wide range of categories for different products, you would require, in the first thought, a very long header line to specify all those categories fields

Let's see an example: imagine that your successful e-commerce has a really big stock of very different products. You sell T-Shirts which you want to categorize by size, color, style, fabric among others but you also sell laptops and other electronic devices which have screen size, hard drive size, hard drive type, Video Card manufacturer, etc (and besides the common price, brand, category, etc. that all products have). If this is the case, your feed's header would look like this:

title|link|description|id|price|image link|brand|category|size|color|style|fabric|screen size|hdd size|hdd type|video manufacturer

and that list of attributes could be longer than you can imagine. Furthermore, most items would have a colection of separators with empty values for those categories that don't make sense for them. For example, a laptop item would look like this:

Toshiba Satellite L755|www.mygreatshop.com/laptop/toshibaL755.html|A powerfull laptop with the best price you could find out there|1425|300.00|www.mygreatshop.com/img/toshibaL755|Toshiba|Laptops|||||17"|500Gb|Magnetic|NVidia

attributes to the rescue

Here is where the attributes field takes sense. you could have a header line like this:

title|link|description|id|price|image link|brand|category|attributes

That short!

Then you would just need to define the relevant attributes for each product. Our laptop would look like this:

Toshiba Satellite L755|www.mygreatshop.com/laptop/toshibaL755.html|A powerfull laptop with the best price you could find out there|1425|300.00|www.mygreatshop.com/img/toshibaL755|Toshiba|Laptops|screen size=17/hdd size=500Gb/hdd type=Magnetic/video card=NVidia

and Doofinder will dynamicaly take that last field and transform it to a group of fields for each separate attribute you defined for that item. This way, every new item that you add to your feed, if it requires a new attribute, wont require you to change the header or add empty values for that field on all other items.

The general schema

Putting it short, you can add dynamic attributes to your products on a CSV feed by using the special field name attributes and adding to each product the relevant attributes with the schema (...)|attribute-name=value/other-attribute=value2/third-attribute=value3|(...) and Doofinder will smartly separate them into diferent fields.

Note the use of slashes (/) to separate different attributes for the same item

That is what dynamic attributes are good for!