Links between Product Module and Other Modules
This document showcases the module links defined between the Product Module and other Commerce Modules.
Summary#
The Product Module has the following links to other modules:
First Data Model | Second Data Model | Type | Description |
|---|---|---|---|
Read-only - has one | |||
Stored - many-to-one | |||
Stored - many-to-many | |||
Read-only - has one | |||
Stored - one-to-one | |||
Stored - many-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many |
Cart Module#
Medusa defines read-only links between:
- The Cart Module's
LineItemdata model and theProductdata model. Because the link is read-only from theLineItem's side, you can only retrieve the product of a line item, and not the other way around. - The
ProductVariantdata model and the Cart Module'sLineItemdata model. Because the link is read-only from theLineItem's side, you can only retrieve the variant of a line item, and not the other way around.
Retrieve with Query#
To retrieve the variant of a line item with Query, pass in :
product.* in fields.Fulfillment Module#
Medusa defines a link between the Product data model and the ShippingProfile data model of the Fulfillment Module. Each product must belong to a shipping profile.
Retrieve with Query#
To retrieve the shipping profile of a product with Query, pass shipping_profile.* in fields:
Manage with Link#
To manage the shipping profile of a product, use Link:
Inventory Module#
The Inventory Module provides inventory-management features for any stock-kept item.
Medusa defines a link between the and data models. Each product variant has different inventory details.

When the manage_inventory property of a product variant is enabled, you can manage the variant's inventory in different locations through this relation.
Retrieve with Query#
To retrieve the inventory items of a product variant with Query, pass inventory_items.inventory.* in fields. The inventory_items relation holds link records, so use inventory_items.inventory to access the actual InventoryItem data:
You can also traverse from the product entity through its variants to their inventory items:
manage_inventory enabled creates an inventory item automatically, but does not create inventory levels. You must create inventory levels separately to set the stocked quantity at a specific location. Refer to the Inventory Module's documentation for details.Manage with Link#
To manage the inventory items of a variant, use Link:
Order Module#
Medusa defines read-only links between:
- the Order Module's data model and the data model. Because the link is read-only from the 's side, you can only retrieve the product of an order line item, and not the other way around.
- the Order Module's data model and the data model. Because the link is read-only from the 's side, you can only retrieve the variant of an order line item, and not the other way around.
Retrieve with Query#
To retrieve the variant of a line item with Query, pass variant.* in fields:
product.* in fields.Pricing Module#
The Product Module doesn't provide pricing-related features.
Instead, Medusa defines a link between the ProductVariant and the PriceSet data models. A product variant’s prices are stored belonging to a price set.

So, to add prices for a product variant, create a price set and add the prices to it.
Retrieve with Query#
To retrieve the price set of a variant with Query, pass price_set.* in fields:
Manage with Link#
To manage the price set of a variant, use Link:
Sales Channel Module#
The Sales Channel Module provides functionalities to manage multiple selling channels in your store.
Medusa defines a link between the Product and SalesChannel data models. A product can have different availability in different sales channels.

Retrieve with Query#
To retrieve the sales channels of a product with Query, pass sales_channels.* in fields:
Manage with Link#
To manage the sales channels of a product, use Link:
Translation Module#
Medusa defines read-only links from several data models in the Product Module to the Translation data model in the Translation Module:
- (one-to-many) to , and vice versa.
- (one-to-many) to . You can only retrieve the translations of a product variant, and not the other way around.
- (one-to-many) to . You can only retrieve the translations of a product category, and not the other way around.
- (one-to-many) to . You can only retrieve the translations of a product collection, and not the other way around.
- (one-to-many) to . You can only retrieve the translations of a product tag, and not the other way around.
- (one-to-many) to . You can only retrieve the translations of a product type, and not the other way around.
- (one-to-many) to . You can only retrieve the translations of a product option, and not the other way around.
- (one-to-many) to . You can only retrieve the translations of a product option value, and not the other way around.
Retrieve with Query#
To retrieve the translations of a product with Query, pass translations.* in fields:
translations.* field when querying any of the above-mentioned data models to retrieve their associated translations.