Manual import
To import data using a file upload:
Go to Data > Custom data.
Select the data table you want to add data to.
Select the Import data tab.
Select MANUAL IMPORT to open the Upload Data menu.
Select browse and choose the file you want to upload, or drag and drop the file.
Under Upload options, if you want to replace all data in the table with the data from the file, select the Replace all data checkbox.
To instead append the new data to the existing data, leave the checkbox clear.
Select IMPORT.
Import channel
To set up an automated FTP import channel for a custom data table:
Go to Data > Custom data.
Select the data table you want to add data to.
Select the Import data tab.
Select IMPORT CHANNELS FOR DATA TABLES.
Under Set up a new channel, expand the drop-down menu and choose the data table you want to import to.
Select CREATE IMPORT CHANNEL.
On the next page, specify the settings for the import channel.
Refer to the section Custom data table import settings below for more information. For FTP import channel settings, consult your IT team if you’re unsure.
Select SAVE.
Custom data table import settings
Setting | Description |
Channel name | An easy-to-remember name for your channel. |
FTP type | The type of FTP. For large files (10 MB or more), we recommend using FTPes. |
FTP host | The address of your FTP server. |
FTP port | The FTP port used:
If you're not sure what port you need to use, leave this field empty or to its default value, or contact your ESP or FTP support provider. |
FTP username | The username for connecting to your FTP server. |
FTP password | The password for connecting to your FTP server. |
FTP interval | The number of minutes between runs. We suggest 60, which means the FTP server is accessed every 60 minutes. |
FTP directory | Where files on your FTP server are read from. |
FTP allowed files pattern | The file pattern allowed on the FTP server, for example, A comma separated list is accepted, for example, CSV and TSV formats are supported. Import filenames specified on segments which import from this channel are also read from the FTP server. |
FTP field mapping | The JSON object that describes how fields from the CSV are mapped into the custom data table. All field names are case sensitive. The outer key contains the logical field names (the field names that go into the system).
Each field is an object which contains an You must include all the fields you want to import in the field mapping, even if both values are the same. You can also specify a date_format to go with a date field as follows: |
Import type | The type of import method:
|
Is service paused? | Optionally, select this checkbox to stop the import task from running. |
API import
You can also use the Fresh Relevance API to import data to a custom data table.
CSV file field mappings
You can’t create field mappings using this method. Only the data in the CSV file is uploaded.
To do this:
To create an API access token, expand the User menu, and go to Settings > Other Integrations > Fresh Relevance Access Tokens.
Either:
Create a new token and copy the token’s name and key for later.
Learn more in Create and edit API access tokens.Copy an existing token’s name and key for later.
Make a POST request to
/api/<website_id>/custom_data_tables/import/<table_id>/
You can include the token as either:
A header. For example,
HTTP_X_API_KEY
.A query parameter.
For example, api_token
.
Add the CSV file you want to import to the form-data of the request under the
key files[]
.Provide the key
importType
, which is either append or replace, depending on which option you want.
View import jobs
To view all current and scheduled custom data table import jobs, either:
Go to Data > Custom data.
Select the data table you want to add data to.
Select the Import data tab.
Select IMPORT JOBS.
or:
Expand the User menu.
Go to Settings > Imports > Custom data tables import jobs.
Next steps: Use custom data