Customer Lifetime Value + Recommendations Accelerator
CLV pipeline for energy-retail/subscription customers: acquisition cost, payment behavior, forward profitability, NPV-based CLV, and renewal recommendations by value tier. Ships a dependency-free CLV library + offline tests. Fully generic, currency-neutral.
⚙ Try the Live Demo interactive
Enter profit, acquisition cost, discount rate and payment behaviour and get NPV CLV, a value tier and a renewal recommendation — the shipped CLV logic.
⚡ Open CLV Calculator📋 What's Inside 18 files
- ✓ README.md
- ✓ LICENSE
- ✓ manifest.json
- ✓ databricks.yml
- ✓ resources/jobs.yml
- ✓ src/01_customer_acquisition_cost.sql
- ✓ src/02_payment_behavior_score.sql
- ✓ src/03_estimated_profitability.sql
- ✓ src/04_customer_lifetime_value.sql
- ✓ src/05_renewal_recommendations.sql
- ✓ lib/clv.py
- ✓ tests/test_clv.py
- ✓ conftest.py
- ✓ guide/01_what-you-get.md
- ✓ guide/02_getting-started.md
- ✓ guide/03_architecture.md
- ✓ guide/04_support.md
- ✓ guides/clv-methodology.md
📁 File Structure 18 files
├── README.md
├── LICENSE
├── manifest.json
├── databricks.yml
├── resources/
│ ├── jobs.yml
├── src/
│ ├── 01_customer_acquisition_cost.sql
│ ├── 02_payment_behavior_score.sql
│ ├── 03_estimated_profitability.sql
│ ├── 04_customer_lifetime_value.sql
│ ├── 05_renewal_recommendations.sql
├── lib/
│ ├── clv.py
├── tests/
│ ├── test_clv.py
├── conftest.py
├── guide/
│ ├── 01_what-you-get.md
│ ├── 02_getting-started.md
│ ├── 03_architecture.md
│ ├── 04_support.md
├── guides/
│ ├── clv-methodology.md
📖 Documentation Preview README excerpt
Customer Lifetime Value + Recommendations Accelerator
Calculates **CLV** for energy-retail / subscription customers and generates
personalized **renewal recommendations** prioritized by value tier. A 5-step SQL
pipeline: acquisition cost → payment behavior → forward profitability → NPV-based
CLV → renewal recommendations.
Fully generic and currency-neutral: map your customer, contract, and invoice
sources and configure channel costs + discount rate.
What's inside
- **Databricks Asset Bundle** — a monthly CLV job (5 dependent SQL steps).
- **NPV CLV** — `CLV = ((profit + CAC) × (1-(1+r)^-n)/r) - CAC`, with a
configurable monthly discount rate.
- **Renewal recommendations** — High/Medium/Low/Negative tiers mapped to
retention actions, so spend goes where it pays back.
- **A dependency-free CLV library** (`lib/clv.py`): CAC, payment behavior, credit
loss, profitability, NPV CLV, tiering, and recommendations — with an offline
test suite (6 tests).
Quickstart
```bash
pip install pytest && pytest tests/ -v
databricks bundle deploy -t dev -p <profile>
```
Provide the customer model + `invoicing.f_invoice_payments`, and set
`discount_rate_monthly` and channel costs.
License
MIT — see `LICENSE`.
... preview truncated, see full README in product download.