The following guide describes how to make data integration with MarketingPlatform’s One-to-Many functionality using JSON files via FTP or sFTP.
In order to set up the integration, you will need to set up a connector in MarketingPlatform that will retrieve the required data uploaded to the FTP/sFTP server from an external system, such as a client’s CRM system, webshop, etc.
For more information on how to integrate using CSV or XML files, please refer to the following articles:
Files in JSON format are capable of storing deep data and as such, they are often used to store customer related deep data e.g. order data.
Below you will find an example of a JSON file containing customer order data (see image below). This type of data should be stored in an OTM type data field in the platform.
The file contains customer data coming from an external system, such as:
- email address
- first name
- order name
- order surname
- order date
- order ID, etc.
In order to retrieve the data to MarketingPlatform you will need to create a connector and map the OTM field/s against the JSON file and according to the data fields included in your list in MarketingPlatform. Mapping them correctly will ensure that each contact’s data in MarketingPlatform is being properly updated with the data from the JSON file i.e. data coming from an external system to the FTP server.
Access Integration -> Connector in the side Menu on the left and click on Create a Connector.
Select the corresponding list and name your connector.
Next, select the type of connection (FTP or sFTP) and log in with your FTP/sFTP credentials:
- Directory path
Click on Connect to FTP server and select the corresponding FTP file (endpoint). Below, you will also find an option to manually set up the synchronization frequency of the connector if needed.
Click on Test Connection to check if you are able to establish a connection with your file directory on the server – you should be able to see the email address/mobile data field fetched from the server.
Next, click on Continue Mapping to map the fields from your list with the data from your JSON file.
Set MarketingPlatform Key Field and Key Field from Connecting System to be either email address or mobile phone depending on how your contacts are being added to the list.
If you have previously created/mapped your OTM field and included it in your list, you can select it under Select Data Field. Otherwise, select Create OTM field from connected system and click on the button Map One-To-Many to map the customer data from your JSON file (see image below).
Note that you must select the appropriate unique key while mapping the OTMDataField, as well as for all other objects in your structure. In this example, the appropriate unique key for the OTMDataField will be the ID of the customer, as one ID will have one or more orders associated with it. That being said, it makes sense to use the ID as a unique key so that the connector can retrieve all data for each of the customers and keep it appropriately updated and organized.
Under Advanced Import Settings, you can set the confirmation/subscription status of the profiles (contacts) being retrieved via the connector and choose to insert new profiles and/or update existing, as well as other settings available (see image below), such as adding the profiles to an existing Autoresponder.
If needed, you can also apply filters to filter the data retrieved by the connector that is to be included in your list.
Once you are done setting up the connector, click on Save and it will be automatically activated and start its first run.
How contact data is saved
To view the data retrieved by the connector, go to your list and click on the View Profiles icon or access your profiles by clicking on Profiles > View Profiles and select your list.
Next, click on the orderdata tab to see the OTM order data that has been retrieved for the specific profile, as shown in the image below.
If you click on any of the data objects you will see the OTM data associated with it, e.g. by clicking on Orders, you will see the OrderName, OrderSurname, OrderData and OrderID corresponding to the example shown.