Loyalty Plugin
Customer loyalty and rewards program plugin for Medusa v2 with point accumulation and redemption
Overview
The @devx-commerce/plugin-loyalty enables customer loyalty and rewards programs for Medusa v2 commerce platforms. This plugin provides comprehensive functionality for managing loyalty points, rewards, and customer engagement programs.
System Requirements
Before installing the plugin, ensure your system meets the following requirements:
- Medusa server: v2.x
- Node.js: v20 or later
Installation
Install the plugin using your preferred package manager:
# Using npm
npm install @devx-commerce/plugin-loyalty
Configuration
Add the plugin to your medusa-config.js file:
module.exports = {
plugins: [
{
resolve: `@devx-commerce/plugin-loyalty`,
options: {
// Add your loyalty program configuration here
},
},
],
}
Core Dependencies
- uuid (^11.1.0) - Unique identifier generation for loyalty transactions
- @types/uuid (^10.0.0) - TypeScript support for UUID
- @medusajs/framework - Medusa core framework
- @medusajs/medusa - Medusa commerce platform
- MikroORM - Database ORM for loyalty data
Features
- Points System - Earn and redeem loyalty points
- Rewards Management - Create and manage customer rewards
- Admin Interface - Built-in admin UI for loyalty program management
- Customer Engagement - Drive repeat purchases through rewards
- Workflow Integration - Customizable loyalty workflows
- UUID Tracking - Secure transaction tracking with unique identifiers
Use Cases
This plugin is ideal for:
- Customer Retention - Build long-term customer relationships
- Repeat Purchases - Incentivize customers to return
- Brand Loyalty - Strengthen customer loyalty to your brand
- VIP Programs - Create tiered loyalty programs
- Referral Rewards - Reward customers for referrals
Module Exports
The plugin provides standardized exports for:
- Admin interfaces
- Loyalty workflows
- Provider services
- Server modules