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

# Win back lapsed customers

> Find the customers Lobyco groups as lapsing or churned, give each one a coupon once, and tell them with a push, every week.

This page shows you how to bring back customers who have stopped shopping. Every week, a flow finds the customers who are lapsing or have churned. It gives each of them a coupon, once, and a push tells them about it.

## What you'll build

```mermaid theme={"system"}
flowchart TB
    A["Member segment<br/>Lapsing or Churned<br/>runs weekly"] --> B["Limit (new)<br/>once per customer"]
    B --> C["Offer<br/>Gift"]
    C --> D["Activity event<br/>Assigned"]
    D --> E[Push]
```

Lobyco puts each customer in a group by how recently, how often and how much they shop. The attribute is **Recency Frequency M. Value**, under **Data Science**. This page uses two of its groups, *Lapsing* and *Churned*. Customers move between groups as they shop, so the flow runs every week to find the ones who have just slipped. **[Limit (new)](/business-documentation/campaigns/orchestration-canvas/block-reference#limit-new)** makes sure each customer gets the coupon only once, however many weeks they stay in those groups.

## Settings

| Block | What to set here |
| - | - |
| **Member segment** | **Recency Frequency M. Value**, from **Data Science**, **In** *Lapsing* and *Churned*. A **Recurring** schedule that runs **Weekly**. |
| **Limit (new)** | One rule, *Each customer may pass at most* 1 *times in total*. |
| **Offer** | **Type** **Gift**, a **Validity period** in days, and the win-back discount. |
| **Activity event** | **Assigned**. The block sets it for you. |
| **Push** | Your win-back message. Its **Segmentation** is set to **Custom** for you once it's connected. |

All the dates have to fall inside the campaign's dates, so give the campaign dates that cover the whole time the flow runs.

## Find lapsing and churned customers

Open the campaign's **Orchestration** view, in **Design** mode. From **Segment** in the **Block library**, add a **Member segment** and double-click it. In **Create member segment**, choose **From Scratch**, and name it, such as *Lapsing or churned*.

Open **Segment attributes**, then **Data Science**, and add **Recency Frequency M. Value**. Choose **In**, then pick *Lapsing* and *Churned*.

The other groups are *Loyals*, *One-off Visitors*, *Potentials*, *Small Baskets* and *Uncategorized*. To reach only one group, choose **Equal** instead. [Segment attributes](/business-documentation/audiences-and-data/segment-attributes#attribute-categories) explains the groups.

## Run it every week

Go back to **Add Segment details**. In the schedule panel, named after the flow, such as **Schedule - Flow 1**, set these fields.

| Field | What to set here |
| - | - |
| **Schedule type** | **Recurring**. |
| **Start date** | The first run. It can't be in the past. |
| **End date** | The campaign's end date, or earlier. |
| **Frequency** | **Weekly**, with one day picked in **Select days**, such as Monday. |

Select **Save**. This block has the **Start** tab, so it holds the schedule for the whole flow.

## Give each customer the coupon once

From **Controls**, add a **Limit (new)** and connect the **Member segment** to it. **Controls** also lists **Limit (soon deprecated)**. Don't pick that one, because it's being retired. Double-click the **Limit (new)**, give it a **Name**, and select **Add limit**.

Fill in the per-customer rule so it reads *Each customer may pass at most* 1 *times in total*. Then select **Save**. That rule never resets, so a customer who is still lapsing next week doesn't get a second coupon.

## Add the coupon

From **Activity**, add an **Offer**. Connect the **Limit (new)** to it first, then double-click the **Offer** and choose **From Scratch**. Connecting it first means the **Type** list shows only the types a flow can hand out, and the form leaves out **Segmentation**.

Fill in the offer as described in [Create an offer](/business-documentation/activities/offers/create-an-offer). These settings make it a win-back coupon.

* In **Details**, set **Type** to **Gift** before anything else. That switches on **Pre-activated**. Leave it on, so the coupon works without the customer activating it in the app.
* Set **Validity period** to how many days the customer has to use it, such as 14. The days count from when the flow gives it out. A coupon never lasts past the offer's end date, so set the offer's dates to cover the whole campaign.
* In **Discount**, set up the win-back discount, such as 20% off the basket. See [Discount types](/business-documentation/activities/offers/discount-types).

Select **Publish** and confirm. Publishing the flow doesn't publish the coupon. If you don't publish it here, the flow runs every week and gives nobody a coupon.

## Add a push

From **Trigger**, add an **Activity event** and connect the **Offer** to it. It reads **Assigned**, the one event an offer has.

From **Activity**, add a **Push** and connect the **Activity event** to it. Write your message, as described in [Push notifications](/business-documentation/communication/push), and publish it from its form. A push that isn't published when the flow reaches it doesn't go out, and isn't sent later.

## Save and publish the flow

Select **Save** at the top right of the canvas. Then select **Publish** on the **Member segment**, the block with the **Start** tab, and confirm.

Before the first run, you can open the chevron beside **Publish** and choose **Count**. It shows how many customers the segment would find, without giving out coupons or sending anything.

## Check the result

After the first weekly run, check these things.

* Open **History** on the canvas. There's a run card started by **Scheduled**, with the status **Done**.
* Select the run, then the **Member segment**. Its **Count** is how many customers were lapsing or churned that week.
* After the second run, the push only reaches customers who are new to those groups. Customers who already got the coupon stop at the **Limit (new)**.

[Follow each run in History](/business-documentation/campaigns/schedule-and-run-a-campaign#follow-each-run-in-history) explains every run status.

## Variation: decide who counts as lapsed

To decide for yourself what counts as lapsed, build it from purchase dates instead. One segment finds customers who used to shop with you, a second finds everyone who shopped recently, and **[Exclude](/business-documentation/campaigns/orchestration-canvas/block-reference#exclude)** keeps the first without the second.

```mermaid theme={"system"}
flowchart TB
    A["Member segment<br/>Shopped 61 to<br/>180 days ago"] -->|"Include input 1"| C[Exclude]
    B["Member segment<br/>Shopped in the<br/>last 60 days"] -->|"Exclude input 2"| C
    C --> D["Limit (new)<br/>once per customer"]
```

1. In the scheduled **Member segment**, replace the rule with two from **Purchase**: **Receipt count** **Greater or equal** 2, and **Purchase date** **Between**, with **Float**, **From** 180 **to** 61. Name it *Used to shop*.
2. Add a second **Member segment**, *Shopped recently*, with **Receipt count** **Greater or equal** 1 and **Purchase date** **Between**, with **Float**, **From** 60 **to** 0. It doesn't need a schedule. Once it's connected, it runs on the first segment's schedule.
3. From **Operators**, add an **Exclude**. Connect *Used to shop* to **Include input 1** and *Shopped recently* to **Exclude input 2**.
4. Connect the **Exclude** to the **Limit (new)**, in place of the segment.

Check the ports before you save. Connected the wrong way round, the flow gives the coupon to your recent shoppers instead, with no warning. Change the numbers to match how often your customers usually shop.

![The Orchestration view of the campaign Autumn loyalty journeys, in Design mode at 100%, with the Block library and Use templates panels collapsed. On the left are two Member segment blocks. The top one, Used to shop, carries the Start tab for Flow 10 and a Publish button. The one below it, Shopped recently, has no Start tab. Both show a collapsed Attributes section. On the right, an Exclude block lists two inputs, Include input 1 and Exclude input 2. A grey link runs from Used to shop to Include input 1, and a red link runs from Shopped recently to Exclude input 2.](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/usecase-33-two-segments-into-exclude.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=4aa1201560bd38ba1988cf90fd60a7e9)

*The two segments connected to Exclude*

## Related

* [Segment attributes](/business-documentation/audiences-and-data/segment-attributes) explains **Recency Frequency M. Value** and the **Purchase** attributes.
* [Block reference](/business-documentation/campaigns/orchestration-canvas/block-reference) describes the **Limit (new)**, **Exclude** and **Activity event** blocks in full.
* [Schedule and run a campaign](/business-documentation/campaigns/schedule-and-run-a-campaign) describes every schedule frequency, and running a flow by hand.
* [Give customers a birthday voucher](/business-documentation/use-cases/give-customers-a-birthday-voucher) builds the same coupon-and-push ending from a daily segment.


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