customer-segmentation

Segment customers by purchase recency, frequency, and monetary value using NTILE-based RFM scoring.

14|3|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-skills-hub --skill customer-segmentation-tomtoto757
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: customer-segmentation
Source: https://github.com/tomtoto757/ecomm-ai-skills-hub/tree/main/skills/customer-support-crm/finsilabs/customer-crm/customer-segmentation
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-skills-hub --skill customer-segmentation-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Segment diverse customer bases into meaningful cohorts based on recency, frequency, and monetary value so marketing, retention, and acquisition teams can target the right customers with the right message and avoid wasted spend.

Core Features & Use Cases

  • RFM Scoring & Classification: Quantile-based RFM calculation (NTILE) to produce r_score, f_score, m_score, rfm_total, and rfm_cell for stable segmentation.
  • Platform Coverage: Recipes and platform-specific guidance for Shopify, WooCommerce, BigCommerce, and custom/headless stores with sync options to Klaviyo and Metorik.
  • Cohort Retention & Behavioral Rules: Cohort retention SQL, behavioral rule type definitions, and guidance for building event/property/segment-based rules and nightly materialization.
  • Marketing Exports & Suppression Lists: Batched Klaviyo list sync guidance and SHA-256 hashed suppression exports for Meta to protect privacy and avoid wasted ad spend.
  • Operational Best Practices: Nightly refresh, segment size validation, deduplication guidance, and recommended indices and upsert patterns for production use.

Quick Start

Segment customers into a "Champions" cohort using r>=4, f>=4, m>=4, export that cohort to Klaviyo as a list, and generate a SHA-256 hashed suppression list of recent buyers for Meta.

Frequently Asked Questions about customer-segmentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate RFM scores for my Shopify customer base?

RFM scores for Shopify customer bases are calculated using NTILE-based quantile scoring to generate individual recency, frequency, and monetary values, which combine into a total score and cell classification for stable segmentation.

What's the best way to sync customer segments to Klaviyo for lifecycle marketing?

Syncing customer segments to Klaviyo for lifecycle marketing uses batched API calls authenticated with a Klaviyo-API-Key to push segmented lists directly, enabling targeted campaigns based on calculated RFM scores.

How do I create a hashed suppression list of recent buyers for Meta ads?

Creating a hashed suppression list of recent buyers for Meta ads requires exporting customer emails and applying SHA-256 hashing to protect privacy and prevent wasted ad spend on existing customers.

Can I run cohort retention analysis on a custom headless commerce platform?

Cohort retention analysis works on custom headless commerce platforms by executing cohort SQL queries using DATE_TRUNC and AGE calculations to measure customer retention over specific time periods.

How do I automate nightly RFM scoring updates for production databases?

Automating nightly RFM scoring updates for production databases involves scheduling nightly upserts with recommended indices and deduplication patterns to ensure segment sizes are validated and data remains current.

Does RFM segmentation work with WooCommerce and BigCommerce stores?

RFM segmentation works with WooCommerce and BigCommerce stores by applying platform-specific recipes and sync options to standardize recency, frequency, and monetary calculations across diverse e-commerce architectures.