# Repeat buyers in Delhi

> Build a live segment of customers in Delhi (or any cities) who ordered at least twice, and use it in a campaign, a journey or an ad audience.

URL: https://docs.lemuai.com/recipes/repeat-buyers-segment
For: Everyone
Checked against LemuAI app version 1.0.12
Related: [Segments](https://docs.lemuai.com/segments/overview), [Calculated fields](https://docs.lemuai.com/segments/calculated-fields), [Ad audiences](https://docs.lemuai.com/ads/overview), [Contacts and data](https://docs.lemuai.com/troubleshooting/contacts-and-data)

At the end you'll have a segment that always holds your customers in Delhi who placed at least two orders, updated every 15 minutes, ready for a campaign, a journey or an ad audience.

## Before you start

- Contacts have a city: a contact field or custom field like `city` (from an import, Shopify's shipping address, or a form).
- Orders reach LemuAI as `Purchase` events (Shopify, the tracking snippet or the events API). Check the [Event Log](https://docs.lemuai.com/event-log/overview).

## Steps

**Step: New segment**

**Audience → Segments → New segment**. Name: `Repeat buyers, Delhi`.

**Step: City rule**

**+ Rule** → **Contact property** → `city` → **is in** → `Delhi, New Delhi, Gurgaon, Noida`. Matching ignores upper and lower case; list every spelling your data has.

**Step: Orders rule**

**+ Rule** → **Did an event** → **did** `Purchase` **at least 2 times**. Leave the days empty for "ever", or set `in the last 365 days`.

**Step: Check the joiner and save**

Keep the word between the two rules as **and**. The right panel shows how many match and a few examples; **In plain words** should read like "city is in Delhi, New Delhi, Gurgaon, Noida, and did Purchase at least 2 times". Click **Create segment**.

## Variations

- **Big spenders only:** create a [calculated field](https://docs.lemuai.com/segments/calculated-fields) `total_spent` (Total of a property `value` on `Purchase`), then add the rule `total_spent ≥ 10000`.
- **Repeat buyers who've gone quiet:** add **Did an event** → **didn't do** `Purchase` in the last 60 days.
- **About to leave:** turn on [Predictions](https://docs.lemuai.com/segments/predictions) and add `Churn risk level is high`.
- **Exclude a list:** **In a list (Contacts)** → **is not in** your "Do not contact" list.

## Use it

- **Campaign:** **Engage → Campaigns → WhatsApp**, audience = the segment.
- **Journey:** trigger **Enters or leaves a segment**, so everyone who becomes a repeat buyer gets a thank-you or loyalty offer.
- **Ads:** sync it to Meta or Google under [Ad audiences](https://docs.lemuai.com/ads/overview).

## Check it worked

Open the segment: the member count and list fill in within a few minutes. Open a member's **Timeline** (**Audience → Contacts**) to see their orders.

## Common problems

| What you see | Fix |
|---|---|
| 0 members | Check the city values in your contacts (Delhi vs delhi vs DELHI is fine; "Dilli" isn't). Check orders are `Purchase` events in the Event Log |
| "{rule}: at most 500 values" | Use fewer values, or put the cities in a list |
| A rule shows "a value is needed" | Fill in every rule's value box |
