Retention and Winback
Segments your customers by recency, frequency and value, finds who is about to lapse, predicts when each product runs out from real order intervals, and drafts the winback, loyalty and replenishment campaigns. This is where repeat revenue lives.
Who it is for
The owner whose entire marketing budget goes to strangers while past buyers hear nothing, and the marketer who wants RFM boundaries tuned to this store, not a global default.
What it reads from the brain
Before every run. Sections are addressed as layer.section.
What it does, step by step
- Read the brain
Opens the sections above and the inputs.
- Gather evidence
Pulls orders and customer segments. Every finding cites its source.
- Decide and draft
Builds RFM segments with boundaries tuned to your store, computes replenishment windows per product from real order intervals, and drafts winback, loyalty and replenishment campaigns in your voice using only claims_allowed.
- Advise stops here
You get the segments, the timing windows and the drafts.
- Act
Creates the campaign in your connected email tool and requests approval to send. After 30 days you may switch replenishment nudges to run without a tap.
- Write back
What worked, what did not and the decisions log are appended.
Tools it uses
shopify.orders.listOrder history for recency, frequency, value and intervalsshopify.customers.segmentSegment definitions in Shopifyklaviyo.listsAudiences in your email toolklaviyo.campaigns.createAct: the campaign, created not sentklaviyo.campaigns.sendApproval gated, alwaysbrevo.campaigns.createAct: the same on Brevowhatsapp_business.send_templateApproval gated, always. Pre approved templates only
The three modes for this agent
Read tools only. You get RFM segments with counts and value, replenishment windows per product, and the campaign drafts. Works from an orders CSV at level 2.
Campaigns created in your email tool. Every send waits for your approval for the first 30 days.
Every Wednesday at 06:00. Same gates. After 30 days you may switch replenishment nudges to run without a tap; winback and loyalty sends still ask.
Guardrails and approvals
Enforced in code. Items with a filled circle wait for your tap in Telegram.
- Discount depth cap.
- Frequency cap per customer per month.
- Never contacts unsubscribed customers.
- Campaigns held for approval for the first 30 days.
- RFM boundaries tuned per merchant, never global.
- Replenishment timing computed from real order intervals, never assumed.
- Every claim in every draft is in claims_allowed or is removed and listed as needs your confirmation.
What it writes back to the brain
Dated and sourced. Learnings and performance sections are append only.
Example output
Example output. Structure only. Counts and values are placeholders.
Retention and Winback, your store
Ran at data level 3 (Shopify and Klaviyo connected). Nothing higher exists.
- Segments built: [n], boundaries tuned to your order history (listed in segments.csv).
- At risk this week: [n] customers. Lapsed: [n]. Due for replenishment in the next 14 days: [n], across [n] products.
- Drafted: 1 winback campaign, 1 loyalty note to your top segment, [n] replenishment nudges by product.
Created in Klaviyo, not sent. Waiting for your approval to send the winback campaign.
segments.csv (columns)
segment | recency_days | frequency | value_band | customers | total_value | suggested_campaign
timing.json (one entry)
`` { "product": "hero product 1", "median_reorder_days": "[from your orders]", "window": "[start] to [end]", "customers_due": "[n]" } ``
Planned: the field names in timing.json above are illustrative; the contract fixes only that it holds replenishment windows per product.
Also delivered: campaigns.md (winback, loyalty, replenishment drafts with the discount depth used and the frequency cap applied).