Custom data tables offer a flexible and powerful way to store and utilize customer-specific information. This data can then be used to enhance targeting and deliver personalized content to your customers using SmartBlocks.
1. Create a custom data table
Go to Data > Custom Data.
Select CREATE DATA TABLE and enter the following details:
Name
Enter the table’s name.Table ID
Enter the table’s ID or select Make Table ID after entering a name to autofill this field.Type
Expand the Type drop-down menu and choose the table type: Custom, Brands, or Categories.
Select CREATE.
2. Create table fields
Fields allow you to define the types of data you want to store in your table. There are four data type you can choose from when creating a field: String, Number, Date, or URL.
To create a field:
Select CREATE TABLE FIELD and enter the following details:
Name
Enter the field’s name.Field ID
Enter the field’s ID or select Make Field ID after entering a name to autofill this field.Field Type
Expand the Field Type drop-down menu and select the type of data the field stores.
Select CREATE.
Edit a table field
Expand the field settings icon (⋮) menu and select the edit icon.
Change the name or field type.
Select SAVE.
You can’t change the field’s ID once it’s been created.
Delete a table field
⚠️ When a table field is deleted, any data stored under that field is also deleted.
To delete a table field, expand the Show options (…) menu for the field, and then select Delete.
3. Select a lookup field
To use the table, you need to select a lookup field. A lookup field is used to link the data in your custom data table to another location where this data is used, usually a SmartBlock. As such, the field you select as a lookup field should allow you to uniquely identify a particular record set.
For example, if you had a set of data about football stadiums that you wanted to add to a custom data table:
Stadium ID | Stadium name | Club name | Location |
1 | Emirates | Arsenal | London |
2 | Etihad | Manchester City | Manchester |
3 | Old Trafford | Manchester United | Manchester |
you should use Stadium ID as your lookup field, as this value is unique for each data set.
Then, when you want to use this data in a SmartBlock, you use stadiumid
as the lookup field for the SmartBlock and identify its value from a merge field, person data, or product data.
The SmartBlock lookup field value is used to pull any of the related data values from the Custom data table, such as Stadium name, into a Jinja-enabled field.
Learn more in Use Custom data tables in SmartBlocks.
To set your lookup field:
Select SAVE to open the Lookup field menu.
Expand the Lookup field drop-down menu and choose a field.
You can select Save without a Lookup field, but you can’t use the table until you set a lookup field. To set one later, edit the Custom data table, select the field you want to use, then select SAVE.
Select SAVE.
You can’t change a lookup field once it’s saved.
4. Import data
You can either manually import data to your Custom data table with a CSV file upload, or import data using an import channel.
Manual import
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.
You can choose if you want the upload to append or replace data in the table:
To append new data to the table, clear the Replace All Data checkbox.
To replace all data in the table, select the Replace All Data checkbox.
Select IMPORT.
Import channel
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 User Name | The user name 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 entering a value of 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, d*.csv. A comma separated list is accepted, for example, d*.csv,t*.csv - you must specify a pattern, such as person*.csv, transaction*.csv, product_import*.csv.
CSV and TSV formats are supported. Import filenames specified on segments which import from this channel are also be 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 they are the same.
You can also specify a date_format to go with a date field as follows:
If you don’t specify a date format, we try to automatically recognize it for the import. |
Import Type | The type of import method:
|
Is Service Paused? | Optionally select this checkbox to stop this import. |
Import using the Fresh Relevance API
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 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 import jobs, select Import Jobs.
To view Custom data table import jobs, expand the User menu, and go to Settings > Imports > Custom Data Tables Import Jobs.
View data
To view the Custom data table’s data, while editing the table, select the View Data tab.
Select the download icon in the top right corner of the table to download the data.
Properties
To view the Custom data table’s details, select the Properties tab.