Import Event Data Using CSV

Overview

Import event feature allows you to import events from a CSV file into your MoEngage account. This feature supports several uses, such as:

  • Historical Data Import- As a marketer, you can import historical event data into MoEngage to analyze your customers' past behaviour and trends.
  • Event Data Migration- During a platform migration, you can import events through CSV to ensure a smooth transition of historical event data, ensuring continuity in analysis and campaign management.
  • Batch Upload- Importing events through CSV allows users to upload a large volume of events in a single batch, saving time and effort. This is useful when updating or populating a large number of events in the MoEngage platform.

Import Event Using CSV

Perform the following steps to import event data using a CSV file:

  1. Log in to the MoEngage dashboard. 
  2. Navigate to Data > Data Imports.
    data imports 2.png
  3. On the Data Imports page, under the Event tab, click Import >Events.
    EVENTS .png
  4. On the Import Events dialog box, click Upload CSV. You can also import events using SFTP and S3.
  5. Click Continue.
    Import event 3.png

The following step-by-step process outlines how events can be imported using CSV into the MoEngage platform.

Step 1: Source and Format

Enter the following details related to the source and format of the CSV file in Step 1.

info

Information

A CSV file can only upload one event at a time, so it is impossible to use one CSV file to upload multiple events.

  1.  Import name- Enter a name for your import.
  2. Select event- Select the event you want to upload using the CSV file. If the event you are searching for is not listed in the drop-down, click Create new event from the drop-down.
    1. On the Create new event dialog box, enter the Event name and click Create.
  3. Select file- You can either drag and drop a CSV file or upload a CSV file from the computer. You can also Download a sample file to view a sample event file that clearly explains the data format expected in the CSV File. Note that CSV files less than 150 MB are supported.
    info

    Information

    When you upload an event CSV file, the column represents the event attributes.

    file import 4.png
  4. File preview- Click the Preview file to preview the CSV file you uploaded. You can preview the first five rows of the event CSV file.
  5. Click Next. This takes you to the next step.
    Screenshot 2024-10-08 at 1.04.20 PM.png

Step 2: Import Configuration and Action

This step involves mapping event attributes in MoEngage to event attribute columns in the CSV file.

Required Mapping

This is a mandatory mapping that should be performed. Under the Attribute name, you can view the event attributes of Moengage, such as User Identifier and Event time. These attributes should be mandatorily mapped to the events attributes column in the CSV file listed under Map Column. You can select the column names of the uploaded CSV file from the drop-down menu under the Map column

While mapping the Event time, make sure to select the date, time format and time zone.
required mapping.png

Map Columns

After successfully mapping the mandatory fields mentioned above, you need to map the remaining events attribute columns in the CSV file to the event attributes of MoEngage. 

The event attributes columns of the CSV file are listed under the Column name, and this is to be mapped to the event attributes of MoEngage under the Map column to attribute.

Perform the following steps to map columns:

  1. You can either select the event attributes of MoEngage from the Select attribute drop-down or click Create new attribute, if the attribute is not listed in the drop-down.
    create new attribute.png
    1. On the Create new attribute dialog box, enter the Attribute name, Data type and click Create.
      Screenshot 2024-10-08 at 2.56.15 PM.png
  2. Select the Data type of each attribute while mapping.
  3. Select the Skip column if you want to skip any columns from mapping. Note that the mandatory fields already mapped are disabled under Map Columns.
    Map columns.png

Send Import Status

After the event data is imported to MoEngage, you can send the import status to 10 email ids. Select the Email id from the drop down to which you want to send the status and click Next.
send import status.png

Step 3: Scheduling

In this step, you need to define when to import the files. MoEngage supports the following types of imports:

  • As soon as possible: The file will start importing as soon as you click Schedule Import.
    Screenshot 2024-10-08 at 3.06.00 PM.png
  • At specific date and time: You can choose to run the import based on your selected Start date and Start time. You can also select the Time zone.
    Screenshot 2024-10-08 at 3.07.29 PM.png

After scheduling, click Schedule Import. The event data now gets imported to MoEngage.

View Imported Event Data

The imported event data gets listed under Data > Data Imports >Events. Click Actions (ellipsis.png) to View or Duplicate the event data. 
view duplicate.png

  • Click View to view the imported event details. Click Actions (ellipsis.png) to Export file to your email id.
    Import details.png
  • Click Duplicate to duplicate an event with the same event name, and then you can upload the CSV file for it.

The imported event data has the following import status:

  • Successful- This is displayed when the event import is successful.
  • Processing- This is displayed when the event import is still in the processing state after being imported. 
  • Archived- This is displayed when the imported event is archived.
  • Failed- This is displayed when the event import is failed.

Supported Data Types, Event Attributes Types and Datatime Formats in Event Data

Supported data types

The following data types are supported for column values in the file:

  • String
  • Numeric
  • Boolean
  • Datetime
  • Array (String, Double, Float, Int)

Supported Event Attribute Types

Type Description Value in Manifest
String Any string value. Examples of acceptable values are ABC, ABC XYZ, ABC123, and so on. "type": "string"
Double Any decimal value. Examples of acceptable values are 3.14159, 241.23, -123.1 "type": "double"
Boolean Examples of acceptable values are true, false "type": "bool"
Date Time Any date time value. The supported formats are covered in the next table.Example of acceptable values are 2019/02/22 17:54:14.933 "type": "datetime"

Supported Datetime Formats

Date and Time Format Examples
“datetime_format”: "YYYY-MM-DD"
  • 2022-01-22
“datetime_format”: "YYYY/MM/DD"
  • 2022/01/22
“datetime_format”: "DD/MM/YYYY"
  • 22/01/2022
“datetime_format”: "DD-MM-YYYY"
  • 22-01-2022
“datetime_format”: "DD-MM-YYYY hh:mm:ss"
  • 31-12-2022 12:10:33
“datetime_format”: "DD/MM/YYYY hh:mm:ss"
  • 31/12/2022 12:10:33
“datetime_format”: "YYYY-MM-DD hh:mm:ss"
  • 2019-02-22 17:54:14
“datetime_format”: "YYYY/MM/DD hh:mm:ss"
  • 2019/02/22 17:54:14
“datetime_format”: "DD-MM-YYYYThh:mm:ss.s"
  • 31-12-2022T12:10:33.882
“datetime_format”: "DD/MM/YYYYThh:mm:ss.s"
  • 31/12/2022T12:10:33.882
“datetime_format”: "DD-MM-YYYYThh:mm:ssTZD"
  • 31-12-2022T12:10:33Z
  • 31-12-2022T12:10:33+08:00
  • 31-12-2022T12:10:33-08:00
“datetime_format”: "DD/MM/YYYYThh:mm:ssTZD"
  • 31/12/2022T12:10:33Z
  • 31/12/2022T12:10:33+08:00
  • 31/12/2022T12:10:33-08:00
“datetime_format”: "YYYY-MM-DD hh:mm:ss.s"
  • 2019-02-22 17:54:14.933
“datetime_format”: "YYYY/MM/DD hh:mm:ss.s"
  • 2019/02/22 17:54:14.933
“datetime_format”: "YYYY-MM-DDThh:mm:ssTZD"
  • 2019-11-14T00:01:02Z
  • 2019-11-14T00:01:02+08:00
  • 2019-11-14T00:01:02Z-08:00
“datetime_format”: "YYYY/MM/DDThh:mm:ssTZD"
  • 2019/11/14T00:01:02Z
  • 2019/11/14T00:01:02+08:00
  • 2019/11/14T00:01:02-08:00
“datetime_format”: "YYYY-MM-DDThh:mm:ss.sTZD"
  • 2019-02-22T17:54:14.957Z
  • 2019-02-22T17:54:14.957299-08:00
  • 2019-02-22T17:54:14.957299+08:00
“datetime_format”: "YYYY/MM/DDThh:mm:ss.sTZD"
  • 2019/02/22T17:54:14.957Z
  • 2019/02/22T17:54:14.957299-08:00
  • 2019/02/22T17:54:14.957299+08:00

Language Support

You can import data in any language as long as you are using UTF-8 decodable characters.

Empty values

If your file contains empty values then these would still be imported into MoEngage. In this case, we will create/update event attribute where the value would be empty.

What is not supported currently?

  • Attribute Type list and other complex types (JSON, dictionaries, etc.).
  • Newline character formats other than "\n" - .The only newline character currently supported for the .csv files is "\n".Other formats like "Ctrl+M" or "\r" are not supported.
  • If your file contains less than 5 rows, then you may face errors during file import. Make sure to add some dummy rows to import in this case.

 

 

 

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?