> ## Documentation Index
> Fetch the complete documentation index at: https://docs.livyapps.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cart recovery

> Recover lost sales with automated emails and discounts.

Livy detects abandoned carts and runs a recovery sequence: an email
to the customer with an incentive to complete the purchase.

## How it works

<Steps>
  <Step title="Cart detection">
    Livy records the abandoned cart with its data: products, amount, and images.
    It's saved even if the customer hasn't left their email yet.
  </Step>

  <Step title="Marketing gate">
    Before sending, the customer's consent and eligibility are validated. The
    incentive (credit, discount, or email) only runs if it passes the gate.
  </Step>

  <Step title="Recovery email">
    The email is sent with the cart's featured item and the incentive. The language
    is detected automatically based on the store.
  </Step>

  <Step title="Sale attribution">
    The recovered sale is attributed by the **checkout token** of the completed
    cart, not by the code. This avoids misattribution when there are multiple
    codes or cross purchases.
  </Step>
</Steps>

## Incentive types

<CardGroup cols={2}>
  <Card title="Automatic discount" icon="percent">
    Livy generates a unique percentage discount code for that customer.
  </Card>

  <Card title="Static code" icon="ticket">
    You use a fixed code of your own, instead of the automatic one.
  </Card>
</CardGroup>

<Warning>
  The incentive is only applied if the customer passes the **marketing gate**
  (consent + eligibility). If they don't pass, no email is sent and no credit or
  discount is generated.
</Warning>

## Carts without an email

Even if the customer hasn't left their email, Livy persists the cart and records
the consent status. This feeds opt-in metrics without sending anything to anyone
who didn't consent.

## Related metrics

* Carts detected vs recovered
* Email open and click rates
* Honest ROI: recovered revenue net of the incentive and platform cost
