Blog

November 28, 2025·Product

Implement Customer Tiers in Medusa

Shahed Nasser

Shahed  avatar

Shahed Nasser

Learn how to manage customer tiers, automate customer tier assignment, and apply promotions based on the customer's tier.

Image modal

Community Requested Tutorial
This tutorial was requested by our community.

Vote for the next Tutorial

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

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.

Image modal

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.

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)
}
})

Tutorial: Implement Customer Tiers in Medusa

By following this tutorial in our documentation, 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.

Share this post

Ready to build your custom commerce setup?