Extensible Product model

Introduction

You’re working as a Software Engineer at Medusa on our Core commerce team. In the last few months, we’ve received numerous requests for a way to add custom fields to products to accomplish special use cases or add references to third-party providers when building out an integration. The feature has been given high priority, and you’ve been assigned as lead i.e. it is your responsibility to come up with a solution proposal (or multiple).

Goal

We want to make it possible for commerce businesses to extend their products with additional fields e.g. reference the product id as stored in their ERP system.

The below JSON code snippet is only for illustrative purposes and to clarify the mental model of the feature further:

{
	"id": "prod_1234",
	"title": "Sweatshirt",
	"subtitle": "A pretty cool sweatshirt",
	"some-erp-id": "erp_prod_1234"
}

Considerations

Please consider the following aspects when writing out your proposal:

Task