Master Data ModuleCore Module

Product Categories

1. Overview & Category Taxonomy

What are Product Categories?
Product Categories organize catalog merchandise into an unlimited recursive parent-child tree structure. Category taxonomy drives POS cashier quick-pick menus, e-commerce catalog navigation, inventory grouping, and cross-category sales reporting.
Menu Location:/admin/master-data/categories

2. When to Use Product Categories

Multi-Tier Departmental Taxonomy (Supermarket / Retail)

Structuring tens of thousands of SKUs across departmental hierarchies (e.g. Fresh Groceries > Dairy & Chilled > Probiotic Yogurts).

Recommended Action:Create the top-level department (Level 1), then nest sub-categories using parentId referencing the parent node to enable intuitive tree navigation.

POS Touchscreen Quick-Pick Tabs (FnB / Fast-Moving Retail)

Frontline cashiers in busy cafes or convenience counters need single-tap access to fast-moving items like Coffees, Pastries, or Ice without scanning barcodes.

Recommended Action:Designate high-frequency sales categories as root Level-1 nodes; the POS register displays them as primary horizontal touch tabs on the cashier terminal.

Omnichannel Marketplace Taxonomy Mapping (Shopee / TikTok)

Synchronizing enterprise product catalog with external e-commerce marketplaces requiring specific category leaf classifications.

Recommended Action:Align internal sub-categories with marketplace leaf nodes to automate product upload validation and prevent sync rejections.

Gross Margin & Departmental Profitability Analytics

Executive management evaluates sales velocity and profit margins across diverse merchandise lines (e.g. Accessories at 60% margin vs Hardware at 15%).

Recommended Action:Assign every product SKU strictly to a leaf category to generate automated profit-and-loss and sales contribution reports grouped by department.

Raw Material vs Finished Goods Operational Segregation

Manufacturing operations require strict isolation between raw ingredients (Flour, Sugar) and saleable retail items (Artisan Bread, Pastries).

Recommended Action:Create dedicated root categories for Raw Materials, Packaging, and Finished Goods to streamline warehouse picking and filter POS catalogs.

3. Hierarchical Tree Architecture

The category tree uses a self-referencing relationship (parentId -> categories.id). When a new child category is added:

1. level = parentCategory.level + 1
2. parentCategory.update({ isLeaf: false })
3. newCategory created with isLeaf = true

When deleting or moving nodes, the system checks whether the former parent still has remaining children and automatically resets isLeaf = true when appropriate.

4. Data Dictionary & Field Specifications

Column definitions for the recursive categories table:

Field / ColumnInput TypeRequirementDescription & Operational Guide
code
Text (Category Code)Required
System-wide unique identifier for the category node.
Example: CAT-ELEC, CAT-APP-MEN
name
Text (Category Name)Required
Human-readable title displayed in navigation menus and POS counter tabs.
Example: Consumer Electronics, Men Apparel
parentId
Dropdown (Parent Category, Optional)Optional
Parent category in the hierarchy. Leave empty to create a top-level department category.
Example: None (Top Level) or Men Apparel
level
Number (Hierarchy Level)Optional
Hierarchy depth level (Level 1 for Root, Level 2 for Sub-category, Level 3 for Sub-department).
Example: 1 (Main Department), 2 (Sub-category)
isLeaf
System Status (Product Assignable)Optional
Indicates whether products can be assigned directly to this category branch.
Example: Yes
status
Select (Active / Inactive)Required
Operational status toggle. Inactive categories hide child items from POS.
Example: Active

5. Interface Preview & Category Trees

Menu Location:Route: /admin/master-data/categories
[-] Electronics (Level 1)Parent Node
|-- Audio & Sound (Level 2)Parent Node
|-- Headphones & Earbuds (Level 3)Leaf Node
Visual representation of multi-level category nodes with expand/collapse and child-count indicators.

6. Workflow: Adding Tree Nodes

1

Open Category Tree View

Categories Menu Link

Navigate to Master Data -> Categories from the left sidebar.

2

Specify Hierarchy & Node Code

Add Category Modal

Click "Add Category". If creating a subcategory, choose the parent node in the Parent Category selector. Enter a unique Code and Name.

The system automatically arranges the hierarchy level and ensures products can be organized smoothly.
3

Save Category

Save Category Button

Click "Save Category" to register the new category in your store directory.

7. Workflow: Updating Category Hierarchy

1

Locate Category Node

Category Tree Search

Find the category in the hierarchical tree or list table using search.

2

Modify Details or Reparent Node

Edit Action Icon

Click "Edit" to modify Name or Code. If reparenting, select a new parent category.

3

Save Changes

Save Changes Button

Confirm the edit to apply changes across the tree hierarchy.

8. Deactivation & Leaf Deletion Rules

Hierarchy Integrity Guardrails
A category cannot be deleted if it contains child categories or if any products reference it. Only leaf nodes (isLeaf = true) with zero attached products can be deleted.
1

Check Children & Product References

Category Detail Pane

Verify that the category has no active child categories and is not linked to existing products.

The system blocks category removal if subcategories or catalog items are currently assigned to it.
2

Deactivate or Delete Node

Delete / Deactivate Action

If referenced by products, set Status to Inactive. If completely empty and created by mistake, click "Delete" to remove it permanently.

9. Cross-Module Impact & POS Navigation

POS Counter & Cashier

Categories render as primary touch tabs on POS registers, filtering visible menu products for fast checkout.

Products & Catalog Master

Every product must belong to an active Category. Category code forms the foundation of product catalog classification.

Sales & Inventory Reports

Financial summaries aggregate sales revenue, gross margin, and stock turnover by product category.

Taxonomy Best Practices
  • Keep your category tree between 2 to 3 levels deep for optimal POS cashier screen speed and user ergonomics.
  • Use standardized category code prefixes (e.g., BEV-HOT, BEV-COLD) for clear document reporting.