shopify-admin-rfm-customer-segmentation
Installation
SKILL.md
Purpose
Performs full RFM (Recency, Frequency, Monetary) analysis across the entire customer base. Each customer is scored 1-5 on three dimensions — how recently they purchased, how often they purchase, and how much they spend — then classified into actionable segments: Champions, Loyal Customers, Potential Loyalists, At-Risk, Hibernating, and Lost. Read-only — no mutations.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_orders,read_customers - API scopes:
read_orders,read_customers
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain (e.g., mystore.myshopify.com) |
| days_back | integer | no | 365 | Lookback window for order history |
| segments | integer | no | 5 | Number of quintile buckets per dimension (3 or 5) |
| min_orders | integer | no | 1 | Minimum orders for a customer to be scored |
| tag_customers | boolean | no | false | If true, add RFM segment tag to customer (requires write_customers scope) |
| format | string | no | human | Output format: human or json |