medusa-plugin-customer-tags
v0.2.0
Published
Customer tagging plugin for Medusa v2
Maintainers
Readme
medusa-plugin-customer-tags
Associate custom labels with customers and display them prominently on Order and Customer detail pages for easy reference.
If you are not familiar with Medusa, you can learn more on the project web site.
Features
- Can create any number of pre-defined customer tags
- Widget on Customer detail page to easily associate customers with one or more tags
- Displays tags prominently on in a widget at the top of Order detail pages
- Examples: 'VIP' or 'Frequent returns' or 'Prefers chocolate'. Whatever data suits your store that people in your org interacting with customers might want to have easy reference to.
Installation
Inside your medusa backend root folder:
yarn add medusa-plugin-customer-tagsReplace "yarn add" with the correct command for your package manager if you are using (for example) npm, pnpm, or bun.
Configuration
Enable in your medusa-config.ts file. Example:
module.exports = defineConfig({
//... other config
plugins: [
{
resolve: 'medusa-plugin-customer-tags',
options: {}
}
// ... other plugins
]
})To ensure customer tags cannot be queried in GET requests to the API, add 'customer_tag' to your restricted fields in medusa-config.ts.
module.exports = defineConfig({
projectConfig: {
// ... other settings
http: {
// ... other settings
restrictedFields: {
store: ['customer_tag', 'customer_tags']
}
}
}
})- Define new Customer Tags in the Settings page of the Medusa admin.
- On a Customer detail page, use the widget to associate one or more tags with a customer.
