Skip to main content

pcLTV — Event & User Table Requirements

The Predicted Customer Lifetime Value (pcLTV) model estimates the future economic value a customer will generate over a defined forecast window (e.g. 3, 6, or 12 months). It relies on past transactions, behavioural patterns, and customer-level attributes.


Data model overview

To activate a pcLTV model, BPP requires:

  1. A transactional event table — one row per transaction.
  2. A user table — one row per user with optional demographic and behavioural features.

Field names are examples, not mandatory. Identity resolution handles user stitching across tables.


1. Transaction event table (required)

Each row represents one transaction. This is the core input for pcLTV.

Minimum required fields

Column nameTypeDescription
event_timestampDATETIMEWhen the transaction occurred (UTC, mandatory)
user_idSTRINGA user identifier (mandatory)
monetaryFLOATTotal value of the transaction (mandatory)
basketJSONList of products purchased (mandatory, see format below)
transaction_idSTRINGNot required for modelling, but strongly recommended for event reconciliation and value bidding — ensures transaction-level traceability

Basket JSON — required format

Field nameTypeDescription
product_idSTRINGUnique identifier (e.g. SKU) (mandatory)
product_priceFLOATPrice per unit (mandatory)
product_quantityINTEGERQuantity purchased (mandatory)
product_categorySTRINGProduct category (optional but highly recommended)
product_nameSTRINGName of the product (optional)
brandSTRINGBrand (optional)
[
{
"product_id": "14892189254007",
"product_name": "Borraccia Porta Oggetti Z Box L - UNI",
"brand": "ZEFAL",
"product_category": "Borracce",
"product_quantity": 1,
"product_price": 7.95
},
{
"product_id": "7091627262012",
"product_name": "Pedali M540 Spd - UNI",
"brand": "SHIMANO",
"product_category": "Pedali e Tacchette",
"product_quantity": 1,
"product_price": 79.99
}
]

One row per user, with optional enrichment features that improve accuracy.

A. Demographic & static attributes

Example fieldTypeDescription
genderSTRINGUser's gender
ageINTEGERUser's age
countrySTRINGCountry of residence
client_typeSTRINGe.g. new vs returning customer
payment_systemSTRINGMost-used payment method

B. Aggregated behavioural features

Behaviour-based aggregations can be computed with the Fields Builder and stored in a dedicated user table. Recommended features:

Feature nameDescription
last_countryCountry from last known session
last_browserBrowser used in last session
avg_days_between_purchasesAverage time between orders
conversion_time_cart_to_checkoutTime delta between cart and checkout events
pageviews_last_30_daysActivity volume metric
days_since_last_transactionRecency metric
distinct_categories_boughtPurchase diversity metric
failed_checkoutsDrop-off behaviour indicator

These features capture purchase patterns, engagement levels, and friction points in the user journey.


Best practices

  • Forecast horizon vs history depth — use the Rule of Three: to predict 3 months, provide ≥9 months of history; to predict 6 months, provide ≥18 months.
  • User coverage — at least 20% of users should have 2+ transactions in the observation window.
  • Minimum volume — at least 2,000 users with transactions.
  • Data consistency — UTC timestamps, no duplicate transaction IDs, cleaned/standardized monetary.
  • Feature quality — more descriptive, consistent, predictive features → better output.

Summary

AreaMust-have
Event table1 row = 1 transaction, includes user ID + basket
Basket JSONProduct ID, quantity, price (category recommended)
User tableOptional, 1 row per user with demographic or behavioural data
Fields BuilderRecommended for behaviour-based feature aggregation
Forecast windowRequires 3× historical data (e.g. 9 months to predict 3)
Transaction coverage≥20% of users with at least 2 purchases
Minimum volume2,000 users with transactions
transaction_idRecommended for traceability and advanced use cases