---
name: retention_marketing
description: Plan and run retention marketing for existing customers: define lifecycle stages from the actual repurchase cycle, map triggers, build onboarding, second-purchase, loyalty, at-risk, win-back, and renewal sequences, and measure repeat behavior with cohort, RFM, and revenue retention instead of new clicks. Use when repeat purchases are flat, churn or lapses are rising, a win-back or loyalty program needs building, or acquisition reporting hides weak repeat behavior. Vendor-neutral, works for ecommerce, services, and subscriptions.
---

# Retention Marketing

## Purpose
Keep customers who already bought. Retention work starts after the first transaction, uses the customer's own buying rhythm to decide when to reach out, and judges itself on repeat orders, retained revenue, and cohort survival. It does not judge itself on opens, clicks, or new signups.

Separate this job from neighbours: cohort analysis alone only measures, a loyalty program alone only rewards, and a churn model alone only predicts. This skill connects measurement to the sequences that act on it.

## Workflow

### 1. Name the model and the unit
- Transactional (ecommerce, services, retail): unit is the customer, success is a repeat order.
- Subscription: unit is the account, success is renewal plus retained revenue. Track logo retention and revenue retention separately.
- Hybrid: run both views. A retained account that quietly downgrades is not the same as a retained account that holds spend.
Write down what counts as active, at-risk, and lapsed before building anything. Use the business's own timing, not a round number copied from another company.

### 2. Get the repurchase cycle from data
Export completed orders only. Exclude cancelled, refunded, test, and internal orders, and say what you excluded.
Compute, per segment if volume allows:
- Median days between orders for repeat buyers. This is the repurchase interval.
- Time to second purchase, median.
- Repeat purchase rate, purchase frequency, and average order value.
Working thresholds, to be replaced by the data where it disagrees:
- At-risk: no order at 1.5 times the median repurchase interval.
- Lapsed: no order at 2 times that interval.
Run `bin/retention_calc.py` on a transactions CSV to get these numbers, cohort retention, RFM scores, and the at-risk and lapsed lists in one pass. See Output Contract for the CSV shape. Do not trust quintile RFM on a tiny base: with fewer than about 100 customers, use raw recency, frequency, and spend cutoffs set by hand.

### 3. Segment two ways
Lifecycle stage, by where the customer sits now:
| Stage | Entry signal | Job |
|---|---|---|
| First-time buyer | First completed order | Onboard, get a first good outcome, reduce returns or regret |
| Active | Second order inside the normal interval | Protect the rhythm, grow frequency or basket |
| Loyal | High order count or high cumulative value | Recognise, early access, referrals, no routine discounting |
| At-risk | Past 1.5 times the interval, no order | One timely, specific reason to return |
| Lapsed | Past 2 times the interval, no order | Win-back sequence, then sunset |
| Advocate | Review, referral, or public recommendation | Ask, thank, and make the next referral easy |

RFM, by value and behaviour: score Recency (days since last order), Frequency (order count), and Monetary (total spend) from 1 to 5 by quintile. Map scores to action, not labels for their own sake:
- High R, high F, high M: champions. Protect and recognise. Discounting them trains them to wait for offers.
- High R, F of 1: promising first-timers. The second purchase is the highest-value move in the file.
- Low R, previously high F: at-risk value. Personal outreach beats a broadcast offer.
- Low R, low F, low M: hibernating. Cheap automated attempt only, then suppress.
- High M, low F: occasional big spenders, often gift or seasonal buyers. Time outreach to their occasion, not your calendar.

### 4. Map triggers before writing copy
Every sequence needs a trigger, an exit, and a suppression rule. No trigger, no sequence.
| Trigger | Sequence | Exit |
|---|---|---|
| First order placed | Onboarding and first-outcome sequence | Second order, or sequence ends |
| Product delivered, trial ending, or first use stalled | Help and activation check-in | Use confirmed, or support case opened |
| Expected reorder date approaching (consumable, refill, service interval) | Reorder reminder with the exact item | Order placed |
| Milestone reached (order count, anniversary, points, usage) | Loyalty touchpoint | None needed, single touch |
| At-risk threshold crossed | At-risk nudge, one touch, specific | Order, reply, or moves to lapsed |
| Lapsed threshold crossed | Win-back sequence | Order, reply, opt-out, or sunset |
| Renewal in 30 to 60 days (subscription) | Value summary, then renewal sequence | Renewed, downgrade saved, or cancelled |
| Payment failed | Dunning: prompt to update payment, days 1, 3, 7, 14 as a starting cadence | Paid, or cancelled and moved to win-back |
| Cancellation confirmed | Exit survey, then win-back starts after a cooling gap | Return, or suppression period ends |

Suppression, always: opted out, already in the same sequence, bought in the last few days, open support complaint, or won back recently. Mailing someone who just bought is the fastest way to make retention work look careless.

### 5. Build the sequences
Onboarding and first outcome (days 0 to 30):
1. Within 24 hours: confirm what happens next, how to get help, and the one first step that leads to a good result.
2. Early, around the first use or delivery: practical help for that exact product or service, not a brand story.
3. Around day 7 to 21, adjusted to the product: check the outcome. If they stalled, offer help before offering anything to buy.
4. Only after a good outcome: invite the second purchase with a recommendation tied to the first.

Second purchase and habit: time the ask to the repurchase interval, not to a campaign calendar. A refill reminder sent at the median interval plus a few days beats a monthly blast. Track time to second purchase as the headline number for this stage.

Loyalty touchpoints, in order of cost:
- Recognition: anniversary, milestone, early access, first look at new stock.
- Usefulness: care tips, usage ideas, a summary of what they got this year.
- Community and voice: invite a review, a referral, or a say in a product decision.
- Rewards: points, credit, or a gift, with clear expiry and no fine-print traps.
Enrol customers after they have bought at least twice. Points mean little to someone with nothing accumulated. Never make discount the only loyalty language: it cuts margin and teaches waiting.

At-risk nudge (single touch before win-back): name the specific thing they used to buy or use, say what changed or what is new that matters to them, one clear action. No guilt copy, no fake scarcity.

Win-back sequence (3 to 5 touches over 2 to 4 weeks, starting at the lapsed threshold):
1. Soft reminder: reference the last purchase or use, no offer.
2. Value reminder: one new or improved thing relevant to their history.
3. Incentive: an offer sized to their past value. High-value lapses get personal outreach, low-value lapses get the automated version.
4. Last call: state plainly that the offer ends, with the real date.
5. Sunset: ask if they still want messages, give an easy stay or leave choice, then suppress non-responders. Sunset protects deliverability for everyone else.
Before sending to an old list, verify addresses. A bounce spike on stale data harms the sending domain. Prioritise fresh lapses first: the longer someone has been gone, the lower the expected return, so spend personal effort on recent, high-value lapses and automate the rest.

Subscription additions: send a value summary before renewal (usage, outcomes, money or time saved, in their numbers), run a save flow at cancellation that captures a reason from a short list and answers that reason (pause or downgrade for price, help for non-use, support for a fault), and treat failed payment as its own problem with its own sequence, not as churn.

### 6. Measure repeat behaviour, not activity
Report these, by cohort and segment, on a fixed cadence:
- Customer retention rate: (customers at end of period minus new customers) / customers at start, times 100.
- Cohort retention: customers from a first-purchase cohort who buy again in month N / cohort size, times 100.
- Repeat purchase rate: customers with 2 or more orders / purchasing customers, times 100.
- Purchase frequency: orders / purchasing customers. AOV: revenue / orders.
- Time to second purchase, median days.
- CLV, simple: AOV times orders per customer per year times lifespan in years. Profit CLV multiplies that by gross margin. Report it per segment, because an average hides the customers worth spending on.
- Subscription only: GRR = (beginning revenue minus churn minus contraction) / beginning revenue. NRR adds expansion back in the numerator. GRR cannot pass 100 percent, NRR can. Read them together: strong NRR on weak GRR means a few expanding accounts are covering heavy loss.
- Win-back: reactivated customers, revenue from reactivated customers minus incentive and send cost, and unsubscribe and spam complaint rate for the sequence.
Always run a holdout where volume allows: hold back a random slice of eligible customers from a new sequence and compare repeat orders over the full repurchase window, not over a week. A sequence with no holdout has a story, not a result.
Guardrails that can stop a sequence: rising unsubscribes or complaints, margin loss from discount-led returns, repeat rate up but refund rate up with it, or support contacts spiking after a send.

### 7. Review and prune
Monthly: which stage transitions moved, which sequences earned their sends against holdout, which segments shrank. Kill sequences that show no lift after two full repurchase windows. Fix the stage with the largest leak first: a weak second-purchase rate is an onboarding problem, a late-stage slide is a value or service problem, and sending more mail fixes neither.

## Output Contract
Deliver a retention plan with:
1. Model, unit, and the active, at-risk, and lapsed definitions with the data behind them.
2. Baseline table: retention rate, cohort retention, repeat purchase rate, frequency, AOV, median interval, time to second purchase, and CLV by segment where data allows.
3. Segment map: lifecycle stages and RFM groups, with size and the action for each.
4. Trigger table: trigger, sequence, touches and timing, exit, suppression.
5. Sequence copy or copy briefs for onboarding, second purchase, at-risk, win-back with sunset, and renewal or dunning where relevant.
6. Measurement plan: metrics, cohort view, holdout design, review cadence, and stop rules.
7. Open data gaps stated plainly, with what cannot be claimed until they close.

Calculator input: CSV with `customer_id,order_date,order_value` and optional `order_id,status`. Run:
`python3 bin/retention_calc.py transactions.csv --as-of 2026-04-01`
It prints JSON with cohort retention, repeat rate, thresholds from the median interval, RFM per customer, and at-risk and lapsed lists.

Worked check: 3 customers, 6 completed orders, revenue 790 gives AOV 131.67, repeat rate 66.7 percent, median interval 30 days, at-risk after 45 days, lapsed after 60 days. Your numbers will differ. The shape of the report should not.

## Operating Rules
- Verify every number you quote. The often repeated claim that a small rise in retention raises profits by a large range traces to Reichheld and Sasser in Harvard Business Review in 1990, with results that varied by industry. Treat it as a reason to measure your own numbers, never as a promise to a client.
- No invented benchmarks. If a recovery rate, open rate, or benchmark did not come from the client's data or a named primary source you checked, cut it or label it as a starting test assumption.
- Vendor-neutral by default. Name capabilities (trigger, segment, suppression, holdout), not a platform's menu paths. Add platform steps only when the client names their stack.
- Respect consent and suppression absolutely. No win-back to people who opted out, no hiding the unsubscribe, no keeping lapsed addresses mailing forever to protect list size.
- Discount last, not first. Help, timing, relevance, and recognition come before price cuts.
- One owner per sequence for replies. A reply to a win-back that lands in an unmonitored queue is a lost customer twice.
- If the data cannot support a stage or a metric, say so and ship the smaller honest plan.
