---
title: "Implement Customer Tiers in Medusa"
description: "Learn how to manage customer tiers, automate customer tier assignment, and apply promotions based on the customer's tier."
url: https://medusajs.com/blog/customer-tiers
last_updated: 2026-08-13T14:40:43Z
---

# Implement Customer Tiers in Medusa

_Published 2025-11-28 by Shahed  Nasser in Product_

> **Community Requested Tutorial**
> This tutorial was requested by our community.
>
> [Vote for the next Tutorial](https://discord.gg/medusajs)

A customer tier system allows you to segment customers based on their purchase history and automatically apply promotions to their carts according to their tier. By implementing customer tiers, you can strengthen customer loyalty and encourage repeat purchases.

Medusa is a digital commerce platform with a built-in framework for customization. Developers can extend Medusa to implement custom data models, build complex flows with rollback mechanisms, automate actions, and inject custom logic into core workflows. These capabilities make it easy to implement new features like customer tiers.

> **Implement Customer Tiers in Medusa**
> Follow this step-by-step guide
>
> [Get Started](https://docs.medusajs.com/resources/how-to-tutorials/tutorials/customer-tiers)

## Manage Tiers

You can create a Tier Module with data models that store tier information—such as the tier name, the promotion associated with that tier, and the rules customers must meet to qualify.

You can also customize the Medusa Admin to allow admins to manage tiers and view the customers assigned to each one.

### Automate Tier Application and Upgrade

When a customer adds an item to their cart, you can automate applying the promotion associated with their tier.

After the customer completes a purchase, you can also automate upgrading their tier if they qualify for the next level.

![](https://assets.medusajs.com/uploads/2025/11/customer-tiers-2-3woqyy2m.webp)

### Custom Validation in Core Flows

Medusa's core workflows provide hooks, which are points within the workflow where you can inject custom actions.

This is especially useful for adding custom validation without recreating core logic. When implementing customer tiers, you can hook into the cart completion flow to ensure promotions are only used by customers who belong to the correct tier.

```javascript
completeCartWorkflow.hooks.validate(async ({ cart }, { container }) => {
  const query = container.resolve("query")

  // Get cart with promotions
  const { data: [detailedCart] } = await query.graph({
    entity: "cart",
    fields: ["id", "promotions.*", "customer.tier.*"],
    filters: {
      id: cart.id,
    },
  })

  const { data: allTiers } = await query.graph({
    entity: "tier",
    fields: ["id", "promo_id"],
    filters: {
      promo_id: detailedCart.promotions.map((p) => p.id)
    }
  })

  // Validate that if a tier promotion is applied, the customer belongs to that tier
  for (const promotion of detailedCart.promotions) {
    const tierId = allTiers.find((t) => t.promo_id === promotion.id)?.id
    if (tierId && detailedCart.customer.tier.id !== tierId) {
      throw new MedusaError(
        MedusaError.Types.INVALID_DATA,
        `Promotion ${promotion.code} can only be applied by customers in the corresponding tier.`
      )
    }
  }
})
```

## Tutorial: Implement Customer Tiers in Medusa

By following [this tutorial in our documentation](https://docs.medusajs.com/resources/how-to-tutorials/tutorials/customer-tiers), you'll learn how to:

1. Create a Tier Module with custom data models that store tier details.
2. Customize the Medusa Admin dashboard to manage and view tiers.
3. Handle cart and order events to apply tier promotions and upgrade a customer's tier.
4. Customize the Next.js Starter Storefront to show a tier progress indicator, encouraging the customer to increase their tier.
