Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
40rty-ai avatar

Shopify Admin Customer Spend Tier Tagger

  • 6 installs
  • 173 repo stars
  • Updated June 26, 2026
  • 40rty-ai/shopify-admin-skills

shopify-admin-customer-spend-tier-tagger is a Claude Code skill that calculates each Shopify customer's lifetime spend and applies configurable Bronze/Silver/Gold/Platinum tier tags via the Admin GraphQL API.

About

This Claude Code skill queries all Shopify customers, sums each one's lifetime spend from order history, and writes a spend-tier tag (Bronze/Silver/Gold/Platinum by default) back to the customer record. A developer or store operator runs it to build VIP segments for loyalty and email targeting without a third-party loyalty app. It matters because it turns raw order data into actionable customer segments directly in Shopify.

  • Calculates lifetime spend per customer and applies Bronze/Silver/Gold/Platinum tier tags
  • Runs against the Shopify Admin GraphQL API (2025-01) with configurable spend thresholds
  • Dry-run preview before any tag mutations

Shopify Admin Customer Spend Tier Tagger by the numbers

  • 6 all-time installs (skills.sh)
  • Ranked #1,691 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
At a glance

shopify-admin-customer-spend-tier-tagger capabilities & compatibility

Free skill; requires an authenticated Shopify store session with write_customers scope

Capabilities
customer segmentation · spend tier tagging · loyalty tiering
Use cases
data analysis · marketing
Runs
Runs locally
Pricing
Free
From the docs

What shopify-admin-customer-spend-tier-tagger says it does

Queries all customers, calculates their lifetime spend using order history, and assigns a spend-tier tag (Bronze/Silver/Gold/Platinum by default).
SKILL.md
Enables VIP segmentation for loyalty programs, exclusive offers, and CX prioritization without a third-party loyalty app.
SKILL.md
npx skills add https://github.com/40rty-ai/shopify-admin-skills --skill shopify-admin-customer-spend-tier-tagger

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs6
repo stars173
Last updatedJune 26, 2026
Repository40rty-ai/shopify-admin-skills

What it does

Segment Shopify customers into spend tiers and tag them for loyalty and marketing targeting.

Who is it for?

Stores that want VIP spend-tier segments for loyalty and email targeting without a loyalty app

Skip if: Sending the re-engagement or loyalty emails themselves, which needs an external tool

When should I use this skill?

You need to tag Shopify customers by lifetime spend for segmentation

What you get

Every customer receives exactly one spend-tier tag ready for Shopify Customer Segments.

  • Tier tags written to customer records
  • tier_tagging_<date>.csv export

By the numbers

  • 4 default spend tiers (Bronze/Silver/Gold/Platinum)
  • 3 GraphQL operations (customers query, orders query, tagsAdd mutation)

Files

SKILL.mdMarkdownGitHub ↗

Purpose

Queries all customers, calculates their lifetime spend using order history, and assigns a spend-tier tag (Bronze/Silver/Gold/Platinum by default). Enables VIP segmentation for loyalty programs, exclusive offers, and CX prioritization without a third-party loyalty app. Extends the existing loyalty-segment-export skill with a write step.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_customers,read_orders,write_customers
  • API scopes: read_customers, read_orders, write_customers

Parameters

ParameterTypeRequiredDefaultDescription
storestringyesStore domain (e.g., mystore.myshopify.com)
tiersobjectnosee belowSpend thresholds per tier (in store currency)
tag_prefixstringnotierTag prefix (e.g., tier:bronze, tier:silver)
remove_old_tiersboolnotrueRemove existing tier tags before applying new ones
dry_runboolnotruePreview without executing mutations
formatstringnohumanOutput format: human or json

Default tiers (store currency):

bronze:   $0–$249
silver:   $250–$999
gold:     $1,000–$4,999
platinum: $5,000+

Safety

⚠️ tagsAdd adds tags to customer records visible to staff and used by marketing segments. If remove_old_tiers: true, existing tier tags matching tag_prefix are removed before new ones are applied. Run with dry_run: true to review the tier distribution before committing.

Workflow Steps

1. OPERATION: customers — query Inputs: first: 250, select id, amountSpent, pagination cursor Expected output: All customers with lifetime spend; paginate until hasNextPage: false

2. Assign tier to each customer based on amountSpent.amount vs. tiers thresholds

3. OPERATION: orders — query (optional — for verification of spend figures)

4. OPERATION: tagsAdd — mutation Inputs: Customer id, tags: ["<tag_prefix>:<tier>"] Expected output: Updated customer tags; userErrors

GraphQL Operations

# customers:query — validated against api_version 2025-01
query CustomerSpendLevels($after: String) {
  customers(first: 250, after: $after) {
    edges {
      node {
        id
        displayName
        defaultEmailAddress {
          emailAddress
        }
        amountSpent {
          amount
          currencyCode
        }
        numberOfOrders
        tags
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
# orders:query — validated against api_version 2025-01
query CustomerOrderHistory($customerId: String!, $after: String) {
  orders(first: 250, after: $after, query: $customerId) {
    edges {
      node {
        id
        totalPriceSet {
          shopMoney {
            amount
            currencyCode
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
# tagsAdd:mutation — validated against api_version 2025-01
mutation TagsAdd($id: ID!, $tags: [String!]!) {
  tagsAdd(id: $id, tags: $tags) {
    node {
      id
    }
    userErrors {
      field
      message
    }
  }
}

Session Tracking

Claude MUST emit the following output at each stage. This is mandatory.

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: Customer Spend Tier Tagger           ║
║  Store: <store domain>                       ║
║  Started: <YYYY-MM-DD HH:MM UTC>             ║
╚══════════════════════════════════════════════╝

After each step, emit:

[N/TOTAL] <QUERY|MUTATION>  <OperationName>
          → Params: <brief summary of key inputs>
          → Result: <count or outcome>

If dry_run: true, prefix every mutation step with [DRY RUN] and do not execute it.

On completion, emit:

For format: human (default):

══════════════════════════════════════════════
OUTCOME SUMMARY
  Customers processed:  <n>
  Bronze:    <n>  (<pct>%)
  Silver:    <n>  (<pct>%)
  Gold:      <n>  (<pct>%)
  Platinum:  <n>  (<pct>%)
  Tags applied: <n>
  Errors:       <n>
  Output:       tier_tagging_<date>.csv
══════════════════════════════════════════════

For format: json, emit:

{
  "skill": "customer-spend-tier-tagger",
  "store": "<domain>",
  "started_at": "<ISO8601>",
  "dry_run": true,
  "tier_distribution": { "bronze": 0, "silver": 0, "gold": 0, "platinum": 0 },
  "tags_applied": 0,
  "errors": 0,
  "output_file": "tier_tagging_<date>.csv"
}

Output Format

CSV file tier_tagging_<YYYY-MM-DD>.csv with columns: customer_id, name, email, lifetime_spend, currency, tier, previous_tags, new_tags

Error Handling

ErrorCauseRecovery
THROTTLEDAPI rate limit exceededWait 2 seconds, retry up to 3 times
userErrors on tagsAddInvalid customer IDLog error, skip customer, continue
No customersEmpty storeExit with 0 results

Best Practices

  • Run monthly to keep tier assignments current — customers who increase their spend will move up tiers automatically.
  • Use remove_old_tiers: true to ensure each customer has exactly one tier tag at any time.
  • Adjust tiers thresholds to your store's AOV and LTV distribution — the defaults work for stores with $50–100 AOV.
  • After tagging, create Shopify Customer Segments using tag filters to target each tier in email campaigns.

Related skills

FAQ

What tiers does it apply by default?

Bronze ($0-$249), Silver ($250-$999), Gold ($1,000-$4,999), and Platinum ($5,000+), all configurable per store currency.

Can I preview before it changes customer records?

Yes, dry_run defaults to true so you can review the tier distribution before any tagsAdd mutation runs.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.