🌐

Other languages available for this guide

🇫🇷 La version française de ce guide
🇪🇸 La versión española de esta guía (WIP)
🇮🇹 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


ColumnMandatoryData Type / Maximum lengthDescription
ext_idNostringevent identifier in the customer system, needs to be unique
eventYesstring (64 characters)name of the event, not case sensitive
event_dateYesdateDate on which the event took place (format: YYYY-MM-DD HH:MM:SS)
channelYesstringchannel upon which the event has been generated
channel_details_idNostringsome more id specific to the channel
channel_details_nameNostringsome more name specific to the channel
providerNostringname of the event provider, ext_id associated with provider must be unique in the customer event referential
individual_idYesstringThe 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_typeNostringcode of the source which triggered the event (different for social and custom events, see below)
source_idNostringoptional, source identifier in the channel
source_dateNodatea [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


eventvalid channel
bookingfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
chatbot_usagefacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
check_infacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
clickfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
commentfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
complete_surveyfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
favoritefacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
followfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
geoloc_authorizationfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
likefacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
loginfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
mentionfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
messagefacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
openfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
optinfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
optoutfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
reactionfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
readfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
read_morefacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
scanfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
sharefacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
unfollowfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel
viewfacebook,instagram,twitter,wechat_mp,wechat_oa,x_channel

Valid sources type by channel


ChannelSource types
facebook“post”, “event”, “survey”, “story”, “link”, “other”
instagram“post”, “message”, “story”, “link”, “other”
twitter“tweet”, “dm”, “link”, “other”
wechat_mp“mini_program”, “mp_page”, “other”
wechat_oa“wechat_action”, “page”, “post”, “event”, “survey”, “store”, “qr_code”, “link”