Multi-store
Several storefronts, one catalogue
Channels are storefronts over one catalogue, differing in what is published to each and at what price. A store that never creates a second channel pays nothing for the feature: one channel is the default, and every request that names none is served from it.
- core/channels.go channels, publishing
- core/pricing.go per-channel price lists
- 1 default channel, enforced by the database
What a channel scopes
- Publishing. Each product carries the list of channels it is published to;
Publish(product, channels)sets it. - Price. A price list can be limited to one channel, so the same variant sells at a different price on a different storefront — resolved by
PriceInChannel. - The default. Exactly one channel is default, guaranteed by a partial unique index, and is what a request without a channel gets.
- Not orders, customers or stock. Those are one store’s. A second storefront sells the same inventory from the same locations.
Channel: code, name, active, default, products
Storefront A
channel: retail
published set A · retail prices
GoCommerce
one catalogue, one admin, one stock
published set B · outlet prices
Storefront B
channel: outlet
Three things channels are good for
An outlet store
Publish the discontinued lines to a second channel with a lower price list. Stock is shared, so selling out on one side sells out on the other, which is the truth.
A brand per storefront
Two brands, one warehouse, one admin. Each product goes to its brand’s channel; staff and rights are shared because the merchant is.
A wholesale storefront
A B2B channel with a group-restricted price list — how B2B pricing resolves — beside the retail one, on the same catalogue.
Where the edge is
Not multi-tenant
Channels belong to one merchant. Unrelated stores are separate installs, each one binary and one database.
No per-channel staff or ledger
Rights, customers, orders and payouts are store-wide. A channel is a shop window, not a subsidiary.
The storefront side is yours
A channel is named on the request, so a second storefront is a second client of the API — anything HTTP. Svelte Commerce’s early connector (0.1.0) does not send a channel, so it is served from the default one.
FAQ
Questions about multi-store
What is a channel?
A named storefront over the one catalogue: a code, a name, an active flag and a count of the products published to it. Exactly one channel is the default — enforced by a partial unique index — and a request that names no channel is served from it, which is why a store that never creates a second channel never notices the feature.
What differs between channels?
Two things: which products are published to each, set per product with a list of channel ids, and which price lists apply, since a price list can be limited to one channel. Orders, customers and inventory are not partitioned by channel; a second storefront sells from the same stock.
How does a storefront pick its channel?
By naming it on the request. Any HTTP client can, so a Next.js site and a native app can each be a channel of the same backend, and the admin sees all of them. Svelte Commerce’s early GoCommerce connector, 0.1.0, does not send a channel, so a Svelte Commerce storefront on it is served from the default one.
Can I run separate brands from one install?
Separate catalogues per brand, yes — publish each product to its brand’s channel and price it per channel. Separate merchants with separate staff and separate books, no: that is one store with one admin, one set of rights and one ledger.
Is this multi-tenant?
No. Channels are storefronts of one merchant. Several merchants selling on one store is the marketplace shape, and several unrelated stores is several installs.
One catalogue, as many windows as you need
Create a channel in the admin, publish a product to it, and price a cart against it from the API docs.