Turns transaction data into cohort retention, lifetime value, RFM segments, and churn predictions tied to concrete actions. Use when someone asks "what's our customer LTV", "build a cohort retention table", "which customers are about to churn", "how do repeat purchase rates look by cohort", or "who should we target with a win-back offer". Do NOT use for event-level product usage and feature adoption analysis - use product-analytics instead; for defining market segments for positioning and messaging - use segmentation-strategy instead; for designing the interventions that reduce churn once at-risk customers are identified - use churn-reduction instead; for step-by-step conversion drop-off - use funnel-analysis instead.
Click to play with sound.
---
name: Customer Analytics
description: Turns transaction data into cohort retention, lifetime value, RFM segments, and churn predictions tied to concrete actions. Use when someone asks "what's our customer LTV", "build a cohort retention table", "which customers are about to churn", "how do repeat purchase rates look by cohort", or "who should we target with a win-back offer". Do NOT use for event-level product usage and feature adoption analysis - use product-analytics instead; for defining market segments for positioning and messaging - use segmentation-strategy instead; for designing the interventions that reduce churn once at-risk customers are identified - use churn-reduction instead; for step-by-step conversion drop-off - use funnel-analysis instead.
---
# Customer Analytics
Transaction logs already contain the answers to "who stays, who spends, who is about to leave" - the failure mode is computing them wrong: cohort charts that include the current incomplete month, LTV built on revenue instead of margin, and churn models validated on shuffled data that collapse in production. This skill produces cohort, LTV, and churn outputs a finance or lifecycle team can act on directly.
## Operating procedure
Work the steps in order: cohorts establish the retention reality that LTV math depends on, and churn modeling is only worth doing after the churn definition survives the cohort view.
### Step 1: Gather inputs
Collect these first; apply defaults and label guesses as guesses.
1. Transaction table: customer_id, order_date, revenue, and cost or margin if available.
2. Business model: contractual (subscription) or non-contractual (e-commerce/retail). This decides the LTV method in Step 3.
3. Cohort granularity. Default: monthly cohorts when the natural purchase cycle is 2 weeks or longer; weekly cohorts for high-frequency products (food delivery, media). Granularity finer than the purchase cycle produces jagged, unreadable triangles.
4. Gross margin, as a fraction. If unknown, get finance's blended number and mark it a guess - never silently assume 100%.
5. Churn definition. Contractual: subscription cancelled or lapsed. Non-contractual default: no purchase in 90 days, but check it against the observed inter-purchase distribution - set the cutoff near the 90th percentile of gaps between orders, not at a round number chosen by habit.
### Step 2: Build cohorts and retention curves