Customer Lifetime Value + Recommendations Accelerator
CLV pipeline for subscription/energy retail: acquisition cost, payment behavior, forward profitability, NPV-based CLV, and renewal recommendations by value tier.
Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
⚙ Try Demo ToolsFile Structure 18 files
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
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.