CSV files format
Overview
You can include information about interactions, client metadata, or both in the same CSV file. Sitefinity Insight uses the name of the headers to understand what kind of information is contained in a CSV file. If you include information about both interactions and client metadata, Sitefinity Insight will import both in one operation.
If you create a CSV import file mixing different kind of records, it may contain records only for interactions, only for client metadata, and records combining the two data sets. In the first two cases, the rules of the CSV files require that you create empty fields for the information which is not part of the record. To learn more about the terms used in this article, see Developer terminology.
EXAMPLE: In the following sample file, you can see an example of an import CSV file containing combined records (lines 2-4), a record for interactions data only (line 5), and a record for client metadata (line 6). You may use it as a template for constructing your import CSV files. The meaning of the different columns is explained below.
CSVUniqueId,Predicate,Object,Timestamp,Email,FirstName,LastName,Country,Company,JobTitle,Gender,Address,Phone 33FBFEF96ED4,Visit,http://docs.sitefinity.com/insight,2021-02-01T09:15:33.250Z,jbutt@gmail.com,James,Butt,UK,"Benton, John B Jr",,,"6649 N Blue Gum St, New Orleans",504-621-8927 72995DDCDA33,Visit,http://docs.sitefinity.com/insight/persona-profiles,2021-02-01T16:07:22.433Z,josephine_darakjy@darakjy.org,Josephine,Darakjy,UK,"Chanay, Jeffrey A Esq",,,"4 B Blue Ridge Blvd, Brighton",810-292-9388 DA9FB79D6741,Visit,http://docs.sitefinity.com/insight/lead-scoring-rules,2021-02-03T00:01:02.000Z,art@venere.org,Art,Venere,UK,"Chemel, James L Cpa",,,"8 W Cerritos Ave #54, Bridgeport",856-636-8749 522C2DEA6F1A,Visit,http://docs.sitefinity.com/insight/contacts-know-your-audience,2021-02-04T10:00:00.000Z,,,,,,,,, F8774126B7CC,,,2021-02-04T10:00:00.000Z,donette.foller@cox.net,Donette,Foller,UK,Printing Dimensions,,,"34 Center St, Hamilton",513-570-1893
Interactions columns
If you want to record interactions in the CSV file that you want to upload, it must have the following columns with the following headers:
UniqueId
Required for both Interactions and Client metadata recordsPredicate
Required for Interactions recordsTimestamp
Required for both Interactions and Client metadata recordsObject
Optional for Interactions records
If you are uploading only interactions, then your file must contain data in these columns only. If you want to upload client metadata in addition or instead of an interaction, then after these columns, you can create additional columns (headers).
Client metadata columns
When creating a custom column containing client metadata, there are the following requirements for the column header name:
-
The header name cannot be empty or consisting only of a whitespace.
-
Header names are not case-sensitive.
-
Sitefinity Insight ignores any leading and ending whitespace characters.
-
The names of the custom headers must be maximum 32 characters long.
-
Headers can contain custom names that you create. For the name, you can use any string except UniqueId, Predicate, Object, and Timestamp.
EXAMPLE: Email, First Name, Last name, Address.
If your CSV file contains both interactions and client metadata, but you want this record to contain only client metadata, you must leave the Predicate and Object columns empty, and fill out only the custom columns that you have created.
NOTE: If you fill out both the columns for interactions and the columns for client metadata, you can upload both interactions and client metadata with the same CSV file. Regardless of whether you are uploading an interaction or a metadata, your records must have the
UniqueIdcolumn filled out.
Create record values
When creating the record values, keep in mind the following requirements:
| Header | Requirements |
UniqueId |
|
Predicate |
|
Object |
|
Timestamp |
|
Client metadata values - Text |
|
Client metadata values - Number |
|
Client metadata values - Date |
|
Client metadata values – Yes/No |
|
NOTE: Sitefinity Insight ignores any leading and ending whitespace characters in filed values. To represent a comma in a value, enclose the value in double quotes.
Leading and ending whitespace characters outside the double quotes will cause the value to become unreadable. Remove any such characters before importing the file.
Sitefinity Insight considers a record to be valid if there is either value for the UniqueId attribute and either a Predicate attribute or at least one non-empty Client Metadata value.
Examples
To review examples of valid CSV import files, see the following samples:
- Client metadata:
CSV
UniqueId,Email,FirstName,LastName,Country,Company,JobTitle,Gender,Address,Phone 744BCF11,jbutt@gmail.com,James,Butt,UK,"Benton, John B Jr",,,"6649 N Blue Gum St, New Orleans",504-621-8927 14D9A28B,josephine_darakjy@darakjy.org,Josephine,Darakjy,UK,"Chanay, Jeffrey A Esq",,,"4 B Blue Ridge Blvd, Brighton",810-292-9388 9D43BF48,art@venere.org,Art,Venere,UK,"Chemel, James L Cpa",,,"8 W Cerritos Ave #54, Bridgeport",856-636-8749 5FC6D093,,Lenna,Paprocki,UK,Feltz Printing Service,,,"639 Main St, Anchorage",907-385-4412 8ECCF3C4,donette.foller@cox.net,Donette,Foller,,,,,,513-570-1893 - Interactions:
CSV
UniqueID,Predicate,Object,Timestamp 744BCF11,Visit,http://docs.sitefinity.com/insight,2021-02-01T09:15:33.250Z 14D9A28B,Visit,http://docs.sitefinity.com/insight/persona-profiles,2021-02-01T16:07:22.433Z 9D43BF48,Visit,http://docs.sitefinity.com/insight/lead-scoring-rules,2021-02-03T00:01:02.000Z 5FC6D093,Visit,http://docs.sitefinity.com/insight/contacts-know-your-audience,2021-02-04T10:00:00.000Z 8ECCF3C4,Visit,http://docs.sitefinity.com/insight/csv-files-format,2021-02-04T10:00:00.000Z - Combined data – both client metadata and interactions:
CSV
UniqueId,Predicate,Object,Timestamp,Email,FirstName,LastName,Country,Company,JobTitle,Gender,Address,Phone 33FBFEF96ED4,Visit,http://docs.sitefinity.com/insight,2021-02-01T09:15:33.250Z,jbutt@gmail.com,James,Butt,UK,"Benton, John B Jr",,,"6649 N Blue Gum St, New Orleans",504-621-8927 72995DDCDA33,Visit,http://docs.sitefinity.com/insight/persona-profiles,2021-02-01T16:07:22.433Z,josephine_darakjy@darakjy.org,Josephine,Darakjy,UK,"Chanay, Jeffrey A Esq",,,"4 B Blue Ridge Blvd, Brighton",810-292-9388 DA9FB79D6741,Visit,http://docs.sitefinity.com/insight/lead-scoring-rules,2021-02-03T00:01:02.000Z,art@venere.org,Art,Venere,UK,"Chemel, James L Cpa",,,"8 W Cerritos Ave #54, Bridgeport",856-636-8749 522C2DEA6F1A,Visit,http://docs.sitefinity.com/insight/contacts-know-your-audience,2021-02-04T10:00:00.000Z,,,,,,,,, F8774126B7CC,,,2021-02-04T10:00:00.000Z,donette.foller@cox.net,Donette,Foller,UK,Printing Dimensions,,,"34 Center St, Hamilton",513-570-1893