AI Blocks › Run your online store
Customer segment builder
Run it on your customers. Get each one scored on recency, frequency and spend, then grouped from Champions to Lost.
Customer segment builder is a free AI skill for the job "Run your online store". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · MIT licence · Made by 40rty AI
Made by 40rty AI. See the original on GitHub; we copied it as it is, with its licence.
What it does
Not all customers deserve the same email. This scores each Shopify customer on how recently they bought, how often, and how much they spent, then sorts them into groups from Champions to Lost. This is called RFM scoring. Every customer gets 1 to 5 on each of the three measures, based on how they rank against the rest of your base. The score combination decides the group: Champions, Loyal, At Risk, Lost and others, each with a clear definition. You can set the look-back window, the number of buckets and the minimum orders. It reads data only unless you ask it to tag customers, which needs write access and a dry run first.
You give it
- Your Shopify store and read access
- Look-back window (optional)
- Minimum orders to include (optional)
- Whether to tag customers (optional, needs write access)
You get
- Recency, frequency and spend scores
- Customers grouped by segment
- Segment sizes and revenue
- Optional tags added to customer records
Use it when
- You want a VIP list for early access or a thank-you.
- You need to choose who gets a win-back email.
- You plan different offers for new and loyal buyers.
- You want to see how your customer base is shaped.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can access your Shopify admin.