Product Categories
- Code: INV-PCT
- Module: Inventory
- Type: Master Data
1. Overview
Product Categories are labels describing a product’s nature or purpose — for example Cold Drinks, Promo Products, or Daily Needs. Unlike Product Groups, where exactly one is chosen per product, a product may have more than one category, so the catalog can be read from several angles at once.
Expected outcome: products can be browsed through labels that match the store’s daily needs, without forcing the catalog into a single division.
2. Problem
A single grouping through groups is not enough for daily operational needs, because one item often needs to be viewed from several angles at once. As a result:
- Products with more than one characteristic are forced into a single group.
- Staff create their own tagging outside the system, so it cannot be shared.
- The product list is hard to narrow down for specific needs, for example when preparing a promo.
3. Goals & Non-goals
3.1 Goals
- One product can be given more than one label according to its nature and purpose.
- The category list is managed by the tenant themselves and used uniformly across all stores.
- Categories that are no longer used can be deactivated without changing the products already using them.
3.2 Non-goals
- Nested category hierarchies.
- Automatic rules that assign categories based on product name or group.
- Price, discount, or tax settings per category.
4. Business Rules
Business rules are the set of provisions and constraints that apply to Product Categories throughout the application, on every screen and action that involves it, whoever performs it. These rules are the single source of truth: if another part of this PRD appears to differ, the rules here prevail.
- BR-01 Every product category must have a category name. Needs confirmation: whether the name must be unique and what its maximum length is.
- BR-02 One product may have more than one category, and must have at least one.
- BR-03 Inactive categories are not used for new products. Needs confirmation: currently the category options on the product form do not yet filter by active status.
- BR-04 Every change to product category data is recorded along with its actor and time.
5. Flow
5.1 Main Flowchart
- Fill In Category Data — Staff set the category’s status and name through the add dialog.
- Validation — Inputs are checked before the category is saved. A category that violates the rules cannot be saved, and the errors are shown on the relevant fields.
- Category Saved — The category is immediately available as an option when a product is created or edited.
- 3a. Edit Category Data — The category’s status and name can be updated at any time through the edit dialog.
- Used on Products — A product selects one or more categories. The details are explained in the Products PRD.
5.2 Status Lifecycle
| Status | Description | Next |
|---|---|---|
Activeis_active: true | The category is used to label products | Inactive, or deleted |
Inactiveis_active: false | The category is no longer used for new products | Active, or deleted |
6. Document Structure
This section defines the content of the Product Category data itself: which fields it has, their type, which are required, their initial values, and their value rules. The provisions here apply wherever the category is created or changed and are enforced on save, regardless of how the field is displayed.
6.1 General
| Field | Type | Required | Default | Rules |
|---|---|---|---|---|
| Status | Enum | Yes | Not selected | Active or Inactive |
| Category Name | Text | Yes | — | (BR-01) |
7. UI Structure
This section defines how Product Categories are displayed and operated: the list columns and form controls along with their behavior. Activity Logs are available as a drawer from the list page (all categories) and from the detail dialog (per category). This section only governs display and interaction; content and value rules still follow Document Structure.
7.1 Datatable
| Column | Sortable | Sample Value | Component |
|---|---|---|---|
| Select | — | — | Checkbox |
| No | — | 1 | Number |
| Category Name | Yes | Cold Drinks | Text |
| Status | — | Active | Badge |
| Actions | — | View · Edit · Delete | Action Menu |
7.2 Form & Details
Create — A dialog containing status and category name. Action: Save, which is only enabled after an input changes.
Edit — The same dialog with its inputs filled with the selected category’s data. Action: Update.
Detail — A read-only dialog containing status and category name, with an action menu containing Activity Logs and Edit.
Category Data
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Status | Single Select | Active or Inactive | The currently selected option can be deselected, leaving the status empty |
| Category Name | Text Input | — | — |
8. User Stories
US-01 - Add a product category
As inventory staff, I want to add a product category, so that products can be labeled according to the store’s needs.
| ID | Acceptance criteria |
|---|---|
| AC-01.1 | The Add New button only appears for users with the create permission, and opens a dialog with empty inputs. |
| AC-01.2 | Status and category name are required; errors appear on fields that are not valid yet (BR-01). |
| AC-01.3 | The save button is disabled until an input has changed. |
| AC-01.4 | On success, a success toast appears, the dialog closes, and the list is refreshed. |
US-02 - Edit a product category
As inventory staff, I want to edit a product category, so that its naming and status stay appropriate.
| ID | Acceptance criteria |
|---|---|
| AC-02.1 | The Edit action is available from the list and from the detail dialog, only for users with the update permission. |
| AC-02.2 | Validation is the same as when adding (AC-01.2). |
| AC-02.3 | Deactivating a category does not change the products already using it (BR-03). |
US-03 - Product category list
As an owner, I want to see all product categories, so that catalog labeling stays under control.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | Columns: category name and status; default sort by name A–Z with pagination. |
| AC-03.2 | Sortable columns: category name. Search uses keywords. |
| AC-03.3 | Row actions: View, Edit, Delete according to permissions. |
US-04 - Delete a product category
As inventory staff, I want to delete a category created by mistake, so that the list stays clean.
| ID | Acceptance criteria |
|---|---|
| AC-04.1 | Single and bulk delete require confirmation and the delete permission. |
| AC-04.2 | If the deletion is rejected, the error message appears as a toast. |
| AC-04.3 | Deleting the last category of a product — Needs confirmation: whether it is rejected, since every product must have at least one category (BR-02). |
US-05 - Activity history
As an owner, I want to see the product category activity log, so that changes can be traced.
| ID | Acceptance criteria |
|---|---|
| AC-05.1 | The activity log is available for all categories (in the list) and per category (from the detail dialog) (BR-04). |
9. User Scenarios
| Role | Scenario |
|---|---|
| Inventory Staff | Prepares initial catalog labels such as Daily Needs and Cold Drinks before the first product is registered |
| Inventory Staff | Adds a Promo Products category ahead of a discount program, then applies it to a number of products |
| Owner | Deactivates a seasonal category after its program ends so it is not selected for new products |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View Product Category List | inventory:product-category:list:any | — |
| View Activity Logs | inventory:product-category:list:any | — |
| View Product Category Detail | inventory:product-category:view:any | — |
| Create Product Category | inventory:product-category:create:any | — |
| Edit Product Category | inventory:product-category:update:any | — |
| Delete Product Category | inventory:product-category:delete:any | — |
10.2 Action by Status
| Action | Active | Inactive |
|---|---|---|
| View Product Category Detail | ✓ | ✓ |
| Edit Product Category | ✓ | ✓ |
| Delete Product Category | ✓ | ✓ |
| Selected on New Products | ✓ | — |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- Products — a product selects one or more categories (BR-02).
Effects on other modules
- Categories appear as a column on the Products list and the Product Inventory list.
- Every change is recorded in the activity log (BR-04).