Page tree
Skip to end of metadata
Go to start of metadata

Order data can be sent to track transactions that Interaction Studio is not able to capture from the web experience automatically. The orders can be from offline systems like call centers and brick and mortar store fronts. The order data can also represent historical transaction data of purchases from before Interaction Studio was integrated to your systems. This data can be sent via batch upload via the Interaction Studio event API and once sent will update the relevant user objects, update historical summary reports and will be used for segmentations and targeting. 

Interaction Studio Classic Only

Please note, the contents of this article are intended for customers using Interaction Studio (formerly Evergage Classic). Do not adjust your beacon version to downgrade or upgrade.

If you are a Campaigns & Templates customer, please refer to the CSV Feed Requirements in this knowledge base, or the Feeds article in developer.evergage.com.

This Article Explains

This section details how to send order data to track transactions that Interaction Studio is not able to capture from the web experience automatically.

Sections in this Article

Sending Order Events

Interaction Studio order events follow the data structures defined by the Interaction Studio Catalog system. For historical orders, a time parameter can be added to the event with the data and time in unix epoch milliseconds format of the time the order actually happened.

To authenticate the API request, use HTTP Basic Authentication and specify your API token's API Key ID and API Secret Key as the username and password, respectively.

Events are sent to the Interaction Studio event receiver rest endpoint via POST

https://<ACCOUNT>.evergage.com/api/dataset/<DATASET>/event/list


Here is an example file with a single order:

[
    {
        "action":"Purchase",
        "timestamp":1428493211000,
        ".order":"{\"orderId\": \"ABCDE\", \"totalValue\": 100.0, \"totalValueCurrency\": \"USD\", \"lineItems\": [{\"item\": {\"currency\": \"USD\", \"price\": 0.17799, \"_id\": \"check-02\", \"type\": \"p\"}, \"quantity\": 2000}, {\"item\": {\"currency\": \"USD\", \"price\": 0.157475, \"_id\": \"dep-01\", \"type\": \"p\"}, \"quantity\": 400}]}",
        "userId":"12345"
    }
]


Please note, you must JSON serialize the ".order" field so the value is a string. Prices should be represented as floats / ints (as appropriate), not as strings. If no timestamp is provided with an order then Interaction Studio will assume the order occurred "now".


Events may be sent in batches of 1,000 orders. Multiple orders should be sent with JSON array structure. e.g.

[{order1},{order2}]


Here is an example of calling this POST using cURL:

export HTTP_BASIC_AUTH_STRING='QUFDRUE4RTAtMUE0My00MTRDLTk3RTAtRkQ4MzU3NDg1Q0Y3OndkcnNaNGFTd0oxemt4Y1Z1eUx5QnN0Z00tazZoTDdoNDk2N1BBUVc3eGc='

curl -H 'Content-Type: application/json' -d @purchases.json -H "Authorization: Basic ${HTTP_BASIC_AUTH_STRING}" https://account.evergage.com/api/dataset/engage/event/list