If you have a batch of customer events that you need to register without using Antavo’s Events API, you can manually import events with our Event Import module.
You can find the module’s configuration page by clicking on the ‘Modules’ item in the sidebar and then scrolling down to the ‘Extensions’ module category. The page will open to the list of import files that have already been uploaded with the following information:
- Created at
The date when the import file was uploaded.
- Created by
The platform user who uploaded the import file.
- Pending: The import file is uploaded successfully, but the import process has not started yet.
- Processing: The import process is in progress.
- Finished: The import process has finished.
- Failed: The import process has failed. If the issue persists, please contact your Account Manager
The size of the import file in bytes.
Creating an import file
To be able to import events, first you need to put together a CSV file in which each column represents an attribute of the event. The easiest way to generate the file is to create a spreadsheet based on the instructions below and save it in CSV file format.
In the first row of your spreadsheet, you need to define the name of the event attributes as headers of your data columns, including the ‘customer’, ‘action’ and further event properties depending on the event that you’re importing. This is how you can convert the name of any event property into headers of data columns:
- Take the displayed name of the field (eg. “Transaction Id”)
You can find the name of all the event fields by opening the API Browser through the API tab of the Settings menu and selecting the event from the ‘Action’ dropdown menu
- Convert it into lowercase ( eg. “transaction id”)
- Replace spaces with “_” – if any (eg. “transaction_id”)
- Prefix it with “properties.” (eg. “properties.transaction_id”)
The example below shows how the header of a campaign bonus event import should potentially look in the CSV import file.
As soon as you have your headers, you can add the event data in subsequent rows, each row representing a customer event to register.
In the ‘action’ column of your import file, please use the ‘Name’ of custom actions or this is how you can convert the name of a built-in event into a data field:
- Take the displayed name of the event (eg. “Checkout item”)
You can find the name of your events by opening the API Browser through the API tab of the Settings menu and selecting the event from the ‘Action’ dropdown menu
- Convert it into lowercase (eg. “checkout item”)
- Replace spaces (if any) with “_” (eg. “checkout_item”)
The example below shows the content of a complete campaign bonus event CSV import file with the headers and the customer events to import.
374397,campaign_bonus,115,’20 New Year Campaign
345454,campaign_bonus,100,’20 New Year Campaign
342856,campaign_bonus,210,’20 Summer Campaign
There’s no limit on the number of events you can include in an import file.
Uploading the import file
- Go to the module configuration page
- Click the ‘Upload’ button in the top right corner
- Choose the file in the ‘Input file’ field
- Click the ‘Upload’ button
Your import will immediately appear in the list on the module configuration page where you can follow the progress of your imports. If the status of the import changes from ‘Processing’ to ‘Finished’, it means that the data included in the file has been successfully registered in the database and that the events were added to customers’ event histories.
You can identify imported events in each customer’s Eventy history by their sources. You will find a link to the import itself in the Source field if the event was registered via an import.
Downloading imported files
- Go to the module configuration page
- Click the ‘Details’ button of the import file that you’re looking for
- Click the ‘Download’ button
When exporting imported events in the Exports module, you need to use the hexadecimal import ID as the value of the source filter. You can find this at the end of the URL after opening the import with the ‘Details’ button.