Skip to content

Commerce Phase A Built

Commerce is the business-structure module: it lets a business owner set up an Organization (the brand) and one or more Merchants (the legal point-of-sale units where transactions happen), each with its own sale channels and product categories. It is the first thing a new user touches - onboarding creates the whole structure in one atomic step - and everything else (products, orders, inventory, finance) hangs off the merchant it creates.

Status: Built (P1) · In-progress (P2 Retail) · Owner: Hải Cao · Phase: 1-2 · Last reviewed: 2026-06-11

ChainLink
RoadmapPhase 2 - By Month › July
EpicBANA-1319 - Retail business type · BANA-1337 - Backoffice portal
URDURD - new increment: RTL Retail
PRDPRD-ORG-001 Organization & merchant · PRD-RCP-001 Receipt templates · PRD-FLR-001 Table & floor allocation · PRD-RTL-001 Retail · PRD-BOP-001 Backoffice portal (catalogue)
Decisions (ADR)@nx/commerce decisions
Dev docs@nx/commerce
Delivery logTraceability matrix

1. Identity

PropertyValue
Module IDCORE-03
TierCore
StatusBuilt
PhaseP1 (Onboarding) · P2 (Full management)
PriorityHIGH
Primary usersBusiness Owner · Manager · (read access for Employees)

2. Purpose & Scope

IncludedExcluded
One-step business onboarding (org + merchant + channels + access)Employee lifecycle and login (→ User Management)
Organization profile, hierarchy, settings, attachmentsRole/permission definition (→ Permissions)
Merchant creation (single, batch, aggregate) and profileProduct catalog content (→ Products)
Business-type classification (RETAIL / FNB / TICKET / OTHER)Stock levels (→ Inventory)
Sale-channel managementOrder / checkout processing (→ Orders)
Category management with add-on flagPayment processing (→ Payment)
Per-merchant deletion policyE-invoice issuance (→ Tax & Invoice)
Encrypted merchant configuration (payment/integration credentials)

Organization vs Merchant. The Organization is the virtual brand layer (name, logo, public profile) and carries no legal identity. The Merchant is the physical/legal unit - it holds the tax number (MST), e-invoice profile, and wallet, and is where sales actually occur. Creating an Organization always auto-creates one default Merchant.

3. Capabilities

CapabilityWhat the user can do
Business onboardingCreate the whole structure (organization + default merchant + sale channels + owner access) in one step
Organization profileEdit name (multilingual), slug, contact, address, social links, registration info
Organization hierarchyLink a parent organization to child organizations
Organization settingsStore polymorphic key-value configuration on an organization
Merchant - single createAdd one merchant to an organization
Merchant - batch createAdd several merchants in one request
Merchant - aggregate create/updateCreate or update a merchant with its categories and channels in one atomic operation
Business typeSet the POS interface type per merchant (RETAIL / FNB / TICKET / OTHER)
Deletion policyConfigure per-merchant cascade rules for category/product deletion
Merchant configurationStore encrypted payment-provider and integration credentials
Sale channelsManage channels via merchant aggregate; batch-add to existing merchant; hierarchy
CategoriesManage categories via merchant aggregate; mark as add-on
Status lifecycleActivate / deactivate / archive organizations and merchants
Identifier lookupFind an organization or merchant by ID or by slug
Role-based filteringOwners see their own data; employees see only assigned merchants
Standalone channel/category CRUDManage channels/categories independently of the merchant aggregate
Ownership transferReassign an organization to a different owner

4. Module Dependencies

Depends onWhy
User ManagementThe owner and employees belong to the organization / merchants
PermissionsRoles are scoped to organization or merchant; onboarding grants the owner access
Depended on byWhy
ProductsProducts are scoped to a merchant
DeviceDevices are assigned to merchants
OrdersSales occur per merchant and sale channel
Tax & InvoiceTax info is captured on the merchant; invoice profiles are per merchant
FinanceFinance wallets are per merchant

5. Backend Packages

Implementation detail lives in the developer docs - this section only maps the module to the service that powers it.

PackageRoleDeveloper docs
@nx/commerceOrganizers, merchants, onboarding, sale channels, categories, settings, devices, encrypted integrations; CDC source of truthcommerce

Engineering Mapping (Feature ⇄ Package)

The horizontal axis of the Feature Spine - each business feature (<AREA> in the URD) maps to its engineering home. Reciprocal: the package docs link back here.

FeatureDev packageStatus
ORG Organization@nx/commerceBuilt
MER Merchant@nx/commerceBuilt
SC Sale Channels@nx/commerceBuilt
ACC Access@nx/commerceBuilt
CAT Categories@nx/commerceBuilt
DEL Deletion Policy@nx/commerceBuilt
CFG Configuration@nx/commerceBuilt
RCP Receipt Templates@nx/commerce · @nx/coreBuilt
FLR Table & Floor Allocation@nx/commerce · @nx/sale · @nx/coreBuilt
RTL Retail business type@nx/commercePlanned
BOP Backoffice portal@nx/commerce · @nx/helpdeskPlanned

6. Key User Flows

Onboarding (atomic setup)

Aggregate merchant create/update (smart update)

7. Roles & Permissions

RoleCanCannot
OwnerOnboard, create/update/deactivate/archive organization and merchants, manage channels/categories/settings, assign employeesAccess other owners' organizations
ManagerManage assigned merchants and their channels/categories (per granted scope)Create organizations; manage merchants outside scope
EmployeeView assigned merchants and their structureCreate or modify merchants; see unassigned merchants
Super AdminAccess all organizations and merchants (bypasses role filtering)-

8. Status & Roadmap

PhaseCapabilities
P1Atomic onboarding (organization + default merchant + sale channels + owner access)
P2Full organization & merchant management: profiles, hierarchy, aggregate create/update, business types, deletion policy, encrypted configuration, role-based filtering
P3Planned: standalone channel/category CRUD, ownership transfer, cascade deactivation, company-wide setting defaults, MST validation, multi-brand support

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.