Introduction
Data Bridge is a functionality which allows you to import automatically queue items from a remote CSV file through FTP.
Setup Bridge
On the Distribution Section click on the Bridge icon:
You should be able to see the Bridge dialog:
Step 1: Server Settings
On the above panel type in all the server information:
NOTE: Make sure you have read our IPs for firewall whitelist and enabled these IPs, if necessary.
After you finish, click on the "Test Connection" to see if a Connection was successful. Make sure you save the Bridge Settings at least once before testing the connection:
Step 2: File Settings
The next step of the Bridge Setup is to determine:
- The path of the file
- The load frequency
File Path
Select the name of the file would be exported from your server. The path should be the absolute path inside the server filesystem:
✔️Correct:
/var/www/e-satisfaction.com/uploads/esatisfaction/bridge/items.csv
❌Wrong:
https://www.e-satisfaction.com/uploads/esatisfaction/bridge/items.csv
ftp://johndoe@127.0.0.1/uploads/esatisfaction/bridge/items.csv
The file path can include a set of time variables to separate files if you don't want to replace the old file each time:
Variable | Description | Values / Examples |
%Y | Year | 1950, 2019, 2050 |
%m | Month with leading zeros | 01-12 |
%d | Day of the Month with leading zeros | 01-31 |
%H | Hour of the day in 24h format with leading zeros | 00-23 |
For example, the path:
/path/to/file/queue-items-%Y-%m-%d.csv
will be translated (given the date is May 12th 2019) to:
/path/to/file/queue-items-2019-05-12.csv
Or if you plan to upload a file every few hours, you can use the following:
/path/to/file/queue-items-%Y-%m-%d-%H.csv
which will be translated to (given the date is May 12th 2019 and time is 14:00):
/path/to/file/queue-items-2019-05-12-14.csv
Start Time and Frequency
After setting your file settings, you should configure when to start importing the file and with what frequency.
Column Mapping (optional)
Usually CSV files are created with a specific structure. e-satisfaction accepts a specific CSV structure with a standard set of columns, as they are described in Add Queue Items: CSV File.
However, some systems export files with a specific structure and it can be hard to change. For this reason you can configure the Bridge Settings to map your columns with required columns from e-satisfaction:
Expected Value: The e-satisfaction column
Real Value: Your column
For example, if your csv includes an email, an order_id and an order_date, you can add the following column mappings:
And this is how the csv should look like:
email,send_time,order_id,order_date
john@doe.com,2019-03-18 16:30,TR123SDF,2019-03-10 13:30
jane@doe.com,2019-03-18 17:30,TRSDF165,2019-03-10 14:30
Retrieve Data
After saving the bridge, it automatically retrieves data from the server as scheduled.
You can also manually retrieve data by clicking on the "Retrieve Data" button on the bottom right of the bridge configuration dialog.
Bridge Logs
When retrieving data, a log record is created to track executions, both successful and errors. You should be able to see the logs by clicking on the "Logs" tab of the dialog: