Transactions

Transactions are events which relate to the sale of products and services. Generally, these include Orders and Cancellations / Returns. These events are key, as revenue is generated here, and are vital for Modelling and Predictions.

Events

EventDescription

Completed Order

An order is placed

Changed Order Status

An order is cancelled / returned

For contractual businesses, CrossEngage also has the following events:

EventDescription

contract_sale

Conclusion of a contract

contract_start

start of the contract

contract_cancellation

The contract is cancelled

contract_end

The contact expires

contract_return

the contract is cancelled during trial phase

Properties

Order events have three base properties, as well as Cart properties. Cart properties can be accessed by using cart.products[product_number].property.

PropertyDescriptionMandatoryExample

id

Unique Identifier

DEF12345

timestamp

Event date

2022-01-01

orderId

Invoice ID

1234

cart.products[].id

Invoice item number

1

cart.products[].quantity

quantity of item

4

cart.products[].price

price per unit

10.99

cart.products[].category

Product Category

Shoes

cart.product[].brand

Product brand

Samsung

cart.products[].sku

Product SKU

AB1234

cart.products[].name

Product name

Cap

cart.currency

Currency of payment

Euro

Examples

You can upload these events using the CrossEngage API, or via the Event Feed. Please go to Data Management to learn more.

Here is an example of the JSON used to upload two events via the API.

{
  "id": "ABC12345",
  "events": [{
          "event": "Completed Order",
          "timestamp": "2022-01-01T09:21:06Z",
          "properties": {
              "orderId": "1234",
              "cart": {
                  "total": 46.13,
                  "currency": "EUR",
                  "numberOfItems": 3,
                  "numberOfUniqueItems": 2,
                  "products": [{
                          "id": "1",
                          "price": 10.99,
                          "quantity": 1,
                          "category": "T-shirt"
                  },{
                          "id": "2",
                          "price": 17.57,
                          "quantity": 2,
                          "category": "Shoe"
                  }]
              }
          }
        }, {
          "event": "Changed Order Status",
          "timestamp": "2022-01-01T09:21:06Z",
          "properties": {
              "orderId": "1234",
              “status”: “return”,
              "currency": "EUR",
              “id”:1,
              "price": 10.99,
              "quantity": 1,
              "category": "T-shirt"
	  }
	}]
}

Here is the same example, presented as a JSON file that can be uploaded via Data Feeds:

[{
   "event": "Completed Order",
   "id": "ABC12345",
   "timestamp": "2022-01-01T09:21:06Z",
   "orderId": "1234",
   "cart": {
       "total": 46.13,
       "currency": "EUR",
       "numberOfItems": 3,
       "numberOfUniqueItems": 2,
       "products": [{
               "id": "1",
               "price": 10.99,
               "quantity": 1,
               "category": "T-shirt"
           },
           {
               "id": "2",
               "price": 17.57,
               "quantity": 2,
               "category": "Shoe"
           }]}}
{
   "event": "Changed Order Status",
   "id": "ABC12345",
   "timestamp": "2022-01-01T09:21:06Z",
   "orderId": "1234",
   “status”: “return”,
   "currency": "EUR", 
    “id”:1,
   "price": 10.99,
   "quantity": 1,
   "category": "T-shirt"
}]

Last updated