Skip to content
Log in

Process empty and abandoned carts

On this page

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

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.

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 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.

Was this article helpful?

Was this article helpful?