> For the complete documentation index, see [llms.txt](https://help.twinr.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.twinr.dev/push/abandoned-cart-push-notification.md).

# Abandoned Cart Notification

Remind customers about items left in their cart.

Most carts are never checked out. An abandoned cart reminder brings those customers back — a notification a day or two later, pointing at the cart they left behind.

{% hint style="info" %}
Abandoned Cart is a **Premium** campaign type, and it needs push working first — see [Enable Push Notification](https://help.twinr.dev/push/firebase-push-notification/enable-push-notification.md).
{% endhint %}

## Set it up

Open **Engage**, click **+ Create campaign**, and choose **Abandoned cart notification**.

Turn on **Abandoned cart reminders**. The settings stay hidden until you do.

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2Fgit-blob-51dff5758666b497a8cbd090b55739c752338b41%2Fabandoned-cart-detection.png?alt=media" alt="The Abandoned cart notification panel showing Cart detection with Selector and Script options"><figcaption></figcaption></figure>

## Cart detection

This is how the app knows a cart has something in it. Two ways:

### Selector

Use this when your cart counter has a class or id. Enter it with the right prefix — `.` for a class, `#` for an id:

```
.cart-count
#CartCount
```

Find it by opening your site in a desktop browser, right-clicking the cart counter and choosing **Inspect**.

{% hint style="info" %}
Put something in your cart first. Many themes hide the counter entirely when the cart is empty, so there is nothing to inspect.
{% endhint %}

### Script

Use this when your cart counter has no class or id to target. Your script must return `true` when the cart has items and `false` when it does not:

```javascript
if (document.querySelector('.Header__CartDot.is-visible')) {
    true
} else {
    false
}
```

## Message

<figure><img src="https://3731994945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MlBy5z08zL1UoCwNqmg%2Fuploads%2Fgit-blob-8cf4cfe50c781693703d4d07736f608d6a784602%2Fabandoned-cart-schedule.png?alt=media" alt="The Message, Schedule and Link when tapped fields"><figcaption></figcaption></figure>

| Field         | What to enter                                                        |
| ------------- | -------------------------------------------------------------------- |
| **Title**\*   | The notification's heading — *You left something behind*.            |
| **Message**\* | The line below it — *Your cart is waiting. Complete your order now.* |

The phone preview on the right shows how it will look, with an **iOS / Android** switch.

## Schedule

**Schedule** takes comma-separated days, and sends one reminder for each. `1,3,7` reminds a customer one day, three days and seven days after they abandon.

{% hint style="warning" %}
Three reminders is plenty. A customer who ignored the first two has decided; a fourth and fifth are how you get your notifications switched off altogether.

Start with `1,3`. The first day catches genuine distraction — the usual reason a cart is left.
{% endhint %}

## Link when tapped

**Optional.** Leave it empty and the notification simply opens your app. Enter a URL and it opens that page instead.

Your cart page is the obvious choice: the customer taps the reminder and is looking at exactly what they left.

## Save

Click **Save as draft**. The footer tells you what is still missing until every required field is filled.

{% hint style="warning" %}
Cart detection depends on your website's markup. A theme update that renames your cart counter stops reminders going out — silently, with no error. Check this after any theme change.
{% endhint %}
