---
name: customer_segmentation
description: "Segment a customer or contact list for campaigns: choose segmentation bases that predict behavior, build segments from CRM fields, run RFM scoring, size and name segments, test them against the five effectiveness criteria, and keep them current with dynamic rules and refresh cadence. Use when someone asks to segment customers, contacts, subscribers, or accounts, build campaign audiences, do RFM analysis, or fix segments that are stale, too small, or not changing what gets sent."
---

# Customer Segmentation

## Purpose

Segmentation splits one list into groups that behave differently, so each group gets a different treatment. If a split does not change who gets what, when, or with which offer, it is not a segment. It is a label.

This skill covers operational segmentation: taking a real CRM, store, or email list and turning it into named, sized, rule based segments a campaign can run on today. It covers B2C and B2B. Strategy work such as picking which market to enter is upstream of this skill.

The core discipline is simple to state and easy to skip. Start from behavior, write the rule in fields anyone can rebuild, test the segment before you campaign on it, and set the refresh rule at build time.

## Workflow

### 1. State the decision the segments must serve

Write one sentence before touching data: the campaign, routing, or retention decision these segments will change.

Good: win back lapsing buyers without discounting to active ones.
Weak: understand our customers better.

List the treatments you are actually willing to run differently. Two or three distinct treatments means two or three segments to start, not twelve. Add a segment only when you can name the different treatment it will get.

### 2. Audit the fields you really have

Inventory the CRM, store, or list fields before choosing bases. For each candidate field record: fill rate, how it gets updated, and when it was last cleaned.

Drop a field from segment rules if it is mostly empty, free text with no standard values, or updated by hand so rarely that it no longer describes anyone. A segment built on a dead field looks precise and targets nobody correctly.

Check consent and suppression fields first. Consent status, hard bounces, unsubscribes, and do-not-contact flags are exclusions on every segment, applied before any campaign rule.

### 3. Choose bases that predict behavior

Four classic bases, from the marketing textbook treatment in Core Principles of Marketing (Washington State University Open Text):

- Behavioral: benefits sought, usage rate, usage situation, buyer status, loyalty. Past purchase, use, and engagement behavior.
- Demographic: age, income, gender, family size and life cycle, occupation, education, social class. For B2B, the parallel is firmographic: industry, employee count, revenue, location, ownership, company structure.
- Geographic: region, city, density, climate.
- Psychographic: activities, interests, opinions, values, attitudes, lifestyle.

Use them in this order of trust:

1. Behavioral and value data first. What people did predicts what they will do better than who they are on paper. RFM in step 4 is the fastest behavioral build for any list with transactions.
2. Lifecycle second. Prospect, trial, new customer, active customer, lapsing, former customer. Never mix lifecycle stages in one campaign segment, because the right message for each stage contradicts the others.
3. Firmographic or demographic as a frame. Use it to define who is in scope at all, especially in B2B. Set the firmographic frame first, then layer behavior inside it.
4. Geographic when place changes the offer, the timing, the language, the law, or delivery.
5. Psychographic last, and only from data you actually collected, such as a survey, a quiz, or stated preferences. Do not infer values or lifestyle from a postcode and call it a segment.

Combine bases when one is not enough. A usable segment is often a frame plus a behavior: fit accounts that activated a trial, buyers in one region who bought a category twice. One base alone usually gives groups that are easy to describe and hard to act on.

For B2B, add technographic as its own layer: the tools and stack an account already runs. It segments by what they use, not who they are, and it drives integration fit and competitor replacement plays.

### 4. Build RFM when transactions exist

RFM scores each customer on three facts from purchase history:

- Recency: days since the last purchase.
- Frequency: number of purchases in the window.
- Monetary: total spend in the window.

Score each dimension 1 to 5, with 5 best. Quintile scoring is the common method: sort customers on each dimension and split into fifths. Recency is reverse scored, because fewer days since purchase is better.

Run the tool in this skill:

```bash
python3 bin/rfm_segments.py transactions.csv --as-of 2026-10-01 --out rfm_customers.csv --summary rfm_summary.csv
```

Input columns are `customer_id,purchase_date,amount` with dates as YYYY-MM-DD. Output is one row per customer with scores and a segment label, plus a summary with segment size and spend. The labels used by the tool (Champions, Loyal, New and Promising, Big Spenders, At Risk, Hibernating, Regular) are a naming convention, not a standard taxonomy. Rename them to fit the business, keep the rule behind each name written down.

Watch three failure points:

- Window choice changes everything. Pick a window where a normal repeat buyer can appear at least twice, and write the window on the segment record.
- Ties break naive quintiles. If half the list bought exactly once, frequency scores will bunch. The tool scores by rank percentile, which handles small files, but on tie heavy data inspect the score distribution and switch to fixed thresholds if the split looks arbitrary.
- RFM says nothing about margin, returns, or cost to serve. A high monetary customer who returns half of everything is not a champion. If returns data exists, look at it before assigning VIP treatment.

Worked builds, including a B2B layered build and an email lifecycle build: `references/segment-builds.md`.

### 5. Write every segment as a rebuildable rule

Each segment gets a record with: name, one sentence definition, the exact rule (fields, operators, values), size, treatment, exclusions, owner, build type, refresh rule, and kill condition. Full template in `references/segment-builds.md`.

Naming rules:

- Name for the behavior and the treatment, not for a persona you invented. "Buyers, quiet 90 days" beats a cute character name when an operator has to rebuild the list at midnight.
- Put the time window in the name or the definition whenever behavior defines the segment. Quiet means nothing without a number of days next to it.
- One name, one rule. If two people would build different lists from the name, the definition is not finished.

Sizing rules:

- Report size as a count and as a share of the full list, plus revenue or value share when you have it. A segment that is 5 percent of contacts and 40 percent of revenue deserves different handling from one that is 5 percent and 5, and the count alone hides that.
- A segment too small to measure a campaign result on is too small to run as its own segment. Fold it into the nearest broader segment until it grows, or run it as a named exception handled by a person, such as top accounts handled one by one.
- Cover the list or say what is left out. Segments that overlap are fine for behavior (a customer can be a buyer and quiet), but say so. Segments for lifecycle and consent must not overlap, because a contact in two lifecycle stages gets contradictory mail.

### 6. Test each segment against the five criteria

Philip Kotler's test for effective segmentation. A candidate segment must pass all five:

- Measurable: size and value can be computed from data you have.
- Substantial: large and valuable enough to be worth a separate treatment.
- Accessible: you can actually reach them on a channel they use, with consent.
- Differentiable: they respond differently from the neighboring segment. Test this with a real campaign result when you can. If two segments respond the same way twice in a row, merge them.
- Actionable: you have the offer, content, staff, and systems to serve them differently.

Fail any one and the segment is out, merged, or parked until the missing piece exists. Record the failure reason on the segment record. A parked segment with a reason is useful. A live segment that fails accessible or actionable just creates work.

### 7. Decide static or dynamic, then set refresh

Per Salesforce Help, a static list is built once and edited by hand, and a dynamic list is rule based and updates automatically as record data changes, adding people who newly match and removing people who no longer do.

- Use dynamic rules for anything behavior or lifecycle based. That data changes daily, so a snapshot is wrong within weeks.
- Use static lists only for fixed historical facts: attended this event, bought in this sale, was in this cohort. A static list answers what happened. It should never pretend to answer who someone is now.
- Set the refresh and review cadence at build time. Dynamic membership can refresh continuously while the rule itself gets reviewed on a set cycle: check that fields still exist, thresholds still fit the sending cadence, and neighboring segments still behave differently.
- Re-run RFM on a fixed cycle matched to the purchase cycle. A weekly purchase business rescores often. An annual purchase business rescoring monthly is just reshuffling noise.
- On every review, check three numbers: segment size drift, overlap with neighbors, and response difference from the last campaign. Drift with no explanation usually means a field broke upstream, not that customers changed overnight.

### 8. Hand off with treatments attached

Deliver segments as a working set, not a chart. For each segment the handoff states the rule, the size, the treatment, the exclusion list, the owner, and the next review date. If the person running the campaign cannot rebuild every segment from your handoff alone, the work is not done.

## Output Contract

Deliver:

- A segment table: name, one sentence definition, rule, bases used, count, share of list, value share if known, treatment, owner.
- The five criteria check per segment, pass or fail with the reason for any fail.
- For RFM work: the window, the as-of date, the per customer scored file, and the summary by segment.
- Build type per segment (dynamic rule or static snapshot) with refresh cadence and next review date.
- A merge and kill list: segments folded in, parked, or deleted, with reasons.
- Open gaps: fields that were too empty or stale to use, stated plainly so nobody thinks the segment used them.

## Operating Rules

- Behavior beats description. When a behavioral base and a demographic base disagree about who to target, trust the behavior and investigate the disagreement.
- No segment without a different treatment. If the send, offer, price, channel, or human handling is identical, merge it back.
- Consent and suppression exclusions apply to every segment, every time, before campaign rules run.
- Never present an inferred psychographic trait as a collected fact. Label inferred fields as inferred, with the source.
- Never ship invented thresholds as universal laws. A day count, spend cutoff, or size floor is a fit for one list and one cadence. State the list and cadence next to the number.
- Keep the segment count small enough to operate. A team that cannot write the treatment for each segment from memory has too many segments.
- Do not segment on sensitive personal traits unless the task, the consent, and the law for that use are all explicit. When in doubt, use the behavior instead. It usually predicts better anyway.
- Privacy check before export: a segment definition plus a small size can identify individuals. Treat small segment exports as personal data, because they are.

## Available connectors

- Use `muse.connector_search` to find other connectors and `muse.skill_search` to find related skills.

- If nothing here fits, look on the web for a maintained API or MCP server and set it up with [Custom Connectors and MCPs](/opt/muse/skills/custom-connector-setup/SKILL.md), or build a custom connector.
