Event data feed
CrossEngage's event data feed feature allows you to load all of your events when not using our API. There are two types of Event data feed: Order Feed and Event Feed.
Note: Event feed uploads are limited in size to 100,000 lines (approximately 35MB).
In order to expedite the uploading process, it is possible to upload multiple event feed files simultaneously, provided that the files have different timestamps.
To configure your event feed, please contact your CrossEngage customer experience team.
The purpose of the Historical Order Feed is to provide order data that you would like to use in your marketing activities with CrossEngage. The imported feed will create the following events:
- “Completed Order” events which will state that an order has been placed
- “Ordered Item” events
Furthermore, it is possible to use Order Feed to generate general events that you wish to use with CrossEngage and which are not sent via Web Tracking or Public API.
If you are using the order feed for your orders, please note that this is not real-time, so we highly recommend Web Tracking or API for real-time activity.
The file you have uploaded will be processed with a cronjob which will run every 15 minutes. We suggest however to upload your order feed if needed hourly instead.
The naming convention for the order feed file is the following:
“order_history_”+YYYYMMDDHHMMSS.json (UTC)
This data file contains an array of objects which contain the data of the users that should be loaded into CrossEngage. Each object defines the attributes of a single user.
In case you use multiple stores with a separate SKU or ID logic each, you will need to include a business unit that the product belongs to. The combination of business unit and Order ID needs to be unique in that case.
The .JSON file consists of an array of objects . Each of these objects represents one order will have the default keys shown below:
Key | Description | Data Type | Required | Example |
event | Name of the Event you’re sending | string | yes | |
orderId | ID of the order | string | yes | SK13332 |
id | ID of the purchasing customer (should be the same as in the User Feed) | string | yes | DE85328 |
timestamp | The timestamp of the order. | Datetime (YYYY-MM-DD hh.mm.ss.μμμ+UTC) | yes | 2016-04-18 07:00:43.591+02 |
total | The total amount of the order in currency | float | yes | 49.99 |
shipping | The shipping fee of the order | float | no | 5.00 |
discount | The discount amount of the order | float | no | 10.00 |
coupon | The voucher code used for the order | string | no | SUMMER16 |
currency | The currency of the total amount of the order | string | yes | EUR |
products | The purchased order items | array of objects | yes | See 'Order Feed Example' below |
cart | The object containing a user's desired order items | array of objects | yes | See 'Order Feed Example' below |
Sub-Key | Description | Data Type | Required | Example |
id | The id of the order item | string | yes | AB98347 |
sku | The SKU of the order item | string | yes | NL8867 |
name | The name of the order item | string | yes | Flower Pot Mathilde |
price | The price of the order item | float | yes | 10.00 |
currency | The currency of the item | string | no | |
quantity | The quantity of the purchased order item | integer | yes | 3 |
category | The category of the order item | string | no | Flowerpots |
It's possible to use more properties for each order than listed above. Please contact your account manager for this possibility.
order_history_20160321110559.json
[{
"event" : "Completed Order",
"orderId" : "50314b8e9bvf000000000000",
"businessUnit" : "DE",
"id" : "DE62305",
"timestamp" : "2015-08-24 15:28:51.591+02",
"cart" : {
"total" : 24.5,
"shipping" : 2.5,
"numberOfUniqueItems" : 2,
"numberOfItems" : 3,
"currency" : "EUR",
"products" : [
{
"id" : "507f1f77bcf86cd799439011",
"sku" : "45790-32",
"name" : "Monopoly: 3rd Edition",
"price" : 19.0,
"currency" : "EUR",
"quantity" : 1,
"category" : "Games",
"supplier" : "Games supplier",
"brand" : "table games"
},
{
"id" : "505bd76785ebb509fc183733",
"sku" : "46493-32",
"name" : "Uno Card Game",
"price" : 3.0,
"currency" : "EUR",
"quantity" : 2,
"category" : "Games",
"supplier" : "Games supplier",
"brand" : "table games"
}
]
}
}]
It is possible to import any other event other than orders in the Event Feed. In order to do this, the events need to have the same .JSON structure as the events that have been set up in the Web Tracking. For more information regarding pre-defined events in CrossEngage, see here.
Note the following requirements:
- Zip can only contain one file
- The name of the archived file must be the same as the name of the archive (e.g., event_history_20191118170500.json → event_history_20191118170500.json.zip)
- The requirements are not enforced on upload; if not observed, the file will be imported successfully, but marked as failed, and the zip file will not be moved
The naming convention for the event feed file is the following:
“event_history_”+YYYYMMDDHHMMSS.json (UTC)
The format of the file is very similar to the order feed structure described above. On top of the listed attributes, you will need to add the following key to each entry:
Key | Description | Data Type | Required | Example |
event | Name of the Event you’re sending | string | yes | Subscribed Newsletter |
Order Feed is uploaded in the root of SFTP account. The CrossEngage importer will then add each event according to the specified name. Please ensure that the data you are providing in the Event Feed is consistent with the data you are sending with the Web Tracking.
[
{
"event": "Changed Order Status",
"orderId": "0006000384",
"timestamp": "2018-05-22T22:00:00Z",
"businessUnit": "DE",
"orderType": "Click & Reserve Order",
"numberOfUniqueItems": 1,
"numberOfItems": 2,
"total": 7.98,
"discount": 0,
"shipping": 0,
"id": "e6bce5b3816eedd2cdd397256d6cee29d5b142ae821470c3b6883ee4b15f9499",
"cart": {
"currency": "EUR",
"total": 7.98,
"products": [
{
"sku": "AMA0159270DE",
"currency": "EUR",
"quantity": 2,
"price": 3.99,
"name": "Ribbon Lace, B:2,5cm x L:3m, white",
"category": "Decorative Bands",
"id": "AMA0159270DE"
}
]
}
}
]
Last modified 4mo ago