# Process empty and abandoned carts

Source: https://support.storeconnect.com/articles/abandoned-carts · Last modified 21 August 2026

## How the abandoned cart job works

StoreConnect runs a scheduled background job that processes carts that have been idle for longer than a configured period. For each eligible cart, the job takes one of two actions:

1.  Carts with items (and no linked order): the **Abandoned** checkbox is set to selected.
2.  Carts without items (empty carts): the cart record is deleted.

A cart is eligible for processing only if all of the following apply:

-   **Source** is `web`.
-   **Status** is one of `customer`, `shipping`, `terms_and_conditions`, `payment`, or `failed`.
-   The **Abandoned** checkbox is not already selected.
-   The cart was created within the configured time range.

:::note
Eligibility applies within a window. With the default 10-hour setting, only carts between 10 and 22 hours old are processed. Carts older than 22 hours are never marked as abandoned or deleted, even though they have passed the abandonment time. Carts in `open` status are also excluded; empty `open` carts are never deleted automatically.
:::

#### Decision logic

```text

Is the cart eligible?

  ↓ Yes

Does it have items?

  ↓ Yes → Does it have a linked order?

              ↓ Yes → Skip

              ↓ No  → Mark as Abandoned

  ↓ No  → Delete the cart record
```

## Configure cart abandonment time

The period after which a cart is considered abandoned is set per store using a **Store Variable**. The default is 10 hours if no variable is set.

| Setting | Value                                                          |
|---------|----------------------------------------------------------------|
| Default | 10 hours                                                       |
| Minimum | 1 hour (values of 0 or negative revert to the 10-hour default) |
| Maximum | 1,080 hours (45 days)                                          |

The job uses a 12-hour lookback window. For example, with a 10-hour abandonment period, the job processes carts created between 22 hours ago and 10 hours ago. This prevents the same carts from being reprocessed on every run.

### To change the default abandonment time

1.  Go to the **Store** record for the store you want to configure.
2.  Go to the **Store Variables** related list and click **New**.
3.  Give the variable a name.
4.  In the **Key** field, enter `cart_abandoned_hours`.
5.  In the **Value** field, enter the number of hours (for example, `24`).
6.  Click **Save**.

![Change cart abandonment time](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677745/documentation-media/cart-abandoned-store-variable.png)

## POS cart differences

POS carts are excluded from automated abandoned cart processing. They are never automatically marked as abandoned or deleted, and persist in Salesforce until manually managed. The same applies to carts with a **Source** of `api` or `manual`.

## Manually remove the abandoned flag

If a customer contacts support and wants to resume a cart that has been marked as abandoned, an admin can clear the flag.

1.  Go to the **Cart** record.
2.  Click **Edit**.
3.  Uncheck the **Abandoned** checkbox.
4.  Click **Save**.

Clearing the **Abandoned** checkbox makes the cart resumable, but whether the customer can access it again depends on whether they were logged in.

#### Logged-in customers

Because the cart is linked to the customer's account, no session cookie is needed. Once the flag is cleared, the cart is available again the next time they log in, and appears in their saved carts if you use [Manage multiple carts per customer](manage-multiple-carts-per-customer).

#### Guest customers

A guest cart is identified only by the `sc_token` cookie in the customer's browser. Clearing the flag restores the cart only if that same browser still has the original cookie. If the cookie no longer exists (for example, the customer used a different device, a private window, or cleared their browser data), there is no way to reconnect them to the cart, and they must start a new one.

## Manually delete empty carts

The abandoned cart job handles empty cart cleanup automatically. If manual cleanup is needed:

1.  Go to the **Carts** list.
2.  Create a [list view or report](review-carts-and-generate-cart-reports) filtered for carts with no related Cart Items.
3.  Before deleting, confirm that each cart has:
    -   No related Cart Item records
    -   No linked Order record
    -   No active checkout session (check the **Status** and last modified date)
4.  Delete the records as appropriate.

---

## Follow StoreConnect

- [Email Newsletter](https://getstoreconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://getstoreconnect.com/partners)
- [News](https://getstoreconnect.com/articles/news)
- [Events](https://getstoreconnect.com/articles/events)
- [Feature Comparison](https://getstoreconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://getstoreconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

---

StoreConnect Support — https://support.storeconnect.com/articles/abandoned-carts