> For the complete documentation index, see [llms.txt](https://documentation.crossengage.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.crossengage.io/data-and-engagement-platform/data-model/events/transactions.md).

# 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

| Event                | Description                      |
| -------------------- | -------------------------------- |
| Completed Order      | An order is placed               |
| Changed Order Status | An order is cancelled / returned |

For contractual businesses, CrossEngage also has the following events:

<table><thead><tr><th width="211.5">Event</th><th>Description</th></tr></thead><tbody><tr><td>contract_sale</td><td>Conclusion of a contract</td></tr><tr><td>contract_start</td><td>start of the contract</td></tr><tr><td>contract_cancellation</td><td>The contract is cancelled</td></tr><tr><td>contract_end</td><td>The contact expires</td></tr><tr><td>contract_return</td><td>the contract is cancelled during trial phase</td></tr></tbody></table>

### Properties

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

<table><thead><tr><th width="234">Property</th><th>Description</th><th width="108" data-type="checkbox">Mandatory</th><th>Example</th></tr></thead><tbody><tr><td>id</td><td>Unique Identifier</td><td>true</td><td>DEF12345</td></tr><tr><td>timestamp</td><td>Event date</td><td>true</td><td>2022-01-01</td></tr><tr><td>orderId</td><td>Invoice ID</td><td>true</td><td>1234</td></tr><tr><td>cart.products[].id</td><td>Invoice item number</td><td>true</td><td>1</td></tr><tr><td>cart.products[].quantity</td><td>quantity of item</td><td>true</td><td>4</td></tr><tr><td>cart.products[].price</td><td>price per unit</td><td>true</td><td>10.99</td></tr><tr><td>cart.products[].category</td><td>Product Category</td><td>false</td><td>Shoes</td></tr><tr><td>cart.product[].brand</td><td>Product brand</td><td>false</td><td>Samsung</td></tr><tr><td>cart.products[].sku</td><td>Product SKU</td><td>false</td><td>AB1234</td></tr><tr><td>cart.products[].name</td><td>Product name</td><td>false</td><td>Cap</td></tr><tr><td>cart.currency</td><td>Currency of payment</td><td>false</td><td>Euro</td></tr></tbody></table>

### Examples

You can upload these events using the CrossEngage API, or via the Event Feed. Please go to [Data Management ](/data-and-engagement-platform/data-management.md)to learn more.

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

```javascript
{
  "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:

```javascript
[{
   "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"
}]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.crossengage.io/data-and-engagement-platform/data-model/events/transactions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
