Skip to Content

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

  1. Fill In Group Data — Staff set the group’s status, code, and name through the add dialog.
  2. 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.
  3. 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.
  4. Used on Products — A product selects one group as its main grouping. The details are explained in the Products PRD.

5.2 Status Lifecycle

StatusDescriptionNext
Active
is_active: true
The group is used to group productsInactive, or deleted
Inactive
is_active: false
The group is no longer used for new productsActive, 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

FieldTypeRequiredDefaultRules
StatusEnumYesNot selectedActive or Inactive
CodeTextYes—(BR-01)
Group NameTextYes—(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

ColumnSortableSample ValueComponent
Select——Checkbox
No—1Number
CodeYesGRCText
Group NameYesGroceriesText
Status—ActiveBadge
Actions—View · Edit · DeleteAction 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

FieldControlOptions SourceBehavior
StatusSingle SelectActive or InactiveThe currently selected option can be deselected, leaving the status empty
CodeText Input——
Group NameText 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.

IDAcceptance criteria
AC-01.1The Add New button only appears for users with the create permission, and opens a dialog with empty inputs.
AC-01.2Status, code, and group name are required; errors appear on fields that are not valid yet (BR-01).
AC-01.3The save button is disabled until an input has changed.
AC-01.4On success, a success toast appears, the dialog closes, and the list is refreshed.
AC-01.5Duplicate 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.

IDAcceptance criteria
AC-02.1The Edit action is available from the list and from the detail dialog, only for users with the update permission.
AC-02.2Validation is the same as when adding (AC-01.2).
AC-02.3Deactivating 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.

IDAcceptance criteria
AC-03.1Columns: code, group name, and status; default sort by name A–Z with pagination.
AC-03.2Sortable columns: code and group name. Search uses keywords.
AC-03.3Row 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.

IDAcceptance criteria
AC-04.1Single and bulk delete require confirmation and the delete permission.
AC-04.2If the deletion is rejected, the error message appears as a toast.
AC-04.3Deleting 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.

IDAcceptance criteria
AC-05.1The activity log is available for all groups (in the list) and per group (from the detail dialog) (BR-04).

9. User Scenarios

RoleScenario
Inventory StaffPrepares the tenant’s initial catalog by creating the Groceries, Beverages, and Supplies groups before the first product is registered
Inventory StaffAdds a new group when the tenant starts selling a product line it has never had before
OwnerDeactivates a group that is no longer used so it is not selected for new products

10. Permissions & Actions

10.1 Permission by Action

ActionPermissionCondition
View Product Group Listinventory:product-group:list:any—
View Activity Logsinventory:product-group:list:any—
View Product Group Detailinventory:product-group:view:any—
Create Product Groupinventory:product-group:create:any—
Edit Product Groupinventory:product-group:update:any—
Delete Product Groupinventory:product-group:delete:any—

10.2 Action by Status

ActionActiveInactive
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).
Last updated on