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

# How Customer Segments Are Built

> How storekit builds the RFM customer segments in Customers → Insights: who counts as a customer, what a visit is, and how recency and visit scores pick the segment.

The **Customer segments** card on **Customers** → **Insights** groups your customers by how recently and how often they have visited over the last 24 months. This page explains how each customer is scored and placed in a segment. To work with the customers in a segment, see [Customer Data → Segments](https://storekit.com/docs/guides/marketing/customer-data.md#segments).

## What the Card Shows

The card has a table with one row per segment, showing **Customers**, **% of customers**, **% of spend** and **Spend per customer**. Next to it, switch between **Grid** (**Recency × visits**, the customer count in each score combination) and **Treemap** (**Segment size**, with boxes sized by **Spend** or **Customers**). Click a segment in the table, grid or treemap to open its customer list on the **Segments** tab of **Customers** → **Lists**.

* The card only appears for users with access to every store on the account, because customers are scored across all of your stores.
* It reflects the last 24 months as of today. The date range at the top of the page does not change it.
* It needs at least 100 identified customers in the last 24 months. Below that, the card says segments will appear once you reach 100.
* Picking stores in the store selector limits the counts to customers whose most recent visit was at one of those stores. Their scores are still worked out against all of your customers.

## Who Counts as a Customer

Segments are built from online orders and Pay at Table payments. A customer is anyone who left a usable email address or phone number, and who visited at least once in the last 24 months.

* **One customer across all stores.** The same email address at two of your stores is one customer. A phone number used with exactly one email address is joined to that customer; otherwise it counts as its own customer.
* **Guests with no contact details are not counted**, because there is no way to tell their visits apart.
* **Placeholder details are left out**, such as `test@test.com`, `info@…` or `no@…`, and addresses on domains like `example.com` or `storekit.com`.
* **Shared details are left out.** An email address or phone number used with 10 or more different first names is treated as a shared address (for example, your own venue email typed in at the counter) rather than a customer.

## What Counts as a Visit

A visit is one meal or one order, not one payment:

* **Pickup and delivery orders** are one visit each.
* **A table sitting** is one visit: the Pay at Table bill, its payments and any QR orders placed on that bill.
* **Several in-store orders by the same customer at the same store** count as one visit when each is placed within 4 hours of the previous one, such as ordering drinks and then food from the table.
* **An in-store order not linked to a bill** joins the same customer's Pay at Table payment at that store if it was within 4 hours.

Spend for a visit is what the customer paid: the order total for an online order, or the Pay at Table payments for a table sitting, plus any prepaid orders that weren't added to the bill.

## How Customers Are Scored

Each customer gets three scores from 1 to 5. Recency and visits pick the segment; spend is shown alongside it.

| Score | How it is worked out | 5 means |
| - | - | - |
| **Recency** | Customers are ranked by the date of their last visit and split into fifths, against your other customers | Among the most recent fifth of your customers |
| **Frequency** | Visits in the last 24 months, in fixed bands: 1 visit = 1, 2 visits = 2, 3–4 visits = 3, 5–9 visits = 4, 10 or more visits = 5 | 10 or more visits |
| **Spend** | Customers are ranked by their spend in the last 24 months and split into fifths, against your other customers | Among the top fifth of spenders |

Ties share a score: customers with exactly the same spend, or the same last visit time, get the same score.

### How the Fifths Are Calculated

Recency and spend are scored the same way. Your customers are put in order from lowest to highest (oldest last visit first, or smallest spend first) and numbered from 1. Each customer's score is:

**Score = 1 + (5 × (position − 1) ÷ number of customers), rounded down**

With 1,000 customers, positions 1–200 score 1, 201–400 score 2, 401–600 score 3, 601–800 score 4 and 801–1,000 score 5. Visits are not ranked: the score comes straight from the visit count bands.

### Worked Example

An account has 1,000 identified customers who visited in the last 24 months.

| | Sarah | Tom |
| - | - | - |
| Last visit | 3 days ago, position 950 of 1,000 | 14 months ago, position 120 of 1,000 |
| **Recency** | 5 × 949 ÷ 1,000 = 4.7, rounded down to 4, plus 1 = **5** | 5 × 119 ÷ 1,000 = 0.6, rounded down to 0, plus 1 = **1** |
| Visits in 24 months | 6 | 12 |
| **Frequency** | 5–9 visits = **4** | 10 or more visits = **5** |
| Spend in 24 months | £180, position 750 of 1,000 | £420, position 940 of 1,000 |
| **Spend** | 5 × 749 ÷ 1,000 = 3.7, rounded down to 3, plus 1 = **4** | 5 × 939 ÷ 1,000 = 4.7, rounded down to 4, plus 1 = **5** |
| Segment (from the grid below) | R5 with 5–9 visits = **Champions** | R1 with 10+ visits = **Can't lose** |

Tom spends more than Sarah, but 880 of the account's customers have visited more recently than him, so he lands in **Can't lose**: one of your most frequent customers who has stopped coming.

### Why Recency Is Relative and Visits Are Fixed

**Recency is compared with your own customers** because what counts as "recent" depends on the business. A customer who last came in six weeks ago is overdue at a coffee shop but normal at a special-occasion restaurant. Ranking against your own customers adjusts for that. It also means a customer can move to a lower recency score without doing anything, as other customers visit more recently than they did.

**Visits use fixed bands** because many customers visit only once in two years. Split into fifths, all of those one-time customers would tie and share a score, leaving the fifths uneven and different at every business. With fixed bands, **10+** visits means the same thing everywhere.

**Spend does not change the segment.** A segment describes behaviour: how recently and how often someone comes back. A single large bill, such as a group booking, does not make a one-time customer **Champions**. Spend appears in **% of spend** and **Spend per customer** on the card, and you can filter a segment's customer list by **Spend score** on the **Segments** tab.

## How the Segment Is Picked

The recency and visit scores pick the segment from this fixed grid. It is the same grid as **Recency × visits** on the card.

| Recency | 1 visit | 2 visits | 3–4 visits | 5–9 visits | 10+ visits |
| - | - | - | - | - | - |
| **R5** (most recent) | New | Potential loyalists | Loyal | Champions | Champions |
| **R4** | Promising | Potential loyalists | Loyal | Champions | Champions |
| **R3** | About to sleep | Needs attention | Needs attention | Loyal | Loyal |
| **R2** | Hibernating | Hibernating | At risk | At risk | Can't lose |
| **R1** (least recent) | Lost | Lost | At risk | At risk | Can't lose |

## The Segments

| Segment | Who is in it | Where they sit in the grid |
| - | - | - |
| **Champions** | Visited recently and often | R4–R5, 5 or more visits |
| **Loyal** | Visit regularly | R4–R5 with 3–4 visits, or R3 with 5 or more |
| **Potential loyalists** | Recent customers with a few visits | R4–R5, 2 visits |
| **New** | Visited once, very recently | R5, 1 visit |
| **Promising** | Visited once, fairly recently | R4, 1 visit |
| **Needs attention** | Some visits, now slowing down | R3, 2–4 visits |
| **About to sleep** | Visited once, a while ago | R3, 1 visit |
| **At risk** | Visited often, but not recently | R1–R2, 3–9 visits |
| **Can't lose** | Your most frequent customers, gone quiet | R1–R2, 10 or more visits |
| **Hibernating** | Few visits, long ago | R2, 1–2 visits |
| **Lost** | Least recent, fewest visits | R1, 1–2 visits |

A customer with no visit in the last 24 months drops out of the segments altogether.

## Related

> [card] [Customer Data](https://storekit.com/docs/guides/marketing/customer-data.md)
>
> Browse, search and export your customers

> [card] [Capturing Guest Data](https://storekit.com/docs/guides/guest-data/overview.md)
>
> Collect the details that identify returning customers


## Related topics

- [Customer Data](https://storekit.com/docs/guides/marketing/customer-data.md)
- [Review Events](https://storekit.com/docs/guides/integrations/marketing/klaviyo/review-events.md)
- [Sync Past Orders to Klaviyo](https://storekit.com/docs/guides/integrations/marketing/klaviyo/historical-sync.md)
- [Menu Overview](https://storekit.com/docs/guides/menu/overview.md)
- [Klaviyo](https://storekit.com/docs/guides/integrations/marketing/klaviyo/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.