PRD: Sale Channels
| Module | Commerce | PRD ID | PRD-SC-001 |
| Status | Ready to dev | FEAT | SC |
| Epic | — | Plane | BANA-1493 |
| Date | 2026-06-01 | Version | v1.0 |
| Packages | @nx/commerce | URD | SC |
| Surface | Client · Owner/MgrSale · POSBO · Ops | ||
| Owner | Phát Nguyễn | ||
What a sale channel is
A merchant usually sells through several sale channels: dine-in, takeout, delivery. Each one operates differently - the takeout counter may pull stock from a different location than the dine-in area, print receipts on a different machine, or use a different print template. This PRD turns the sale channel into a real configuration unit.
Stock and print config now belong to each channel
Previously the channel was just a thin record: the stock location and print config lived at the merchant level, so two channels under the same merchant were forced to look identical. This increment moves the stock-pickup locations and terminal/print config fully onto each channel - each channel decides for itself which stock location to pull from, which terminal to print at, which print template to use, and config lookups run per individual channel instead of falling back to merchant-wide config.
One channel, from onboarding to deactivation
Onboarding creates default channels by industry: an F&B merchant gets Dine-in + Takeout, a retail merchant gets In-store + Online. A manager adds a new channel through the Edit-merchant screen or the standalone channel-management screen, then attaches a stock-pickup location and print config to it. To stop using a channel, the manager clicks Deactivate - but if the channel still has an in-flight order (one in Processing or Partially-paid status), the action is blocked immediately with a reason message; those orders have to be worked through first.
The easiest thing to get wrong
Deactivate and Delete share one condition, but not one consequence
Both Deactivate and Delete are blocked while the channel still has an in-flight order - the same guard, the same condition.
The consequence differs. Deactivate temporarily stops selling on the channel and it can be reactivated anytime. Delete removes the channel outright, cannot be undone, and cleans up that channel's product links.