Skip to content

Work in Progress

Feature details in this document may change during investigation, discussion, design, and implementation phases.

Product / Sản phẩm

Product catalog management for your business.

Overview

AttributeValue
Module IDCORE-06
PhasePhase 1 (Basic), Phase 2 (Variants/Fare), Phase 3 (Campaign/BOM)
PriorityHIGH
DependenciesMerchant

The Product module manages the complete product catalog. A Product defines the item that can be sold. Each Product has ProductVariant (SaleItem) which is what we actually sell. Each ProductVariant has Fare for pricing. Campaigns allow seasonal/promotional pricing with Sale Quotation to limit quantities.

Entity Definitions

EntityVietnameseDescription
ProductSản phẩmBase item definition (not including quotation)
ProductVariantBiến thể sản phẩmSellable unit (SaleItem) - what we actually sell
FareGiáPricing for each ProductVariant
CampaignChiến dịchPromotional/seasonal configuration
Sale QuotationHạn mức bánQuantity limit for campaign pricing
CategoryDanh mụcProduct organization
┌─────────────────────────────────────────────────────────────────┐
│                     PRODUCT STRUCTURE                           │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│    ┌─────────────────────────────────────────────┐              │
│    │                 CATEGORY                     │              │
│    │          (e.g., Beverages)                  │              │
│    └─────────────────────┬───────────────────────┘              │
│                          │                                      │
│          ┌───────────────┼───────────────┐                      │
│          ▼               ▼               ▼                      │
│    ┌───────────┐   ┌───────────┐   ┌───────────┐                │
│    │  PRODUCT  │   │  PRODUCT  │   │  PRODUCT  │                │
│    │ (Coffee)  │   │  (Tea)    │   │  (Juice)  │                │
│    └─────┬─────┘   └───────────┘   └───────────┘                │
│          │                                                      │
│    ┌─────┴─────────────────┐    PRODUCT VARIANT (SaleItem)      │
│    ▼                       ▼                                    │
│  ┌─────────────┐   ┌─────────────┐                              │
│  │   VARIANT   │   │   VARIANT   │                              │
│  │ Hot Coffee  │   │ Iced Coffee │                              │
│  └──────┬──────┘   └──────┬──────┘                              │
│         │                 │         FARE (Pricing)              │
│    ┌────┴────┐       ┌────┴────┐                                │
│    ▼         ▼       ▼         ▼                                │
│ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐                             │
│ │ Fare │ │ Fare │ │ Fare │ │ Fare │                             │
│ │Base  │ │Promo │ │Base  │ │Promo │                             │
│ │30,000│ │25,000│ │35,000│ │30,000│                             │
│ └──────┘ └──────┘ └──────┘ └──────┘                             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────┐
│                     CAMPAIGN STRUCTURE                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│    ┌─────────────────────────────────────────────┐              │
│    │                 CAMPAIGN                    │              │
│    │        (e.g., Summer Sale 2025)             │              │
│    │     Start: 01/06  |  End: 31/08            │              │
│    └─────────────────────┬───────────────────────┘              │
│                          │                                      │
│          ┌───────────────┼───────────────┐                      │
│          ▼               ▼               ▼                      │
│    ┌───────────┐   ┌───────────┐   ┌───────────┐                │
│    │   SALE    │   │   SALE    │   │   SALE    │                │
│    │ QUOTATION │   │ QUOTATION │   │ QUOTATION │                │
│    │           │   │           │   │           │                │
│    │ Variant A │   │ Variant B │   │ Variant C │                │
│    │ Qty: 100  │   │ Qty: 50   │   │ Qty: 200  │                │
│    │ Price: 25k│   │ Price: 30k│   │ Price: 20k│                │
│    └───────────┘   └───────────┘   └───────────┘                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

User Stories

Phase 1 - Product & Category

IDAs a...I want to...So that...
US-01Business ownerCreate product categoriesProducts are organized
US-02Business ownerAdd productsI define items that can be sold
US-03Business ownerSet tax rates per productInvoices have correct VAT
US-04Business ownerAdd product imagesCustomers can identify items
US-05Business ownerSet product barcodesI can scan products at checkout
US-06CashierSearch products by nameI find products quickly
US-07CashierScan product barcodeProducts add to cart instantly

Phase 2 - ProductVariant & Fare

IDAs a...I want to...So that...
US-08Business ownerCreate product variants (SaleItems)I sell size/color/flavor options
US-09Business ownerSet fare per variantDifferent variants have different prices
US-10Business ownerCreate multiple fares per variantI have base price and promotional prices
US-11Business ownerTrack inventory per variantStock is accurate per sellable item
US-12Business ownerImport products from CSVI can bulk upload catalog
US-13Business ownerSet variants available per storeDifferent stores sell different items

Phase 3 - Campaign & Sale Quotation

IDAs a...I want to...So that...
US-14Business ownerCreate campaignsI run seasonal/promotional sales
US-15Business ownerSet campaign date rangePromotions are time-limited
US-16Business ownerConfigure sale quotationI limit how many items can be sold at promo price
US-17Business ownerTrack quotation usageI know remaining promotional inventory
US-18Business ownerAuto-switch to base fareSystem uses base price when quota exhausted

Phase 3 - Manufacturing & BOM

IDAs a...I want to...So that...
US-19Business ownerCreate combo productsI sell bundles at special prices
US-20Business ownerDefine recipes (BOM)Ingredients are auto-deducted
US-21Business ownerSet unit conversionsI buy in bulk, sell in units
US-22Business ownerTrack production batchesI know which batch was sold

Feature Matrix

Product & Category Features

FeatureP1P2P3Description
Product CRUDCreate, read, update, delete products
CategoriesOrganize products in categories
Tax ratesAssign VAT rate per product
Product imagesUpload product photos
Barcode/SKUProduct identifiers
Units of measureSelling unit (piece, kg, etc.)
Bulk importCSV/Excel import

ProductVariant (SaleItem) Features

FeatureP1P2P3Description
Default variantEvery product has at least one variant
Multiple variantsSize, color, flavor options
Variant SKUUnique SKU per variant
Variant barcodeUnique barcode per variant
Store availabilityVariants available per store
Inventory per variantStock tracked per variant

Fare (Pricing) Features

FeatureP1P2P3Description
Base fareDefault price per variant
Multiple faresMultiple price tiers per variant
Fare validityDate range for fare applicability
Fare priorityWhich fare applies when multiple valid

Campaign & Sale Quotation Features

FeatureP1P2P3Description
Campaign creationCreate promotional campaigns
Campaign date rangeStart/end dates for campaign
Sale quotationQuantity limits at promotional price
Quotation trackingTrack remaining quota
Auto-fallbackSwitch to base fare when quota exhausted
Campaign reportingCampaign performance analytics

Manufacturing & BOM Features

FeatureP1P2P3Description
Composite productsBundle products together
Bill of MaterialsRecipe/ingredient tracking
Unit conversionsBox → Units conversion
Batch/lot trackingProduction batch management

Product Types

┌─────────────────────────────────────────────────────────────────┐
│                      PRODUCT TYPES                              │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  TYPE                  USE CASE                 EXAMPLE         │
│  ─────────────────────────────────────────────────────────────  │
│  │                                                              │
│  ├── STANDARD          Regular items            T-shirt, Book   │
│  │                                                              │
│  ├── SERVICE           Non-inventory items      Haircut, Repair │
│  │                                                              │
│  ├── COMPOSITE         Bundle of products       Combo meal      │
│  │                                                              │
│  └── RAW_MATERIAL      Manufacturing input      Flour, Sugar    │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Fare Types

┌─────────────────────────────────────────────────────────────────┐
│                       FARE TYPES                                │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  TYPE                  USE CASE                 PRIORITY        │
│  ─────────────────────────────────────────────────────────────  │
│  │                                                              │
│  ├── BASE              Default price            Lowest (1)      │
│  │                     Always available                         │
│  │                                                              │
│  ├── PROMOTIONAL       Time-limited discount    Medium (2)      │
│  │                     Date range based                         │
│  │                                                              │
│  ├── CAMPAIGN          Campaign-specific        Highest (3)     │
│  │                     Quota-limited                            │
│  │                                                              │
│  └── MEMBER            Customer tier price      Custom          │
│                        Loyalty-based                            │
│                                                                 │
│  Resolution: Higher priority wins when multiple fares valid     │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Campaign & Sale Quotation

┌─────────────────────────────────────────────────────────────────┐
│                   CAMPAIGN STRUCTURE                            │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  CAMPAIGN                                                       │
│  ├── Name: Summer Sale 2025                                     │
│  ├── Start Date: 2025-06-01                                     │
│  ├── End Date: 2025-08-31                                       │
│  ├── Status: ACTIVE / SCHEDULED / ENDED                         │
│  │                                                              │
│  └── SALE QUOTATIONS                                            │
│      │                                                          │
│      ├── ProductVariant: Iced Coffee (Large)                    │
│      │   ├── Campaign Price: 25,000 VND                         │
│      │   ├── Quota: 100 units                                   │
│      │   ├── Sold: 45 units                                     │
│      │   └── Remaining: 55 units                                │
│      │                                                          │
│      └── ProductVariant: Green Tea (Medium)                     │
│          ├── Campaign Price: 20,000 VND                         │
│          ├── Quota: 50 units                                    │
│          ├── Sold: 50 units                                     │
│          └── Remaining: 0 (EXHAUSTED → use base fare)           │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Sale Quotation Behavior

ScenarioBehavior
Quota availableUse campaign fare
Quota exhaustedFallback to base fare
Campaign not startedUse base fare
Campaign endedUse base fare
Multiple campaignsUse highest priority campaign

Key Flows

Product Creation Flow

ProductVariant Creation Flow

Fare Configuration Flow

Campaign & Sale Quotation Flow

Fare Resolution Flow (at Sale)

Product Search Flow

Category Management Flow

BOM/Recipe Creation Flow (Phase 3)


Business Rules

Product Rules

Rule IDRuleDescription
BR-PRD-01Name requiredProduct name is mandatory
BR-PRD-02Category requiredEvery product must belong to a category
BR-PRD-03Tax rate validTax rate must be valid Vietnam VAT (0, 5, 8, 10%)
BR-PRD-04Unit requiredEvery product must have a selling unit
BR-PRD-05Soft deleteProducts can only be deactivated, not deleted
BR-PRD-06Store scopeProducts are scoped to organization
BR-PRD-07Image formatImages must be JPG, PNG, or WebP

ProductVariant (SaleItem) Rules

Rule IDRuleDescription
BR-VAR-01Default variantEvery product has at least one default variant
BR-VAR-02Unique SKUVariant SKU must be unique within organization
BR-VAR-03Unique barcodeVariant barcode must be unique within organization
BR-VAR-04Inherit productVariants inherit parent product's category & tax
BR-VAR-05Require fareEvery variant must have at least one fare (base)
BR-VAR-06Soft deleteVariants can only be deactivated, not deleted

Fare Rules

Rule IDRuleDescription
BR-FAR-01Price positiveFare price must be >= 0
BR-FAR-02Base requiredEvery variant must have a BASE fare
BR-FAR-03Valid datesPromotional fares must have valid date range
BR-FAR-04Priority orderHigher priority fare wins when multiple valid
BR-FAR-05Fallback to baseAlways fallback to BASE fare if no other valid

Campaign & Sale Quotation Rules

Rule IDRuleDescription
BR-CMP-01Date requiredCampaign must have start and end dates
BR-CMP-02Valid rangeEnd date must be after start date
BR-CMP-03Quota positiveSale quotation quantity must be > 0
BR-CMP-04Quota trackingSystem tracks remaining quota in real-time
BR-CMP-05Auto-fallbackWhen quota exhausted, use base fare
BR-CMP-06No oversellCannot sell more than quota at campaign price

BOM Rules

Rule IDRuleDescription
BR-BOM-01Min componentsBOM must have at least 1 component
BR-BOM-02No circularBOM cannot reference itself
BR-BOM-03Component existsAll BOM components must be valid variants

Acceptance Criteria

Product Acceptance Criteria

AC-PRD-01: Product Creation

GIVEN   an owner on the Products page
WHEN    they create a new product with required fields
THEN    - Product is saved to database
        - Default ProductVariant is created
        - Base Fare is created for variant
        - Product appears in catalog
        - Product is searchable by name

AC-PRD-02: Category Organization

GIVEN   a category hierarchy
WHEN    viewing products
THEN    - Products can be filtered by category
        - Subcategories inherit parent visibility
        - Category order matches display order
        - Empty categories are hideable

ProductVariant Acceptance Criteria

AC-VAR-01: Variant Creation

GIVEN   a product
WHEN    owner creates variants (e.g., Size: S, M, L)
THEN    - Each variant has unique SKU
        - Each variant requires base fare
        - Each variant tracks separate inventory
        - POS shows variant selection on add

AC-VAR-02: Variant Barcode Scan

GIVEN   a variant with barcode assigned
WHEN    cashier scans the barcode
THEN    - Variant is found instantly
        - Variant is added to cart
        - Applicable fare is displayed
        - Stock level is shown (if tracked)
GIVEN   a product catalog
WHEN    user searches for products
THEN    - Search by product name (partial match)
        - Search by variant SKU (exact match)
        - Search by variant barcode (exact match)
        - Results show variants with fares

Fare Acceptance Criteria

AC-FAR-01: Fare Configuration

GIVEN   a ProductVariant
WHEN    owner configures fares
THEN    - Base fare is required
        - Multiple fares can be added
        - Each fare has type and price
        - Promotional fares have date range

AC-FAR-02: Fare Resolution

GIVEN   a variant with multiple fares
WHEN    adding to cart
THEN    - System selects highest priority valid fare
        - Campaign fare used if quota available
        - Falls back to base fare if no other valid
        - Displayed price matches selected fare

Campaign Acceptance Criteria

AC-CMP-01: Campaign Creation

GIVEN   an owner on the Campaigns page
WHEN    they create a new campaign
THEN    - Campaign has name, start/end dates
        - Campaign status is SCHEDULED/ACTIVE/ENDED
        - Sale quotations can be added
        - Campaign appears in campaign list

AC-CMP-02: Sale Quotation

GIVEN   an active campaign
WHEN    owner adds sale quotation
THEN    - ProductVariant can be selected
        - Quota quantity is set
        - Campaign price is set
        - Remaining quota is tracked

AC-CMP-03: Quota Exhaustion

GIVEN   a sale quotation with quota = 100
WHEN    100 units are sold at campaign price
THEN    - Quota remaining = 0
        - Subsequent sales use base fare
        - Customer sees base price
        - Campaign stats show 100% utilized

BOM Acceptance Criteria (Phase 3)

AC-BOM-01: Bill of Materials

GIVEN   a combo product with BOM
WHEN    the combo is sold
THEN    - All component variants are deducted from inventory
        - Component costs are tracked
        - Production cost is calculated
        - Profit margin is accurate

Dependencies

Product
├── Requires: Merchant (Store)
├── Required by: Inventory, Orders, Tax & Invoice
└── Integrates: None (internal catalog)

Entity Relationships:
├── Product → ProductVariant (1:N)
├── ProductVariant → Fare (1:N)
├── Campaign → SaleQuotation (1:N)
└── SaleQuotation → ProductVariant (N:1)
ModuleRelationship
MerchantProducts scoped to organization/store
InventoryStock levels per ProductVariant
OrdersProductVariants sold in orders
Tax & InvoiceTax rates applied to products
ReportsProduct/Campaign sales reports

Integration Points

Barcode Standards

┌─────────────────────────────────────────────────────────────────┐
│                    BARCODE SUPPORT                              │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Supported Formats:                                             │
│  ├── EAN-13 (13 digits) - International standard                │
│  ├── EAN-8 (8 digits) - Small products                          │
│  ├── UPC-A (12 digits) - US standard                            │
│  ├── Code 128 (variable) - Industrial/logistics                 │
│  └── QR Code - Quick lookup, promotions                         │
│                                                                 │
│  Auto-detection:                                                │
│  ├── Scanner sends barcode to app                               │
│  ├── App detects format automatically                           │
│  └── Product lookup by barcode                                  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Image Storage

┌─────────────────────────────────────────────────────────────────┐
│                    IMAGE MANAGEMENT                             │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Requirements:                                                  │
│  ├── Max file size: 5MB                                         │
│  ├── Formats: JPG, PNG, WebP                                    │
│  ├── Auto-resize to multiple sizes                              │
│  └── CDN delivery for fast loading                              │
│                                                                 │
│  Generated Sizes:                                               │
│  ├── Thumbnail: 150x150px                                       │
│  ├── Small: 300x300px                                           │
│  ├── Medium: 600x600px                                          │
│  └── Large: 1200x1200px                                         │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Screenshots

Screenshots

Screenshots will be added after UI implementation.


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