1. Home
  2. Integrations & Configurations
  3. Uploading Users and Events

Uploading Users and Events

Basics

There are three ways to get your data into WebEngage.

  1. Integrating SDKs and passing user and event data in real-time (most recommended)
  2. Passing users and events from your systems using WebEngage’s REST APIs
  3. Uploading users and events using CSV files

Although we highly recommend SDK integration in order to make WebEngage your realtime marketing database of record with user updates and behavior flowing in as they happen on your site or app, the other two methods are useful in scenarios such as the following:

  • Passing data using events / transactions that happen outside your apps / website (e.g. order delivery, re-stocking etc.)
  • Passing data from your CRM / MIS / BI systems for profile enrichment
  • Uploading past data or historical transactions
  • Addressing the cold start problem – i.e. not waiting for users to visit in order to generate their profiles

To read more about passing data to WebEngage using REST APIs, click on the following links: Users via REST API | Events via REST API

Using CSV files

You can upload CSV files to create or update user information as well as to pass events and their attributes. To use this feature, click on the Data Management link under the top right menu.

This opens the Data Management section.

Here, you’ll find two tabs “Users” and “Events” that allow you to upload the corresponding data. To get started, download the sample CSV which will give you an idea about the expected format of data.

The first (header) row in CSV is mandatory and specifies attribute names. The attribute “user_id” is mandatory and must exist as one of the columns. This identifies the user.

User Attributes

If a new user_id value is encountered, a new user profile gets created. If an existing user_id is uploaded again, this effectively updates the existing user profile. The values against user_id must be unique. They could be an email id, phone number or any other unique identifier relevant to your business.

WebEngage “understands” a few attributes such as “first_name”, “email” etc. These need to be named exactly as specified in order to ensure the system identifies that a built-in field needs to be updated. Here’s a list of all system attributes that can be provided while uploading users: user_id, first_name, last_name, birth_date, gender, email, phone, company, hashed_email, hashed_phone.

Beyond system attributes, you can pass any number of custom attributes as additional columns.

Event Attributes

Again, user_id needs to be passed as one of the columns. The system attributes in case of event data upload using CSV are: user_id, event_name, event_time. The event_time needs to be in the following date format: yyyy-MM-ddTHH:mm:ssZ (e.g. 2013-01-26T07:31+0000). Beyond these, you can specify any other custom attributes you wish to pass related to those events as additional columns.

The Upload Process

On uploading a CSV, you then see a preview of the data that WebEngage finds in your file.

On proceeding, WebEngage shows you a list of all attributes identified in the file.

For new attributes, you can set the data types of the attribute at this step. Up until this stage, your data hasn’t been uploaded yet. On clicking “Save File” your file is actually uploaded to our servers along with the other configuration specified (if any) in the previous steps.

Your file is now uploaded and being processed. You can view the status in the “Previous Uploads” section.

Once processed, the status will change to “Done” or “Failed”. In case of failure, you’ll get an option to “Fix” errors. Click there to get a summary of why the upload failed.

Please note that if the process fails at this step, none of the records are uploaded. You need to fix the specified errors in the report, and re-upload the entire file to attempt uploading again.

Was this article helpful?