Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

pixsecurity
Order data can be sent to track transactions that Evergage 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 Evergage was integrated to your systems. This data can be sent via batch upload via the Evergage event API and once sent will update the relevant user objects, update historical summary reports and will be used for segmentations and targeting. 


Panel
borderColor#ccc
titleColor#404040
borderWidth1
titleBGColor#f4f5f7
titleThis Article Explains

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



Panel
borderColor#ccc
titleColor#404040
borderWidth1
titleBGColor#f4f5f7
titleSections in this Article

Table of Contents
maxLevel2


Sending Order Events

Evergage order events follow the data structures defined by the Evergage 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.

 

Events are sent to the Evergage event receiver rest endpoint via POST

Code Block
https://<ACCOUNT>.evergage.com/api/dataset/<DATSET><DATASET>/event/list?_at=<API_TOKEN>

 

Here is an example file with a single order:

Code Block
languagejs
[
    {
        "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 Evergage 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.

Code Block
[{order1},{order2}]

 

Here is an example of calling this POST using cURL:

Code Block
languagetext
curl -H 'Content-Type: application/json' -d @purchases.json https://account.evergage.com/api/dataset/engage/event/list?_at=AAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEE


Hidestuff