This article explains the steps to be taken to import return data inside Datatrics. Using this import function, a return status will be added to previously imported conversions (through an integration or a custom conversion import).
Required data
To effectively import return data, you only need two fields per returned product:
conversion ID
Product (item) ID
Underneath, there are XML and CSV example files that could be used to upload return data.
CSV example:
"conversion_id", "product_id"
"13232", "401"
"23234", β839β
"23234", β932β
XML example:
<return>
<conversionid>13232</conversionid>
<productid>401</productid>
</return>
<return>
<conversionid>23234</conversionid>
<productid>839</productid>
</return>
Start the import
Go to project settings and press 'Custom Importer' to start the import. The following page should become visible:
Press the 'Create Import' button to start the next step.
Import return data
Within the next step, you will see the following page:
Select "Returns" here and give the import a fitting name. Special characters and spaces will be removed from the name. The source name that will be assigned is added below the import name.
After selecting the type and assigning the source name, click on the Next button.
Uploading CSV or XML
Now there are two options available, uploading a CSV file from your local machine or loading a URL that points to the XML feed:
CSV
When pressing the 'upload file' option, your file explorer should open, and you will be able to select a CSV file containing the conversions.
XML
When pressing the URL option a screen with different options that need to be filled in will appear.
The first option is 'Element', this is the name of the field that contains the item. When taking the XML example from the beginning of this article, that would be "return". Check your file to make sure that you select the correct element name.
The second is "Resource Location". This expects the URL that points to the XML feed. After filling in the URL, it will try to retrieve the feed. Based on the response you will get a popup message saying it succeeded or failed.
If the imported data is a correct URL, the option to select a frequency cap will be visible. The feed may change or have additional data every so often. Based on this, you can choose the frequency of how often the return import should be done.
If the correct element has been chosen or the CSV file has been read correctly, a dropdown menu will appear, enabling you to select the unique identifier for the given return. Select the correct id here (this will mostly be "conversionid" or "transactionid").
XML & CSV: selecting source, conversion & product
If the CSV file has been read correctly or the correct element has been chosen for the XML upload, a few dropdowns will appear, enabling you to select the source, conversion, and product.
Source
Select which source is used for the conversions to match the return data.
Conversions
Select which attribute is used for the returned conversion IDs.
Product
Select which attribute is used for the returned product IDs.
Return data field mapping
After selecting the fields above, you can proceed to the next step, where an overview of how we've matched the fields is presented. No further action is required here, you can proceed to the next step.
Start import
The last remaining step is starting the import. Do this by clicking the green 'start import' button.
You can use the uploaded return data for targeting in the audience section within a few hours.