# ecommerce

> Part of the Cowliss docs. Markdown for every page: append `index.md` to its URL. Site map: /llms.txt

<!-- GENERATED by apps/docs/scripts/generate-blueprints.ts. Do not edit. Regenerate with `pnpm -F cowliss-docs generate`. -->

The lifecycle of an online store: welcome, cart recovery, thanks and review, replenishment, winback, and a VIP thank-you.

[See the emails this blueprint sends](https://cowliss.com/blueprints/ecommerce)

## Automations

| Automation | What it does |
| --- | --- |
| `abandoned-checkout` | Reminds someone who left items in their cart, twice at most. |
| `first-order-thanks` | Thanks a first-time customer, then asks how the order went once it arrives. |
| `replenishment` | Reminds a regular customer to reorder before they run out. |
| `vip` | Thanks a customer who has spent past the VIP threshold. |
| `welcome` | Introduces the store to a shopper who has not ordered yet. |
| `winback` | Invites a customer back who has not ordered in months. |

## Events it needs

These are names your own app sends through `track`, not names Cowliss defines. Rename them in the copied files to whatever your app already sends.

| Event | Named by |
| --- | --- |
| `checkout.started` | `abandoned-checkout` |
| `order.delivered` | `first-order-thanks` |
| `order.placed` | `abandoned-checkout`, `first-time-buyers`, `lapsed`, `repeat-buyers`, `replenishment`, `welcome`, `winback` |
| `product.viewed` | `welcome` |

## Traits it reads

These are traits your own app sends through `identify`, and the blueprint's segments compare them. Until your app sends one, nobody matches.

| Trait | Read by |
| --- | --- |
| `email` | `welcome` |
| `lifetimeValue` | `vip-customers` |

## Segments

| Segment | Who is in it |
| --- | --- |
| `first-time-buyers` | Placed one order and has not ordered again. |
| `lapsed` | Ordered at some point, and nothing in the last 120 days. |
| `repeat-buyers` | Placed at least two orders. |
| `vip-customers` | Lifetime spend of 500 or more. |

## Copy it

```sh
cow init --blueprint ecommerce
```

Every file above lands in your repo, yours to edit. In a repo that already has a `cow.json`, add it with `cow add blueprint ecommerce` instead.
