Prepyr

How to segment customers using behavior and value

Useful customer segmentation starts with an action the business can take, then builds stable entity-level features such as recency, frequency, value, adoption, tenure, and support burden over a fixed observation window. Compare rule-based and statistical segments, profile them on outcomes not used to create them, test stability over time, and name segments only after their behavior is understood.

From the field · Independent shop owner

Build useful customer segments for an independent shop

The point-of-sale export uses email when available and phone otherwise, so one person can appear under several IDs. Segmenting before identity resolution makes loyal customers look like occasional buyers.

Columns used in the example

customer_id · email · phone · order_id · order_date · net_spend · returns

Follow it with your own file

  1. Resolve approved customer identities and retain the merge crosswalk.
  2. Choose an observation window and calculate recency, order frequency, and net value.
  3. Create interpretable thresholds tied to actions rather than arbitrary labels.
  4. Compare segment size, value, repeat rate, and movement over time.

Check: Customer-level spend must reconcile to order-level net spend, each customer must receive one segment per period, and threshold changes should be sensitivity-tested before campaigns are launched.

Where to look for exceptions

  • One monetary field determines every cluster.
  • Segments change drastically after a monthly refresh.
  • A segment is too small to target or evaluate.
  • Descriptions repeat the features used to build the groups but show no outcome difference.

The decision hiding in the data

A clustering algorithm will always return groups, even when features are duplicated, scale-driven, seasonal, or unrelated to an action. Friendly segment names can hide unstable boundaries and weak evidence.

Segmentation approaches

ApproachStrengthBest when
Business rulesTransparent and stableActions and thresholds are known
RFM scoringFast behavioral baselinePurchase history is central
ClusteringFinds multivariate patternsFeatures and validation are strong
Predictive scoresOptimizes a specific outcomeA labeled decision exists

Before touching the file

  • Choose segments for a decision, not because clustering is available.
  • Aggregate events to one customer-level feature row.
  • Avoid leakage from future outcomes or target variables.
  • Validate size, stability, distinctiveness, and actionability.

Build the result step by step

  1. Define the decision: Specify whether the segments guide retention, onboarding, service, pricing research, or campaign prioritization.
  2. Build entity-level features: Choose a fixed observation window, aggregate events, handle skew, scale variables, and exclude leakage.
  3. Create candidate segments: Start with interpretable rules, then compare statistical clusters if nonlinear combinations could add value.
  4. Validate outside the model: Test future outcomes, stability, size, fairness, operational reachability, and incremental value.

Rule-based and statistical segments serve different needs

RFM rules are transparent and easy to operationalize. Clustering can reveal combinations that are hard to specify, but it adds choices about scaling, distance, and group count.

A hybrid often works: use exploratory clusters to discover patterns, then translate robust patterns into stable business rules.

Profile with outcomes and uncertainty

Do not call a segment loyal merely because it has high past spend. Compare future retention, expansion, cost to serve, and response with confidence intervals or sample sizes.

Review whether a segment encodes geography, age, or other sensitive proxies before using it for consequential treatment.

Before the result leaves your desk

  • Action defined
  • One row per customer
  • Observation window fixed
  • Leakage excluded
  • Stability tested
  • Sensitive attributes reviewed

Doing these steps in Prepyr

Upload a CSV working copy in Prepyr. Describe the result you need: Segment customers by recency, frequency, and value after resolving duplicate identities. Check the columns selected, preview any proposed changes, and compare the output with the source before applying or exporting it.

Prepyr steps used here: Feature profiling · Segment analysis · Distribution charts · Saved workflows

A small set of interpretable, stable groups that support different actions and can be monitored with measurable outcomes.

Questions readers usually ask next

How many customer segments should I create?

Use the fewest groups that produce meaningfully different, operational actions; often three to seven is enough.

Should segments be mutually exclusive?

They can be for operational simplicity, but overlapping needs-based tags may better represent real customers.

How often should segments refresh?

Match the decision cadence and test whether normal data variation causes excessive movement.