Sales Channel Module

The Sales Channel Module provides sales-channel-related features in your Medusa and Node.js applications.

How to Use Sales Channel Module's Service#

You can use the Sales Channel Module's main service by resolving from the Medusa container the resource Modules.SALES_CHANNEL imported from @medusajs/framework/utils.

For example:


What's a Sales Channel?#

A sales channel indicates an online or offline channel that you sell products on.

Some use case examples for using a sales channel:

  • Implement a B2B Ecommerce Store.
  • Specify different products for each channel you sell in.
  • Support omnichannel in your ecommerce store.

Features#

Sales Channel Management#

Manage sales channels in your store. Each sales channel has different meta information such as name or description, allowing you to easily differentiate between sales channels.

Code
1const salesChannels = await salesChannelModuleService.createSalesChannels([2  {3    name: "B2B",4  },5  {6    name: "Mobile App",7  },8])

Product Availability#

Medusa uses the Product and Sales Channel modules to allow merchants to specify a product's availability per sales channel.

For example, B2B customers viewing products only see products in the B2B sales channel.

Cart and Order Scoping#

Carts, available through the Cart Module, are scoped to a sales channel. Paired with the product availability feature, you benefit from more features like allowing only products available in sales channel in a cart.

Orders are also scoped to a sales channel due to the relation between the Sales Channel and Order modules.

Was this page helpful?
Edit this page