Providing CSV data to Lexer

Not all systems have APIs or JSON data export tools allowing for simple data handling. So if you have data from spreadsheets, competitions, forms, or something as simple as a purchased list of customer records, CSV imports might be a suitable backup to get data into your CDXP.

With that in mind, the most common use case for CSV data transfers into a CDXP is for customer data, which leads us to an example for a fictional competition:

[.code] email, marketing opt in, favorite destination
fake@fake.com, true, New York
fake2@fake2.com, false, London
[.code]

Steps to provide CSV data to Lexer

  1. Review the columns of your CSV data, are they well labeled? Is there any unnecessary data?
    [.in]- Feel free to reach out to your Account Manager for help in validating the use cases against data provided.[.in]
  2. Generate your CSV file, and check that the data is clean and matches the formatting rules below.
  3. Name the file as per the naming convention below.
  4. Determine the process for delivering the data.[.in]
    [.in]- SFTP/S3: Upload using SFTP or Upload using S3[.in]
    [.in]- File Uploader: Read File Upload API for specifics.[.in]
    [.in]- Custom: Chat with your Lexer contact.[.in]
  5. Transfer the data.
  6. Notify with your Lexer contact.

File naming

Files must be named using the following format: 

[.code]{content_descriptor}-{date}-{version}.csv[.code] 

This format consists of the following three parts:

  1. Content Descriptor: A short description of the files contents, separated by an underscore `_`.
  2. Date: An ISO8601 date for the file, reflecting the contents or date of file generation.
  3. Version: An optional version identifier. We recommend using versions. This allows you to easily revert to an old file if you identify any issues with the current version.

File names are case-sensitive, and may not contain special characters other than an hyphen '-', or an underscore '_'.

File naming examples

Let’s look at an example for a fictional competition made on August 29th, 2022:

  • [.code]summer_holiday_compeition_results-20220829.csv[.code]

In the case where a file might need to be overwritten with a newer version, you can add an additional suffix. This will update the file currently being used, while keeping the old file: 

  • [.code]summer_holiday_compeition_results-20220829-a.csv[.code]
  • [.code]summer_holiday_compeition_results-20220829-b.csv[.code]

The higher suffix will cause the newer version to be used in place of previous versions. In these examples [.code]summer_holiday_compeition_results-20220829-a.csv[.code] will be ignored, and [.code]summer_holiday_compeition_results-20220829-b.csv[.code] used.

Equally, you could simply delete the [.code]summer_holiday_compeition_results-20220829-a.csv[.code] file entirely if necessary, although this is not the recommended option.

Formatting your CSV

Column values

Column values should not exceed 1,000 characters. Any characters over this limit may be trimmed.

Double-quote values with commas

If a value contains a comma `,` it must be surrounded by double-quotes to ensure the integrity of the CSV columns. We recommend putting all values in double-quotes.
We use the standards, outlined in RFC4180, for double quotes used to enclose fields. Use a doubled double quote `""`, to indicate a double quote character in the data, and enclose this with double quotes. 

For example:

[.code]"aaa","b""bb","ccc"[.code]

Column names and order

Ensure that column names are well defined for their use for later reference.

The order of the columns does not matter, but we recommend placing identifiers in the first column to help navigate throughout the file if necessary. 

File encoding

We recommend UTF-8 (without BOM encoding).

Normalize empty values

Some rows might not contain a value for each column. Make sure that these columns are empty and do not contain placeholder values such as "null", "empty", "blank", etc.

Need some help?

If you are having any issues with this process please reach out to your Success Manager of Lexer Support.

Updated:
October 14, 2022
Did this page help you?
Thank you! Your feedback has been received!
Oops! Something went wrong while submitting the form, for assistance please contact support@lexer.io
Welcome to Lexer!
Fundamentals
Getting started
Our glossary
Fundamentals
Getting started
Integrations
Fundamentals
Setup
My account
Fundamentals
Setup
Manage team
Fundamentals
Setup
Group permissions
Fundamentals
Setup
Classifications
Fundamentals
Setup
Out of the box segments
Fundamentals
Setup
Browser guide
Fundamentals
Security
Corporate networks
Fundamentals
Security
Emergency contact
Fundamentals
Security
Multi-factor authentication
Fundamentals
Security
Single sign-on
Fundamentals
Security
Trust and compliance
Fundamentals
Security
Lexer's Identity Resolution
Fundamentals
Identity Resolution
Troubleshooting tech issues
Fundamentals
Troubleshooting
Error code: 503 Service Unavailable
Fundamentals
Troubleshooting
Error code: 401 Unauthorized
Fundamentals
Troubleshooting
Error code: 403 Forbidden
Fundamentals
Troubleshooting
Troubleshooting Activate
Fundamentals
Troubleshooting
Troubleshooting Respond
Fundamentals
Troubleshooting
Help! My data is missing from the Hub
Fundamentals
Troubleshooting
Understanding APIs at Lexer
Data
Data Onboarding
Providing JSON data to Lexer
Data
Data Onboarding
Providing CSV data to Lexer
Data
Data Onboarding
Upload using SFTP
Data
Data Onboarding
Upload using S3
Data
Data Onboarding
Lexer data specification
Data
Lexer Data Specification
Customer data specification
Data
Lexer Data Specification
Commerce data specification
Data
Lexer Data Specification
Marketing data specification
Data
Lexer Data Specification
Compliance data specification
Data
Lexer Data Specification
Data Formatting and Validation
Data
Getting Started with APIs
Authentication and API token creation
Data
Getting Started with APIs
Rate Limits
Data
Getting Started with APIs
Response codes and common errors
Data
Getting Started with APIs
Product imagery
Data
Getting Started with APIs
Currency conversion
Data
Getting Started with APIs
Lexer’s APIs overview
Data
Lexer’s APIs
Dataset management in the Hub
Data
Dataset management
Chatbox user API
Data
Lexer’s APIs
Activity API
Data
Lexer’s APIs
Visualize API
Hidden from nav
Profile Read API
Data
Lexer’s APIs
Lexer Javascript Tag basics
Data
Lexer Javascript Tag
Lexer Javascript Tag technical guide
Data
Lexer Javascript Tag
Lexer Javascript Tag use cases
Data
Lexer Javascript Tag
dataLayer configuration: Shopify
Data
Lexer Javascript Tag
Customer segment CSV export
Data
Data off-boarding
Export to CSV
Data
Data off-boarding
Data in Lexer's CDXP
Understand
Customer Data
Lexer's attributes
Understand
Customer Data
Attribute value types
Understand
Customer Data
Data source - CRM
Understand
Customer Data
Data source - Transactions
Understand
Customer Data
Data source - Email
Understand
Customer Data
Partner data - Experian
Understand
Customer Data
Partner data - Mastercard
Understand
Customer Data
Partner data - Roy Morgan
Understand
Customer Data
GDPR and CCPA requests
Understand
Customer Data
Upload data files
Understand
Customer Data
File upload API
Understand
Customer Data
Data provision and schemas
Understand
Customer Data
Segment overview
Understand
Segment
Creating segments
Understand
Segment
Smart Search
Understand
Segment
Export attribute results
Understand
Segment
Contact a customer
Understand
Segment
Fixing a disabled segment
Understand
Segment
Profile tab
Understand
Segment
Compare segments
Understand
Compare
Compare attributes
Understand
Compare
Activate overview
Engage
Activate
Ongoing activations
Engage
Activate
Audience splits
Engage
Activate
A/B splits
Engage
Activate
Control group splits
Engage
Activate
Inbox filtering
Engage
Respond
Ignored Senders
Engage
Respond
Forms for service
Engage
Respond
Workflow states
Engage
Respond
Bulk changes
Engage
Respond
Scheduled replies
Engage
Respond
Message templates
Engage
Respond
Customer profiles
Engage
Respond
Grouped messages
Engage
Respond
Automation rules
Engage
Respond
Redact messages
Engage
Respond
Track overview
Measure
Track
Activity overview
Measure
Activity
Team report
Measure
Activity
Cases report
Measure
Activity
Listen overview
Measure
Listen
Searching in Listen
Measure
Listen
Tier filters
Measure
Listen
Boolean search
Measure
Listen
Saved dives
Measure
Listen
Email notifications
Measure
Listen
Twitter data
Measure
Listen
Facebook data
Measure
Listen
Instagram data
Measure
Listen
Visualize overview
Measure
Visualize
Curate feed
Measure
Visualize
Report overview
Measure
Report
// Rich text for code blocks and nested lists