Product Groups
- Code: INV-PGR
- Module: Inventory
- Type: Master Data
1. Overview
Product Groups are the main grouping of the goods catalog by type of merchandise — for example Groceries, Beverages, or Household Supplies. Every product must have exactly one group, so the group is the coarsest divider used to read the catalog, filter lists, and summarize sales and purchasing data.
Expected outcome: all products are neatly divided into agreed groups, and newly added products always fall into an existing group, not a new term made up by individual staff.
2. Problem
Without a centrally managed list of groups, product grouping relies on each staff member’s habits when filling in the catalog. As a result:
- The same group is written with different terms, so similar products do not gather in one place.
- The product list is hard to filter because there is no consistent divider.
- Per-group summaries cannot be trusted, so procurement decisions are based on guesswork.
3. Goals & Non-goals
3.1 Goals
- Product grouping uses single terms shared by all staff and all stores.
- New groups can be added by the tenant themselves without waiting for system changes.
- Groups that are no longer used can be deactivated without changing the products already using them.
3.2 Non-goals
- Nested group hierarchies; more detailed grouping is done through Product Categories.
- Margin, tax, or pricing policy settings per group.
- Merging two groups into one along with moving their products.
4. Business Rules
Business rules are the set of provisions and constraints that apply to Product Groups 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 group must have a code and a group name. Needs confirmation: whether the code must be unique and what its maximum length is.
- BR-02 Every product has exactly one product group.
- BR-03 Inactive groups are not used for new products. Needs confirmation: currently the group options on the product form do not yet filter by active status.
- BR-04 Every change to product group data is recorded along with its actor and time.
5. Flow
5.1 Main Flowchart
- Fill In Group Data — Staff set the group’s status, code, and name through the add dialog.
- Validation — Inputs are checked before the group is saved. A group that violates the rules cannot be saved, and the errors are shown on the relevant fields.
- Group Saved — The group is immediately available as an option when a product is created or edited.
- 3a. Edit Group Data — The group’s status, code, and name can be updated at any time through the edit dialog.
- Used on Products — A product selects one group as its main grouping. The details are explained in the Products PRD.
5.2 Status Lifecycle
| Status | Description | Next |
|---|---|---|
Activeis_active: true | The group is used to group products | Inactive, or deleted |
Inactiveis_active: false | The group is no longer used for new products | Active, or deleted |
6. Document Structure
This section defines the content of the Product Group data itself: which fields it has, their type, which are required, their initial values, and their value rules. The provisions here apply wherever the group 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 |
| Code | Text | Yes | — | (BR-01) |
| Group Name | Text | Yes | — | (BR-01) |
7. UI Structure
This section defines how Product Groups 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 groups) and from the detail dialog (per group). 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 |
| Code | Yes | GRC | Text |
| Group Name | Yes | Groceries | Text |
| Status | — | Active | Badge |
| Actions | — | View · Edit · Delete | Action Menu |
7.2 Form & Details
Create — A dialog containing status, code, and group name. Action: Save, which is only enabled after an input changes.
Edit — The same dialog with its inputs filled with the selected group’s data. Action: Update.
Detail — A read-only dialog containing status, code, and group name, with an action menu containing Activity Logs and Edit.
Group Data
| Field | Control | Options Source | Behavior |
|---|---|---|---|
| Status | Single Select | Active or Inactive | The currently selected option can be deselected, leaving the status empty |
| Code | Text Input | — | — |
| Group Name | Text Input | — | — |
8. User Stories
US-01 - Add a product group
As inventory staff, I want to add a product group, so that new products can be grouped using agreed terms.
| 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, code, and group 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. |
| AC-01.5 | Duplicate group code — rejected on save; the error message appears on the code field (BR-01). |
US-02 - Edit a product group
As inventory staff, I want to edit a product group, 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 group does not change the products already using it (BR-03). |
US-03 - Product group list
As an owner, I want to see all product groups, so that I can make sure the catalog grouping stays tidy.
| ID | Acceptance criteria |
|---|---|
| AC-03.1 | Columns: code, group name, and status; default sort by name A–Z with pagination. |
| AC-03.2 | Sortable columns: code and group name. Search uses keywords. |
| AC-03.3 | Row actions: View, Edit, Delete according to permissions. |
US-04 - Delete a product group
As inventory staff, I want to delete a group 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 a group still used by products — Needs confirmation: whether it is rejected, since every product must have one group (BR-02). |
US-05 - Activity history
As an owner, I want to see the product group activity log, so that changes can be traced.
| ID | Acceptance criteria |
|---|---|
| AC-05.1 | The activity log is available for all groups (in the list) and per group (from the detail dialog) (BR-04). |
9. User Scenarios
| Role | Scenario |
|---|---|
| Inventory Staff | Prepares the tenant’s initial catalog by creating the Groceries, Beverages, and Supplies groups before the first product is registered |
| Inventory Staff | Adds a new group when the tenant starts selling a product line it has never had before |
| Owner | Deactivates a group that is no longer used so it is not selected for new products |
10. Permissions & Actions
10.1 Permission by Action
| Action | Permission | Condition |
|---|---|---|
| View Product Group List | inventory:product-group:list:any | — |
| View Activity Logs | inventory:product-group:list:any | — |
| View Product Group Detail | inventory:product-group:view:any | — |
| Create Product Group | inventory:product-group:create:any | — |
| Edit Product Group | inventory:product-group:update:any | — |
| Delete Product Group | inventory:product-group:delete:any | — |
10.2 Action by Status
| Action | Active | Inactive |
|---|---|---|
| View Product Group Detail | ✓ | ✓ |
| Edit Product Group | ✓ | ✓ |
| Delete Product Group | ✓ | ✓ |
| Selected on New Products | ✓ | — |
11. Notifications
This feature does not trigger any notifications.
12. Dependencies
Related PRDs
- Products — a product selects exactly one group (BR-02).
Effects on other modules
- The group appears as a column and filter on the Products list and the Product Inventory list.
- Every change is recorded in the activity log (BR-04).