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 |
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 variant.* in fields:
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 ProductVariant and InventoryItem 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.* in fields:
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
OrderLineItemdata model and theProductdata model. Because the link is read-only from theOrderLineItem's side, you can only retrieve the product of an order line item, and not the other way around. - the Order Module's
OrderLineItemdata model and theProductVariantdata model. Because the link is read-only from theOrderLineItem'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: