> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetAbandonedCheckoutAnalytics

# Package: checkout

# Namespace: AbandonedCheckoutService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/abandoned-checkout/get-abandoned-checkout-analytics.md

## Permission Scopes:
Read eCommerce - all read permissions: SCOPE.DC-ECOM-MEGA.READ-ECOM

## Introduction

Retrieves analytics for a site's abandoned checkouts in a date range.

A recoverable checkout is an abandoned checkout that can still be recovered. A recovered
checkout is an abandoned checkout that the customer later returned to and completed.

The date range applies to the date each abandoned checkout's cart was created, in the site's
time zone. A checkout in the range counts as recovered no matter when the customer completed it,
even after the range ends.

To compute a subset of the values, specify `metrics`. To limit the analytics to checkouts in
specific recovery states, specify `statuses`.

---

## REST API

### Schema

```
 Method: getAbandonedCheckoutAnalytics
 Description: Retrieves analytics for a site's abandoned checkouts in a date range.  A recoverable checkout is an abandoned checkout that can still be recovered. A recovered checkout is an abandoned checkout that the customer later returned to and completed.  The date range applies to the date each abandoned checkout's cart was created, in the site's time zone. A checkout in the range counts as recovered no matter when the customer completed it, even after the range ends.  To compute a subset of the values, specify `metrics`. To limit the analytics to checkouts in specific recovery states, specify `statuses`.
 URL: https://www.wixapis.com/ecom/v1/abandoned-checkout/get-analytics
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  startDate, endDate
 Method parameters: 
   param name: endDate | type: endDate | description: Day after the date range ends. The range ends at the beginning of this day, so the range doesn't include it. Date in `YYYY-MM-DD` format, in the site's time zone. For example, `2026-08-01` for a range that ends on July 31, 2026.  Must be after `startDate`. | required: true | validation: minLength 10, format LOCAL_DATE
   param name: metrics | type: array<metrics> | description: Metrics to compute. Each metric you specify populates its matching response field. Response fields for metrics you don't specify aren't returned.  Leave empty to compute every metric.  | validation: maxItems 6
                 - enum:
                 -     RECOVERABLE_VALUE: Total value of recoverable checkouts that weren't recovered yet.
                 -     RECOVERABLE_CHECKOUT_COUNT: Number of recoverable checkouts that weren't recovered yet.
                 -     AVERAGE_RECOVERABLE_CHECKOUT_VALUE: Average value of a recoverable checkout that wasn't recovered yet. Calculated as `recoverableValue / recoverableCheckoutCount`.
                 -     RECOVERED_VALUE: Total value of the checkouts that were later recovered.
                 -     RECOVERED_CHECKOUT_COUNT: Number of checkouts that were later recovered.
                 -     RECOVERY_RATE: Share of recovered checkouts out of all recoverable and recovered checkouts. Calculated as `recoveredCheckoutCount / (recoverableCheckoutCount + recoveredCheckoutCount)`.
   param name: startDate | type: startDate | description: First day of the date range. The range starts at the beginning of this day. Date in `YYYY-MM-DD` format, in the site's time zone. For example, `2026-07-01`. | required: true | validation: minLength 10, format LOCAL_DATE
   param name: statuses | type: array<statuses> | description: Current recovery states to limit the analytics to. Leave empty to include checkouts in any recovery state.  Every metric covers only the checkouts in these states, so a metric for the other state returns `0`. For example, `ABANDONED` with `RECOVERED_VALUE` returns `0`, and `RECOVERED` with `RECOVERABLE_VALUE` returns `0`.  | validation: maxItems 2
                 - enum:
                 -     ABANDONED: Abandoned.
                 -     RECOVERED: Recovered.
 Return type: GetAbandonedCheckoutAnalyticsResponse
  - name: currency | type: string | description: Currency of every monetary amount in this response, which is the site's currency. 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.  | validation: format CURRENCY
  - name: recoverableValue | type: string | description: Total value of recoverable checkouts that weren't recovered yet.  | validation: decimalValue {"gte":"0","maxScale":2}
  - name: recoverableCheckoutCount | type: integer | description: Number of recoverable checkouts that weren't recovered yet.  | validation: format int32
  - name: averageRecoverableCheckoutValue | type: string | description: Average value of a recoverable checkout that wasn't recovered yet. Calculated as `recoverableValue / recoverableCheckoutCount`, or `0` when `recoverableCheckoutCount` is `0`.  | validation: decimalValue {"gte":"0","maxScale":2}
  - name: recoveredValue | type: string | description: Total value of the checkouts that were later recovered.  | validation: decimalValue {"gte":"0","maxScale":2}
  - name: recoveredCheckoutCount | type: integer | description: Number of checkouts that were later recovered.  | validation: format int32
  - name: recoveryRate | type: number | description: Share of recovered checkouts out of all recoverable and recovered checkouts, from `0` to `1`. Calculated as `recoveredCheckoutCount / (recoverableCheckoutCount + recoveredCheckoutCount)`, or `0` when there are no recoverable or recovered checkouts.  | validation: format double


```

### Examples

### Get Abandoned Checkout Analytics
```curl
curl -X POST https://www.wixapis.com/ecom/v1/abandoned-checkout/get-analytics  \
  -H 'Content-Type: application/json;charset=UTF-8' \
  -H 'Authorization: <AUTH>' \
  -d '{
    "startDate": "2026-07-01",
    "endDate": "2026-08-01",
    "metrics": [
      "RECOVERABLE_VALUE",
      "RECOVERABLE_CHECKOUT_COUNT",
      "AVERAGE_RECOVERABLE_CHECKOUT_VALUE",
      "RECOVERED_VALUE",
      "RECOVERED_CHECKOUT_COUNT",
      "RECOVERY_RATE"
    ]
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.ecom.abandonedCheckouts.getAbandonedCheckoutAnalytics(startDate, options)
 Description: Retrieves analytics for a site's abandoned checkouts in a date range.  A recoverable checkout is an abandoned checkout that can still be recovered. A recovered checkout is an abandoned checkout that the customer later returned to and completed.  The date range applies to the date each abandoned checkout's cart was created, in the site's time zone. A checkout in the range counts as recovered no matter when the customer completed it, even after the range ends.  To compute a subset of the values, specify `metrics`. To limit the analytics to checkouts in specific recovery states, specify `statuses`.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  startDate, options.endDate, options
 Method parameters: 
   param name: startDate | type: string | description: First day of the date range. The range starts at the beginning of this day. Date in `YYYY-MM-DD` format, in the site's time zone. For example, `2026-07-01`. | required: true | validation: minLength 10, format LOCAL_DATE
   param name: options | type: GetAbandonedCheckoutAnalyticsOptions  none | required: true 
        - name: endDate | type: string | description: Day after the date range ends. The range ends at the beginning of this day, so the range doesn't include it. Date in `YYYY-MM-DD` format, in the site's time zone. For example, `2026-08-01` for a range that ends on July 31, 2026.  Must be after `startDate`. | required: true | validation: minLength 10, format LOCAL_DATE
        - name: metrics | type: array<Metric> | description: Metrics to compute. Each metric you specify populates its matching response field. Response fields for metrics you don't specify aren't returned.  Leave empty to compute every metric.  | validation: maxItems 6
             - enum:
             -     RECOVERABLE_VALUE: Total value of recoverable checkouts that weren't recovered yet.
             -     RECOVERABLE_CHECKOUT_COUNT: Number of recoverable checkouts that weren't recovered yet.
             -     AVERAGE_RECOVERABLE_CHECKOUT_VALUE: Average value of a recoverable checkout that wasn't recovered yet. Calculated as `recoverableValue / recoverableCheckoutCount`.
             -     RECOVERED_VALUE: Total value of the checkouts that were later recovered.
             -     RECOVERED_CHECKOUT_COUNT: Number of checkouts that were later recovered.
             -     RECOVERY_RATE: Share of recovered checkouts out of all recoverable and recovered checkouts. Calculated as `recoveredCheckoutCount / (recoverableCheckoutCount + recoveredCheckoutCount)`.
        - name: statuses | type: array<Status> | description: Current recovery states to limit the analytics to. Leave empty to include checkouts in any recovery state.  Every metric covers only the checkouts in these states, so a metric for the other state returns `0`. For example, `ABANDONED` with `RECOVERED_VALUE` returns `0`, and `RECOVERED` with `RECOVERABLE_VALUE` returns `0`.  | validation: maxItems 2
             - enum:
             -     ABANDONED: Abandoned.
             -     RECOVERED: Recovered.
 Return type: PROMISE<GetAbandonedCheckoutAnalyticsResponse>
  - name: currency | type: string | description: Currency of every monetary amount in this response, which is the site's currency. 3-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.  | validation: format CURRENCY
  - name: recoverableValue | type: string | description: Total value of recoverable checkouts that weren't recovered yet.  | validation: decimalValue {"gte":"0","maxScale":2}
  - name: recoverableCheckoutCount | type: integer | description: Number of recoverable checkouts that weren't recovered yet.  | validation: format int32
  - name: averageRecoverableCheckoutValue | type: string | description: Average value of a recoverable checkout that wasn't recovered yet. Calculated as `recoverableValue / recoverableCheckoutCount`, or `0` when `recoverableCheckoutCount` is `0`.  | validation: decimalValue {"gte":"0","maxScale":2}
  - name: recoveredValue | type: string | description: Total value of the checkouts that were later recovered.  | validation: decimalValue {"gte":"0","maxScale":2}
  - name: recoveredCheckoutCount | type: integer | description: Number of checkouts that were later recovered.  | validation: format int32
  - name: recoveryRate | type: number | description: Share of recovered checkouts out of all recoverable and recovered checkouts, from `0` to `1`. Calculated as `recoveredCheckoutCount / (recoverableCheckoutCount + recoveredCheckoutCount)`, or `0` when there are no recoverable or recovered checkouts.  


```

### Examples

### Get recovery analytics for a month
Retrieves the recoverable value, the recovered value and the recovery rate of a site's abandoned checkouts for July 2026. The response returns only the 3 metrics that the request specifies.

```javascript
import { abandonedCheckouts } from "@wix/ecom";

async function getAbandonedCheckoutAnalytics() {
  const response = await abandonedCheckouts.getAbandonedCheckoutAnalytics(
    "2026-07-01",
    {
      endDate: "2026-08-01",
      metrics: ["RECOVERABLE_VALUE", "RECOVERED_VALUE", "RECOVERY_RATE"],
    },
  );
  return response;
}

/* Promise resolves to:
 * {
 *   "currency": "USD",
 *   "recoverableValue": "4820.50",
 *   "recoveredValue": "1930.00",
 *   "recoveryRate": 0.2530120481927711
 * }
 */

```

### getAbandonedCheckoutAnalytics (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { abandonedCheckouts } from '@wix/ecom';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { abandonedCheckouts },
  // Include the auth strategy and host as relevant
});


async function getAbandonedCheckoutAnalytics(startDate,options) {
  const response = await myWixClient.abandonedCheckouts.getAbandonedCheckoutAnalytics(startDate,options);
};
```

---