The following guide describes how to make data integration with MarketingPlatform’s One-to-Many module using CSV files via FTP or sFTP.
CSV files
Example 1:
In this example, you can see in the first file, that each contact has a customer_id. Each customer_id in the second file will have one or more orders. We simply find all orders associated with a given customer_id and link all orders to the email address associated with the customer_id.
Example 2:
It is important to point out that the nature of the CSV file only allows flat data fields, as seen in the example below. It cannot store JSON data or anything else in these cells.
As you can see in the image above, the contact erik+1@emailplatform.com has order_id 1 and order_id 3. But you can’t see the details of the order such as which products, what date, total amount, shipping status, etc. that each order has. This is the limitation of CSV files.
Therefore, there is often an extra sheet where information on the individual orders is detailed as below:
Here you can see all the details of the orders.
Notice that the order_id is what binds the 2 sheets together.
If we look at the first sheet again, we can see that erik+1@emailplatform.com is represented several times in the sheet. Normally we would consider this as a duplicate contact. But when we know that the sheet will be used to create One-to-Many data, it is quite natural that the contact is represented several times.
Setting up the Connector
Login first with your (s)FTP details.
Select your CSV or in this case multiple files. In this case there are 2 files: custom.csv file which contains customer data and ord.csv which contains order data.
If you have more than one file, you must specify which ‘tag’ name combines the two sheets. In the example mentioned, it was the order_id, which is specified in the FTP file (endpoint 2) line.
You can now map flat fields from the custom.csv file containing customer data.
And then map One-to-Many from the ord.csv file, which contains the word data.
How contacts are saved
If you follow the above example with the 2 files in the corresponding data, you will then see the 2 contacts in the list.
And erik+2 should have fields from the custom.csv file.
And order data from ord.csv.