# Cart events

> Carts created or changed, and carts of known contacts that were abandoned.



## cart.updated

> Sent when a cart is created, or its items, total, status or contact change, from the Carts API or the tracking script. Alpha: open to the Emailit team only.

# cart.updated

Sent when a cart is stored for the first time, or when its items, total, currency, status or contact change. Carts come from [Create or update a cart](/docs/api-reference/carts/upsert/) or the tracking script's `cart` command, from contacts and from anonymous visitors. Sending the same cart again doesn't send the event. See [Commerce](/docs/commerce/#events).

> **Commerce is in alpha:** Commerce is open only to the Emailit team while we test it. See [Who can use Commerce](/docs/commerce/#who-can-use-commerce).

Cart updates come from site traffic, so webhooks that receive **All events** don't get this event. Subscribe to `cart.updated` by name. When a contact's cart goes idle, Emailit sends [`cart.abandoned`](/docs/webhooks/events/cart/abandoned/) instead.

Webhook requests carry a JSON array of events like this one; see [Webhook requests](/docs/webhooks/webhook-requests/).

```json
{
  "event_id": "evt_3xbAvDuFw01rXuy7pQR7EK2oAu2",
  "type": "cart.updated",
  "object": {
    "object": "cart",
    "id": "crt_3Rx784H7VYWRTViadjbp5oKHRud",
    "external_id": "c-58f1a2",
    "contact_id": "con_3EwrXnu9OaQWlfI1AyPUUEoYjQs",
    "email": "ada@example.com",
    "status": "active",
    "currency": "USD",
    "total": 107,
    "items": [
      {
        "product_id": "8123456789",
        "variant_id": "42-blue",
        "sku": "TRS-BLU-42",
        "title": "Trail running shoe",
        "quantity": 1,
        "unit_price": 89,
        "total": 89,
        "url": "https://shop.example.com/products/trail-running-shoe",
        "image_url": "https://shop.example.com/images/trail-running-shoe.jpg"
      },
      {
        "product_id": "8123456790",
        "variant_id": null,
        "sku": null,
        "title": "Merino running socks",
        "quantity": 2,
        "unit_price": 9,
        "total": 18,
        "url": "https://shop.example.com/products/merino-running-socks",
        "image_url": "https://shop.example.com/images/merino-running-socks.jpg"
      }
    ],
    "checkout_url": "https://shop.example.com/cart/recover/c-58f1a2",
    "source": "js",
    "abandoned_at": null,
    "converted_at": null,
    "converted_order_id": null,
    "created_at": "2026-10-08T12:12:47.630Z",
    "updated_at": "2026-10-08T12:28:51.902Z"
  },
  "data": {
    "object": {
      "object": "cart",
      "id": "crt_3Rx784H7VYWRTViadjbp5oKHRud",
      "external_id": "c-58f1a2",
      "contact_id": "con_3EwrXnu9OaQWlfI1AyPUUEoYjQs",
      "email": "ada@example.com",
      "status": "active",
      "currency": "USD",
      "total": 107,
      "items": [
        {
          "product_id": "8123456789",
          "variant_id": "42-blue",
          "sku": "TRS-BLU-42",
          "title": "Trail running shoe",
          "quantity": 1,
          "unit_price": 89,
          "total": 89,
          "url": "https://shop.example.com/products/trail-running-shoe",
          "image_url": "https://shop.example.com/images/trail-running-shoe.jpg"
        },
        {
          "product_id": "8123456790",
          "variant_id": null,
          "sku": null,
          "title": "Merino running socks",
          "quantity": 2,
          "unit_price": 9,
          "total": 18,
          "url": "https://shop.example.com/products/merino-running-socks",
          "image_url": "https://shop.example.com/images/merino-running-socks.jpg"
        }
      ],
      "checkout_url": "https://shop.example.com/cart/recover/c-58f1a2",
      "source": "js",
      "abandoned_at": null,
      "converted_at": null,
      "converted_order_id": null,
      "created_at": "2026-10-08T12:12:47.630Z",
      "updated_at": "2026-10-08T12:28:51.902Z"
    }
  }
}
```

## Fields

- `event_id` (string): Event ID (`evt_…`). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with [Retrieve an event](/docs/api-reference/events/get/).

- `type` (string): Always `cart.updated`.

- `object` (object): The cart the event describes. Its fields are listed below.

- `data.object` (object): The same object again, in the shape that the [Events API](/docs/api-reference/events/get/) returns in `data`.

### Cart object

The same object as [Retrieve a cart](/docs/api-reference/carts/get/) returns.

- `id` (string): Cart ID (`crt_…`).

- `object` (string): Always `cart`.

- `external_id` (string): The cart or checkout ID in your shop. Carts from the tracking script without their own ID use `web:` plus the visitor's anonymous ID.

- `contact_id` (string | null): The contact the cart belongs to (`con_…`), or `null` for an anonymous visitor's cart.

- `email` (string | null): The buyer's email address.

- `status` (string): `active`, or `converted` once an order converted the cart.

- `currency` (string | null): Three-letter ISO 4217 code of the amounts.

- `total` (number): Cart value.

- `items` (object[]): Line items, each with `product_id`, `variant_id`, `sku`, `title`, `quantity`, `unit_price`, `total`, `url` and `image_url`.

- `checkout_url` (string | null): Link that brings the buyer back to the cart.

- `source` (string): `api`, or `js` for carts from the tracking script.

- `abandoned_at` (null): Always `null`: updating an abandoned cart makes it active again.

- `converted_at, converted_order_id` (string | null): When an order converted the cart, and that order's ID (`ord_…`). `null` while the cart is active.

- `created_at, updated_at` (string): When the cart was first stored and when it last changed, in ISO 8601 UTC.

---
Source: https://emailit.com/docs/webhooks/events/cart/cart-updated/

## cart.abandoned

> Sent when a contact's cart with items stays unchanged for the cart abandonment delay of the commerce settings. Alpha: open to the Emailit team only.

# cart.abandoned

Sent when a cart becomes abandoned: it belongs to a contact, has at least one item, and wasn't updated for the `cart_abandon_minutes` of the [commerce settings](/docs/api-reference/commerce/get-settings/) (60 by default). Emailit checks every minute. Carts without a contact never become abandoned. Use the event to start an abandoned cart automation or to notify your own systems. See [Commerce](/docs/commerce/#abandoned-carts).

The event is sent once each time the cart is abandoned. If the cart is [updated](/docs/api-reference/carts/upsert/) later, it's active again and can be abandoned, and the event sent, again. A cart that was converted by an order is never abandoned.

> **Commerce is in alpha:** Commerce is open only to the Emailit team while we test it. See [Who can use Commerce](/docs/commerce/#who-can-use-commerce).

Webhook requests carry a JSON array of events like this one; see [Webhook requests](/docs/webhooks/webhook-requests/).

```json
{
  "event_id": "evt_3xbAvDuFw01rXuy7pQR7EK2oAu2",
  "type": "cart.abandoned",
  "object": {
    "object": "cart",
    "id": "crt_3Rx784H7VYWRTViadjbp5oKHRud",
    "external_id": "c-58f1a2",
    "contact_id": "con_3EwrXnu9OaQWlfI1AyPUUEoYjQs",
    "email": "ada@example.com",
    "status": "abandoned",
    "currency": "USD",
    "total": 107,
    "items": [
      {
        "product_id": "8123456789",
        "variant_id": "42-blue",
        "sku": "TRS-BLU-42",
        "title": "Trail running shoe",
        "quantity": 1,
        "unit_price": 89,
        "total": 89,
        "url": "https://shop.example.com/products/trail-running-shoe",
        "image_url": "https://shop.example.com/images/trail-running-shoe.jpg"
      },
      {
        "product_id": "8123456790",
        "variant_id": null,
        "sku": null,
        "title": "Merino running socks",
        "quantity": 2,
        "unit_price": 9,
        "total": 18,
        "url": "https://shop.example.com/products/merino-running-socks",
        "image_url": "https://shop.example.com/images/merino-running-socks.jpg"
      }
    ],
    "checkout_url": "https://shop.example.com/cart/recover/c-58f1a2",
    "source": "js",
    "abandoned_at": "2026-10-08T13:31:04.118Z",
    "converted_at": null,
    "converted_order_id": null,
    "created_at": "2026-10-08T12:12:47.630Z",
    "updated_at": "2026-10-08T12:28:51.902Z"
  },
  "data": {
    "object": {
      "object": "cart",
      "id": "crt_3Rx784H7VYWRTViadjbp5oKHRud",
      "external_id": "c-58f1a2",
      "contact_id": "con_3EwrXnu9OaQWlfI1AyPUUEoYjQs",
      "email": "ada@example.com",
      "status": "abandoned",
      "currency": "USD",
      "total": 107,
      "items": [
        {
          "product_id": "8123456789",
          "variant_id": "42-blue",
          "sku": "TRS-BLU-42",
          "title": "Trail running shoe",
          "quantity": 1,
          "unit_price": 89,
          "total": 89,
          "url": "https://shop.example.com/products/trail-running-shoe",
          "image_url": "https://shop.example.com/images/trail-running-shoe.jpg"
        },
        {
          "product_id": "8123456790",
          "variant_id": null,
          "sku": null,
          "title": "Merino running socks",
          "quantity": 2,
          "unit_price": 9,
          "total": 18,
          "url": "https://shop.example.com/products/merino-running-socks",
          "image_url": "https://shop.example.com/images/merino-running-socks.jpg"
        }
      ],
      "checkout_url": "https://shop.example.com/cart/recover/c-58f1a2",
      "source": "js",
      "abandoned_at": "2026-10-08T13:31:04.118Z",
      "converted_at": null,
      "converted_order_id": null,
      "created_at": "2026-10-08T12:12:47.630Z",
      "updated_at": "2026-10-08T12:28:51.902Z"
    }
  }
}
```

## Fields

- `event_id` (string): Event ID (`evt_…`). A retried request carries the same ID, so use it to skip events you already handled. You can also look the event up with [Retrieve an event](/docs/api-reference/events/get/).

- `type` (string): Always `cart.abandoned`.

- `object` (object): The cart the event describes. Its fields are listed below.

- `data.object` (object): The same object again, in the shape that the [Events API](/docs/api-reference/events/get/) returns in `data`.

### Cart object

The same object as [Retrieve a cart](/docs/api-reference/carts/get/) returns.

- `id` (string): Cart ID (`crt_…`).

- `object` (string): Always `cart`.

- `external_id` (string): The cart or checkout ID in your shop. Carts from the tracking script without their own ID use `web:` plus the visitor's anonymous ID.

- `contact_id` (string): The contact the cart belongs to (`con_…`).

- `email` (string | null): The buyer's email address.

- `status` (string): Always `abandoned`.

- `currency` (string | null): Three-letter ISO 4217 code of the amounts.

- `total` (number): Cart value.

- `items` (object[]): Line items, each with `product_id`, `variant_id`, `sku`, `title`, `quantity`, `unit_price`, `total`, `url` and `image_url`.

- `checkout_url` (string | null): Link that brings the buyer back to the cart.

- `source` (string): `api`, or `js` for carts from the tracking script.

- `abandoned_at` (string): When Emailit marked the cart abandoned, in ISO 8601 UTC.

- `converted_at, converted_order_id` (null): Always `null` in this event.

- `created_at, updated_at` (string): When the cart was first stored and when it last changed, in ISO 8601 UTC.

---
Source: https://emailit.com/docs/webhooks/events/cart/cart-abandoned/
