Manage customer assets and services
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-servicesRegister 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:migrateAlthough 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 : has9
10 ServiceInstance "0..*" <--> "0..*" Asset11
12 ServiceInstance "1" --> "1" ProductVariant13
14 Asset "1" --> "1" Address15
16 Asset "1" --> "1" Customer17
18 ServiceInstance "1" --> "1" Customer19
20 Asset "1" --> "1" ProductVariant21
22 ProductVariant "1" --> "0..*" ProductReference23
24 ProductReference --> ProductVariant_25
26 class ServiceInstance{27 String name28 Date startDate29 Date endDate30 Date purchaseDate31 Price price32 }33
34 class PaymentTypeEnum{35 ONE_TIME36 WEEKLY37 MONTHLY38 YEARLY39 }40
41 class ServiceItemStatusEnum{42 ACTIVE43 INACTIVE44 RETIRED45 }46
47 class Asset{48 String name49 String serialNumber50 String thumbnail51 Date endOfWarranty52 }53
54 class Address{55 }56
57 class ProductVariant{58
59 }60
61 class Customer{62
63 }64
65 class ProductReference{66 SPARE_PART67 COMPATIBLE_SERVICE68 }