> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pureclarity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# order event

> The order tracking event is used to track order activity so that PureClarity can determine customers purchasing habits and trends to personalize recommendations. This should ideally be placed on the final step of the checkout process once the order has been successfully submitted.

The order tracking event is used to track order activity so that PureClarity can determine customers purchasing habits and trends to personalize recommendations. This should ideally be placed on the final step of the checkout process once the order has been successfully submitted.

<Note>Each unique order Id can only be sent once. Orders reusing an orderid will be dropped.</Note>

At least one of email, userid or accid must be sent:

* If accid is sent, then userid will be ignored – as all subsequent events will be tracked against the account.

* If userid is sent, then this will be taken as an identifier for the user across the site. Use this same identifier when the user logs in; makes an order; or in any offline orders that are submitted.

* If neither accid or userid is sent, then email will be used as the unique identifier for the user. This should be used whenever the user logs in; makes an order; or in any offline orders that are submitted.

* If accid or userid is set – and email is set as well – then the email address will just be stored against the user. It will be used if any Triggered Emails are sent.

* Best practice is to send the userid (or accid if using accounts). This is because it will remain unique to that user – email addresses may well be changed over time.

* The Id should match the Id sent in the user feed.

<Note>
  If you are passing groupid, then this must match one of the groups sent in the GroupPricing field in the Product Feed.
</Note>

## Properties

<ParamField body="orderid" type="string" required>
  Unique order number of this order
</ParamField>

<ParamField body="ordertotal" type="number">
  Total order value in base currency.NOTE: Values should have no currency symbol or comma separators. This value can either be ex-VAT or VAT depending on the site. Decimal separator must be a . and NOT a ,
</ParamField>

<ParamField body="title" type="string">
  The customer title or salutation. For example Mr, Mrs, Miss, Ms, Dr
</ParamField>

<ParamField body="firstname" type="string">
  First name of the customer
</ParamField>

<ParamField body="lastname" type="string">
  Last name of the customer
</ParamField>

<ParamField body="zipcode" type="string">
  The zipcode of the delivery address
</ParamField>

<ParamField body="postcode" type="string">
  The postcode of the delivery address
</ParamField>

<ParamField body="dob" type="string">
  Date of Birth of the Customer (Format YYYY-MM-DD)
</ParamField>

<ParamField body="userid" type="string">
  The customers unique user id
</ParamField>

<ParamField body="email" type="string">
  The customers email address
</ParamField>

<ParamField body="accid" type="string">
  The business account id of the customer
</ParamField>

<ParamField body="groupid" type="string">
  Optional user group. Used to support price banding (prices per user group)
</ParamField>

<ParamField body="items" type="array">
  Array of items in the order
</ParamField>

## Example

```json theme={null}
[
  {
    "orderid": "O123",
    "ordertotal": 22.9,
    "title": "Mr",
    "firstname": "Fred",
    "lastname": "Smith",
    "zipcode": "90210",
    "postcode": "YO10 6RB",
    "dob": "1978-07-31",
    "userid": "USR123",
    "email": "fred@smith.com",
    "accid": "ACCID123",
    "groupid": "group10",
    "items": [
      {
        "id": "P1234",
        "qty": 2,
        "unitprice": 11.4
      },
      {
        "id": "P1235",
        "qty": 1,
        "unitprice": 0.1
      }
    ]
  }
]
```
