Importing events from a CSV or XLSX file lets you add large amounts of event data to User.com quickly and efficiently. Instead of creating events one by one, you can upload them in bulk and manage the whole process in a few simple steps. This article explains how to prepare your file and import it correctly into the platform.
Before you begin, make sure your file is properly structured and that you understand how data is stored in User.com. The platform uses both standard attributes (built-in fields such as email address or phone number) and custom attributes (fields you create yourself).
Define events: You need to create the events in the workspace first. Follow the steps.
Create Custom Attributes: If you want to include additional information about event occurrences, you need to create the relevant custom attributes first. Follow the steps in “How to Create a Custom Attribute“.
Verify Data Types: Make sure that each column has the correct attribute value type. For example, if you want to import "Scoring", make sure your attribute is an integer. If you want to import a "Date", set the attribute as datetime. Refer to “What Is an Attribute” for details on specific data types.
Before uploading, ensure your file is formatted correctly. If you aren't sure how your file should look, you can download a ready-to-use template directly from the app by clicking the “xlsx” or “csv” button in the “Data” → “Import” section.
To find more tips about data formatting, check our dedicated article.
Required Fields
Importing events means that you upload specific event occurrences to the timelines of the contacts who performed them. (For example, history of purchases). Due to that it’s obligatory to connect each occurrences to a specific contact. It can be done via contact’s
OR
user_id
Also, the file must include
event_name (name of the event defined in the app before)
datetime (timestamp of the event occurrences in ISO 8601 format e.g. 2017-07-25T14:14:08.612Z)
Additionally you can upload the event attributes for each event occurrence. These can be specific details crucial for statistics, automations or segmentation.
Event attributes in the file should be placed in the “attrs” column as JSON objects with { "key": "value"}
Example:

Column Headings
Always include column headings in the first row of your file. Try to give your columns exactly the same names as the existing in User.com attributes have. If the column name is identical to the attribute name, the system will match them automatically during import.
Encoding
What is encoding? Encoding tells the computer how to interpret the text characters in your file. The default and most highly recommended format is UTF-8. Choosing UTF-8 ensures that special characters, accents, and symbols are imported correctly without turning into random symbols.
Separator
What is a separator? In CSV (Comma Separated Values) files, a separator is the punctuation mark used to divide your text into distinct spreadsheet columns. Common separators are commas (,) or semicolons (;).
Go to “Data” → “Importers” and choose “Import Events”.


OR
You can go with “Settings” → “Workspace settings” → “Contact data & events” → “Events” →
“Manage” → “Import events”

Upload or drag&drop the file.
Choose the encoding to be suitable to your file. (UTF-8 is a default one)
Choose the separator used in your file.
Click “Import”.

You can monitor the import process and check the final results in the “Import Results” section, where you are redirected automatically.
You can visit this section any time via “Data” → “Importers” → “Import Results” path.
Here you will see:
Import status (Started/Pending/Complete/Archived)
Date created
Completed at
Type (what kind of data was imported)
Created by (team member who uploaded the file)
File name
Total rows (from your file)
Succeeded (final number of rows imported)
Failed (shows number of failures)
If something goes wrong during the import, click on the file name to view a detailed error report.
To view the newly imported profiles, go to “Data” → “Contacts”. You can filter your database by the specific contact activity. Additionally you can check the event history in “Settings” → “Workspace settings” → “Contact data & events” → “Events”.
While editing your file in the Google sheet, there is one important rule. Every attribute object has to be inside single quotes, e.i. "key". Unfortunately, Google sheet omits a quote if it appears as a first character in the line. To get rid of that problem, you have to type a single quote twice. This way it'll be correct in that Google sheet and the csv file after it's been exported.