Управление активами и услугами клиентов
A Medusa.js plugin for managing customer-linked product instances and service subscriptions.
The plugin extends Medusa with the ability to manage physical product instances (assets) and related service subscriptions (service instances) linked to individual customers. It supports a wide range of after-sales and post-purchase use cases, such as:
The plugin enhances the Medusa admin interface with new panels for managing assets, services, and product references, enabling rich linking and management flows.
This plugin is used in Open Self Service, a composable customer portal for viewing and managing owned products, warranties, and activating additional services. You can also use the plugin independently.
Install plugin package
yarn add @o2s/medusa-plugin-assets-services
Register plugin in
1...2 plugins: [3 {4 resolve: "@o2s/medusa-plugin-assets-services",5 options: {}6 }7 ]8 ...
Run DB migrations - This plugin introduces new models in database so you need to execute db migration
npx medusa db:migrate
Although this plugin is generic and can be used independently, it was developed to power one of core backend functionalities of Open Self Service, a frontend portal that allows customers to:
Explore the Open Self Service project to see how this plugin supports real-world industrial self-service scenarios.
You can find admin API definition in repo files.
1---2 config:3 class:4 hideEmptyMembersBox: true5---6classDiagram7 ServiceInstance --> PaymentTypeEnum : has8 ServiceInstance --> ServiceItemStatusEnum : has910 ServiceInstance "0..*" <--> "0..*" Asset1112 ServiceInstance "1" --> "1" ProductVariant1314 Asset "1" --> "1" Address1516 Asset "1" --> "1" Customer1718 ServiceInstance "1" --> "1" Customer1920 Asset "1" --> "1" ProductVariant2122 ProductVariant "1" --> "0..*" ProductReference2324 ProductReference --> ProductVariant_2526 class ServiceInstance{27 String name28 Date startDate29 Date endDate30 Date purchaseDate31 Price price32 }3334 class PaymentTypeEnum{35 ONE_TIME36 WEEKLY37 MONTHLY38 YEARLY39 }4041 class ServiceItemStatusEnum{42 ACTIVE43 INACTIVE44 RETIRED45 }4647 class Asset{48 String name49 String serialNumber50 String thumbnail51 Date endOfWarranty52 }5354 class Address{55 }5657 class ProductVariant{5859 }6061 class Customer{6263 }6465 class ProductReference{66 SPARE_PART67 COMPATIBLE_SERVICE68 }