The Custom importer makes it possible to quickly load simple feeds into Datatrics. These feeds can contain content items, conversions, and profiles. Imported content can for example be used for product recommendations. The expected file types for the custom importer are .csv or .xml.
1. What should my files look like?
Two different types of files can be used for the importer (.csv and .xml). Below you will find an example of both file types and the structure that is expected.
1.1 CSV file
A CSV file (values separated by commas) is a special file type that you can create or edit in Microsoft Excel or Google Spreadsheets for example. Make sure that the separator is a comma, there are options for different separators but only commas are accepted.
Example of a file:
id,name,description,price #The header of the CSV file
1,test name,short description,12.50 #A row with values
The names in the header must be unique. For example, there can’t be "id,id" in the header.
1.2 XML file
The other accepted file type is XML. XML syntax is made up of formal markup languages that allow structured data to be displayed in the form of plain text. Its presentation is both machine-readable and readable by humans.
Below you can find an example of what a XML feed should look like for our Importer.
<?xml version="1.0" encoding="UTF-8"?>
<item> #element name used for the importer
Check this article to view an example of an e-commerce feed.
When importing an XML file, the element name is requested. The example above has a #comment on the element name you need to enter there. This is where the element (that is seen as a separate item) starts.
As mentioned before, you can import content items, conversions, and profiles, you can find the documentation for each type below: