Customer lifetime and retention
get_customer_lifetimeHow customers behave over their whole history (no period): orders per customer, median days between a customer's orders (medianGapDays), lifecycle segments active, loyal, atRisk, inactive and vip (vip is the top tenth by value and overlaps the other four) with customers, orders and revenue, 90-day repurchase per monthly cohort (cohorts90: of those who first bought that month, how many reordered within 90 days), 365-day value per acquisition channel (ltvByChannel), the RFM split (rfm), and month-by-month retention (retention.cohorts: customers per first-order month and how many bought again N months later; null = that month has not happened yet, not zero). atRisk and recentlyChurned list a few customers by an opaque id only — never present one as a name; atRiskCount and recentlyChurnedCount are the full counts. Use for retention, cohorts, churn, loyalty or 'how often do customers come back'. suppressed true = too little revenue carries a customer id: say so.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||