Links between Sales Channel Module and Other Modules

This document showcases the module links defined between the Sales Channel Module and other Commerce Modules.

Summary#

The Sales Channel Module has the following links to other modules:

Tip: Read-only links are used to query data across modules, but the relations aren't stored in a pivot table in the database.

First Data Model

Second Data Model

Type

Description

ApiKey in API Key Module

SalesChannel

Stored - many-to-many

Learn more

Cart in Cart Module

SalesChannel

Read-only - has one

Learn more

Order in Order Module

SalesChannel

Read-only - has one

Learn more

Product in Product Module

SalesChannel

Stored - many-to-many

Learn more

SalesChannel

StockLocation in Stock Location Module

Stored - many-to-many

Learn more


API Key Module#

A publishable API key allows you to easily specify the sales channel scope in a client request.

Medusa defines a link between the ApiKey and the SalesChannel data models.

Cart Module#

Medusa defines a read-only link between the Cart Module's Cart data model and the SalesChannel data model. Because the link is read-only from the Cart's side, you can only retrieve the sales channel of a cart, and not the other way around.

Order Module#

Medusa defines a read-only link between the Order Module's Order data model and the SalesChannel data model. Because the link is read-only from the Order's side, you can only retrieve the sales channel of an order, and not the other way around.

Product Module#

A product has different availability for different sales channels. Medusa defines a link between the Product and the SalesChannel data models.

A product can be available in more than one sales channel. You can retrieve only the products of a sales channel.

Stock Location Module#

A stock location is associated with a sales channel. This scopes inventory quantities associated with that stock location by the associated sales channel.

Medusa defines a link between the SalesChannel and StockLocation data models.

Found a problem with this page?Report Issue
Edited Nov 14·Edit this page