{"title":"Process empty and abandoned carts","slug":"abandoned-carts","url":"https://support.storeconnect.com/articles/abandoned-carts","url_markdown":"https://support.storeconnect.com/articles/abandoned-carts.md","subtitle":null,"summary":"Configure how StoreConnect automatically marks idle web carts as abandoned or deletes empty ones, set the abandonment time via a Store Variable, and manually manage flagged carts.","type":"Help_Documentation","video_url":"","keywords":"abandoned carts, empty carts, cart abandonment, cart cleanup, store variable, cart abandoned hours, scheduled job, web carts, cart status, manually delete carts, remove abandoned flag, idle carts","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## How the abandoned cart job works\n\nStoreConnect 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:\n\n1.  Carts with items (and no linked order): the **Abandoned** checkbox is set to selected.\n2.  Carts without items (empty carts): the cart record is deleted.\n\nA cart is eligible for processing only if all of the following apply:\n\n-   **Source** is `web`.\n-   **Status** is one of `customer`, `shipping`, `terms_and_conditions`, `payment`, or `failed`.\n-   The **Abandoned** checkbox is not already selected.\n-   The cart was created within the configured time range.\n\n:::note\nEligibility 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.\n:::\n\n#### Decision logic\n\n```text\n\nIs the cart eligible?\n\n  ↓ Yes\n\nDoes it have items?\n\n  ↓ Yes → Does it have a linked order?\n\n              ↓ Yes → Skip\n\n              ↓ No  → Mark as Abandoned\n\n  ↓ No  → Delete the cart record\n```\n\n## Configure cart abandonment time\n\nThe 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.\n\n| Setting | Value                                                          |\n|---------|----------------------------------------------------------------|\n| Default | 10 hours                                                       |\n| Minimum | 1 hour (values of 0 or negative revert to the 10-hour default) |\n| Maximum | 1,080 hours (45 days)                                          |\n\nThe 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.\n\n### To change the default abandonment time\n\n1.  Go to the **Store** record for the store you want to configure.\n2.  Go to the **Store Variables** related list and click **New**.\n3.  Give the variable a name.\n4.  In the **Key** field, enter `cart_abandoned_hours`.\n5.  In the **Value** field, enter the number of hours (for example, `24`).\n6.  Click **Save**.\n\n![Change cart abandonment time](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677745/documentation-media/cart-abandoned-store-variable.png)\n\n## POS cart differences\n\nPOS 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`.\n\n## Manually remove the abandoned flag\n\nIf a customer contacts support and wants to resume a cart that has been marked as abandoned, an admin can clear the flag.\n\n1.  Go to the **Cart** record.\n2.  Click **Edit**.\n3.  Uncheck the **Abandoned** checkbox.\n4.  Click **Save**.\n\nClearing the **Abandoned** checkbox makes the cart resumable, but whether the customer can access it again depends on whether they were logged in.\n\n#### Logged-in customers\n\nBecause 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).\n\n#### Guest customers\n\nA 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.\n\n## Manually delete empty carts\n\nThe abandoned cart job handles empty cart cleanup automatically. If manual cleanup is needed:\n\n1.  Go to the **Carts** list.\n2.  Create a [list view or report](review-carts-and-generate-cart-reports) filtered for carts with no related Cart Items.\n3.  Before deleting, confirm that each cart has:\n    -   No related Cart Item records\n    -   No linked Order record\n    -   No active checkout session (check the **Status** and last modified date)\n4.  Delete the records as appropriate."}