Events
Other languages available for this guide
🇫🇷 La version française de ce guide
🇪🇸 La versión española de esta guía
🇮🇹 La versione italiana di questa guida
This feature will be deprecated soon. We advise not to launch any new project using this feature if not necessary. Please reach out to your contact at Splio to know more.
This article presents a DataHub scope called “events”, also called Interactions in the interface. It will allow you to import the following types of events:
- social events — selected from a system-wide, pre-configured list of events;
- custom events — from a universe specific and user-defined list of events.
Bear in mind that, with import, you can only create new events. If you try importing an event that already exists, it will be discarded. You cannot update nor delete an interaction with Datahub.
Prerequisites
- Knowledge of the CSV format and the import procedure.
- A UTF-8 capable text editor can be handy, but you will most likely export the data from another software (spreadsheet, ETL, POS, etc.).
- All custom events need to be defined in your Splio universe before importing.
Preparation of a file to import events
The structure of files used to import both social and custom events is the same.
In order to import a social event, you’ll have to choose one of the combinations of “platform”, “event” and “source type” values provided by Splio.
To import an event which is not present in the list below, you need to define a custom event in the Splio platform first. Once defined, you can use all combinations of platform, event, and source type which meet your needs.
Please limit the size of your file to 100K objects.
CSV columns
All import files are CSV files. You are not required to use quotes, even though all fields in “events” import files are processed as character strings. Consult the subsections below to find fields used in the import files.
The fields “ext_id” and “provider” are used to uniquely identify each event in the Splio plateform. Each combination of these two values must be unique, otherwise Splio will reject a line as an existing event.
Event data
Column | Mandatory | Data Type / Maximum length | Description |
---|---|---|---|
ext_id | No | string | event identifier in the customer system, needs to be unique |
event | Yes | string (64 characters) | name of the event, not case sensitive |
event_date | Yes | date | Date on which the event took place (format: YYYY-MM-DD HH:MM:SS) |
channel | Yes | string | channel upon which the event has been generated |
channel_details_id | No | string | some more id specific to the channel |
channel_details_name | No | string | some more name specific to the channel |
provider | No | string | name of the event provider, ext_id associated with provider must be unique in the customer event referential |
individual_id | Yes | string | The value of this must be the unique customer key of the universe (email or a custom field). This customer needs to exist in the database for the import to work. |
source_type | No | string | code of the source which triggered the event (different for social and custom events, see below) |
source_id | No | string | optional, source identifier in the channel |
source_date | No | date | a [date in SQL format] (YYYY-MM-DD HH:MM:SS), upon which the source took place |
Remember that the “source_type” value for social events must be one of the valid combinations presented below. For custom events, it must match the parameters of a custom event which has been defined in the Splio platform.
Example file 1: social event import
In this case the “individual_id” field holds the email address, which is the unique key for contacts in the universe.
"ext_id";"individual_id";"channel_details_name";"channel_details_id";"contact_id";"contact_type";"platform";"event";"event_date";"source_type";"source_id";"source_date"00012;"[email protected]";;;;;instagram;view;"2019-03-27 12:22:00";story;"mybrand";"2019-03-27 12:10:00"
"00013";"[email protected]";;;;;"facebook";"like";"2019-03-27 19:42:00";"other";"4534345";"2019-03-27 09:21:30"
"00014";"[email protected]";;;;;"twitter";"scan";"2019-03-27 19:42:00";"tweet";"453234";"2019-04-02 19:25:30"
Example file 2: import of a custom event
The event platforms “mail”, “skyblog”, and their related events “target” and “like”, found in this example, must be created prior to any import.
What is more, the “individual_id” field contains the values of custom field c0 used to identify the event emitter.
"ext_id";"channel_details_name";"channel_details_id";"individual_id";"platform";"event";"event_date";"source_type";"source_id";"source_date"
"1";;;"73698946815";"mail";"target";"2019-03-27 12:22:00";"flyer";"12344";"2019-03-27 12:10:00"
"2";;;"834121212";"skyblog";"like";"2019-03-27 19:42:00";"a";"4534345";"2019-03-27 09:21:30"
"3";;;;"AB21435456";"skyblog";"like";"2019-03-27 19:42:00";"b";"453234";"2019-04-02 19:25:30"
Name the import file
Splio requires that you name your import files in a specific way. Each file name must contain the name of the universe, scope (“events”), subsection (you should have obtained it from your Project Manager), and date. The order in which the files are processed depends on the scopes and dates.
The naming schema is universe_scope_subsection_YYYYMMDD.csv. This means that the proper name for an import file in a universe “myuniverse”, scope “events”, and subsection “daily”, dated on February 14, 2019, is: "myuniverse_events_daily_20190214".
Valid source combinations for social events
Valid channel by event
event | valid channel |
---|---|
booking | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
chatbot_usage | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
check_in | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
click | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
comment | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
complete_survey | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
favorite | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
follow | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
geoloc_authorization | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
like | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
login | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
mention | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
message | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
open | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
optin | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
optout | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
reaction | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
read | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
read_more | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
scan | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
share | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
unfollow | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
view | facebook,instagram,twitter,wechat_mp,wechat_oa,x_channel |
Valid sources type by channel
Channel | Source types |
---|---|
“post”, “event”, “survey”, “story”, “link”, “other” | |
“post”, “message”, “story”, “link”, “other” | |
“tweet”, “dm”, “link”, “other” | |
wechat_mp | “mini_program”, “mp_page”, “other” |
wechat_oa | “wechat_action”, “page”, “post”, “event”, “survey”, “store”, “qr_code”, “link” |
Updated 4 months ago