Skip to Content

Products

  • Code: INV-PRD
  • Module: Inventory
  • Type: Master Data

1. Overview

Products are the catalog of goods the tenant buys and sells: their identity (name, group, category, images) along with the list of packages used to buy and sell them. A product always has a base package as its smallest unit, and may have other packages as conversions of that base package — for example a carton containing 12 pcs. For each package, the cost, selling price, and opening quantity are set per store, and that is how each store’s Product Inventory is formed.

Expected outcome: every item is recorded once with clear packages and barcodes, so purchasing, receiving, and sales use the same product reference in every store.

2. Problem

Without a centralized product catalog, each store records goods with its own version of names and units, and the purchase unit often differs from the selling unit. As a result:

  • The same item is recorded many times under different names, so stock and purchases cannot be totaled.
  • Buying per carton and selling per pcs cannot be connected, so stock never matches.
  • Barcodes are not recorded in the system, so finding items during transactions is slow and prone to wrong picks.
  • Each store’s cost and selling price have no definite place, so margins cannot be monitored.

3. Goals & Non-goals

3.1 Goals

  • Every item has one master record used by all stores and all modules.
  • Purchase units and selling units are connected through package conversion, so stock stays consistent whatever the transaction unit.
  • Items can be found quickly by name or barcode during a transaction.
  • The cost, selling price, and opening stock of each package are set per store from the moment the product is created.
  • Products that are no longer sold can be locked from new transactions without deleting their history.

3.2 Non-goals

  • Product variants such as size and color; each variant is recorded as a separate product.
  • Assembled products or bundles made up of several other products.
  • Recording batch numbers, expiry dates, and serial numbers.
  • Stock adjustments from this feature; stock increases through Goods Receipt and is viewed in Product Inventory.
  • Tiered selling prices such as wholesale prices, promo prices, and per-customer prices.
  • Bulk product import from a file.

4. Business Rules

Business rules are the set of provisions and constraints that apply to Products 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 The product code (SKU) is set by the system when the product is saved and cannot be changed.
  • BR-02 Every product must have one product group and at least one product category.
  • BR-03 Every product must have at least one thumbnail. The first thumbnail becomes the main image used in product lists and search.
  • BR-04 Every product must have at least one package. The first package is the base package with a conversion quantity of 1, and that quantity cannot be changed.
  • BR-05 Packages other than the base package must have a conversion quantity of at least 2, stating how many base units they contain.
  • BR-06 Every package must have at least one barcode. Needs confirmation: whether barcodes must be unique across packages and across products.
  • BR-07 Every package has an opening quantity, cost, and selling price for each store. The opening quantity is at least 0, while the cost and selling price must be greater than 0.
  • BR-08 Saving a package along with its per-store values creates or updates that store’s Product Inventory row.
  • BR-09 Packages can only be added, edited, and deleted one at a time through the package list, and are saved instantly — separately from saving the product’s general data.
  • BR-10 Inactive products still appear in product search in transaction modules, but cannot be selected. Their existing transaction data can still be viewed.
  • BR-11 Every change to product data and its packages is recorded along with its actor and time.

5. Flow

5.1 Main Flowchart

  1. General Data — Staff set the product’s status, thumbnails, name, group, categories, and description.
  2. Packages — The product is given at least one package. The first package is the base package with quantity 1; subsequent packages are conversions with a quantity of at least 2. Each package is given a measurement unit, barcodes, and the opening quantity, cost, and selling price for every store.
  3. Review — All inputs are reviewed before saving.
  4. Validation — Inputs are checked before the product is saved. A product that violates the rules cannot be saved, and the errors are shown in the relevant step.
  5. Product Saved — The product code is issued and the product can immediately be used in transaction modules according to its status.
    • 5a. Edit General Data — Status, thumbnails, name, group, categories, and description can be updated together.
    • 5b. Add/Edit/Delete Package — The package list is managed per package and saved instantly (BR-09).
  6. Product Inventory — Each package’s per-store values form a Product Inventory row. The details are explained in the Product Inventory PRD.

5.2 Status Lifecycle

StatusDescriptionNext
Active
is_active: true
The product can be selected on new transactionsInactive, or deleted
Inactive
is_active: false
The product appears but cannot be selected on new transactionsActive, or deleted

6. Document Structure

This section defines the content of the Product data itself: which fields it has, their type, which are required, their initial values, and their value rules. The provisions here apply wherever the product is created or changed and are enforced on save, regardless of how the field is displayed.

6.1 General

FieldTypeRequiredDefaultRules
CodeText—Generated on saveSet by the system, cannot be changed (BR-01)
StatusEnumYesNot selectedActive or Inactive
ThumbnailsFile, multipleYes—Images; upload order determines the main image (BR-03)
Product NameTextYes——
GroupRef. Product GroupYes—Exactly one group (BR-02)
CategoriesRef. Product Category, multipleYes—At least one category (BR-02)
DescriptionTextNo——

6.2 Package

FieldTypeRequiredDefaultRules
Conversion QuantityIntegerYes1 for the base package, 2 for subsequent packagesThe base package is locked at 1; other packages at least 2 (BR-04, BR-05)
Measurement UnitRef. Measurement UnitYes—Selected from the Measurement Unit master
BarcodesText, multipleYes—At least one barcode per package (BR-06)

6.3 Package Inventory

The following values are filled in for every store on each package, and become the initial content of that store’s Product Inventory (BR-08).

FieldTypeRequiredDefaultRules
StoreRef. Store—All of the tenant’s storesSet by the system; one row per store
Opening QuantityDecimalYes0At least 0 (BR-07)
CostCurrencyYes0Greater than 0 (BR-07)
Selling PriceCurrencyYes0Greater than 0 (BR-07)

7. UI Structure

This section defines how Products are displayed and operated: the list columns, filters, and form controls along with their option sources. Activity Logs are available as a drawer from the list page (all products) and from the detail page (per product). This section only governs display and interaction; content and value rules still follow Document Structure.

7.1 Datatable

ColumnSortableSample ValueComponent
Select——Checkbox, Expand Toggle
No—1Number
CodeYesSKU-0012Link
Product NameYesCooking Oil 2LThumbnail, Text
Group—GroceriesText
Categories—Oil & SeasoningsText, Accordion if more than one
Status—ActiveBadge
Actions—View · Edit · DeleteAction Menu

Expanded Row

The product’s packages along with their per-store values.

ColumnSample ValueComponent
PackagePackage 1Text
Conversion Quantity12Number
Measurement UnitCarton (CTN)Text
Barcodes8991002123456Text
Store[CBI] Cianjur StoreText
Stock24Number
CostRp 250,000Currency
Selling PriceRp 275,000Currency
ProfitRp 25,000 (10.0%)Text

7.2 Advance Filter

FieldControlOptions SourceDefault
StatusSingle SelectActive, InactiveEmpty

7.3 Form & Details

Create — A three-step wizard: General, Packages, then Review. The Next button validates the current step before moving on, and the Review step shows a summary of all inputs. Actions: Previous, Next, Save.

Edit — Two tabs, General and Packages. The General tab is saved as a whole; packages in the Packages tab are added, edited, and deleted one at a time through a dialog and saved immediately (BR-09).

Detail — Two read-only tabs, General and Packages. Actions: Edit Data and Activity Logs.

General

FieldControlOptions SourceBehavior
StatusSingle SelectActive or InactiveThe currently selected option can be deselected, leaving the status empty
ThumbnailsFile Uploader, multiple—Only accepts image files; upload order determines the main image
Product NameText Input——
GroupSingle SelectProduct Group master, searchable—
CategoriesMulti SelectProduct Category master, searchable—
DescriptionTextarea——

Packages — List

ColumnSample ValueComponent
PackagePackage 1Text
Conversion Quantity12Number
Measurement UnitCarton (CTN)Text
Barcodes8991002123456Text
ActionsEdit · DeleteAction Menu

Packages — Form

FieldControlOptions SourceBehavior
Conversion QuantityNumber Input—Disabled with value 1 on the base package; at least 2 on other packages
Measurement UnitSingle SelectMeasurement Unit master, searchable, shown as the name with its symbol—
BarcodesText Input in an add dialog, shown as a list—Barcodes are added one at a time and can be removed per barcode

Packages — Price per Store

One row per store, shown inside the package form.

FieldControlOptions SourceBehavior
StoreRead-onlyAll of the tenant’s stores—
Opening QuantityNumber Input——
CostCurrency Input—Changed → Profit is recalculated
Selling PriceCurrency Input—Changed → Profit is recalculated
ProfitRead-only—Selling Price minus Cost, shown with its percentage of the cost

8. User Stories

US-01 - Create a product

As inventory staff, I want to register a product along with its packages and per-store prices, so that the product can be used in transactions right away.

IDAcceptance criteria
AC-01.1When a user with the create permission opens Add New, the General → Packages → Review wizard appears with all fields empty.
AC-01.2Status, thumbnails, product name, group, and categories are required; description is optional (BR-02, BR-03).
AC-01.3When Next is clicked and the required fields in that step are not valid yet, the user cannot move to the next step and errors appear on the related fields.
AC-01.4The Packages step refuses to continue if there is no package yet (BR-04).
AC-01.5The first package opens with quantity 1 and the quantity field disabled; subsequent packages open with quantity 2 and a minimum of 2 (BR-04, BR-05).
AC-01.6The package form shows all of the tenant’s stores, each with opening quantity, cost, and selling price, along with an automatically calculated profit (BR-07).
AC-01.7A package without a barcode cannot be saved (BR-06).
AC-01.8When Save succeeds, the product code is issued, a success toast appears, and the user is redirected to the product list (BR-01).
AC-01.9When saving is rejected, error messages appear in the Review step and on the related fields.
AC-01.10When the user leaves the wizard with unsaved input, an unsaved changes confirmation appears.
AC-01.11The tenant has no stores at all — the per-store price table shows no rows. Needs confirmation: whether a product may be saved without per-store price values.

US-02 - Manage product packages

As inventory staff, I want to add, edit, and delete product packages, so that purchase and selling units always match reality.

IDAcceptance criteria
AC-02.1The Packages tab shows each package along with its conversion quantity, measurement unit, barcodes, and per-store values.
AC-02.2Add, edit, and delete package are available in edit mode according to permissions, and every action is saved immediately (BR-09).
AC-02.3When the base package is edited, the quantity field stays disabled at 1 (BR-04).
AC-02.4The save button in the package dialog is disabled until there is a change.
AC-02.5Deleting the base package — not prevented on screen. Needs confirmation: the deletion must be rejected while the product still has conversion packages, so that BR-04 holds.
AC-02.6Changing a package’s cost or selling price updates the related store’s Product Inventory (BR-08).

US-03 - Edit product data

As inventory staff, I want to change a product’s general data, so that the catalog stays accurate.

IDAcceptance criteria
AC-03.1The Edit Data button only appears for users with the update permission.
AC-03.2Validation of the General tab is the same as the General step on creation (AC-01.2).
AC-03.3The open tab is kept in the URL when switching between detail and edit.
AC-03.4Editing general data does not change the package list (BR-09).

As an owner, I want to view and filter products, so that I can quickly find a specific item along with its prices.

IDAcceptance criteria
AC-04.1Columns: code, product name with the main image, group, categories, and status.
AC-04.2Keyword search, status filter, pagination, and default sort by name A–Z. Sortable columns: code and product name.
AC-04.3More than one category is shown as the number of categories, which can be expanded to see the list.
AC-04.4Rows can be expanded to see packages along with each store’s stock and prices without opening the detail.
AC-04.5Row actions: View, Edit, Delete according to permissions.

US-05 - Delete a product

As inventory staff, I want to delete a product created by mistake, so that the catalog stays clean.

IDAcceptance criteria
AC-05.1Single and bulk delete require confirmation and the delete permission.
AC-05.2If the deletion is rejected, the error message appears as a toast.
AC-05.3Deleting a product already used in transactions — Needs confirmation: whether it is rejected, or the product should simply be deactivated (BR-10).

US-06 - Activity history

As an owner, I want to see the product activity log, so that data and price changes can be traced.

IDAcceptance criteria
AC-06.1The activity log is available for all products (in the list) and per product (in the detail) (BR-11).

9. User Scenarios

RoleScenario
Inventory StaffRegisters a new product from a supplier: fills in the general data, adds a pcs package as the base package and a carton of 12 as a conversion, then sets each store’s cost and selling price
Inventory StaffThe supplier changes the carton contents from 12 to 24; edits that product’s conversion package and then checks the result in Product Inventory
Purchasing StaffSearches for a product by barcode while preparing a Purchase Order, and picks the carton package as the order unit
OwnerDeactivates a product that is no longer sold so it does not appear on new transactions, without deleting its purchase history

10. Permissions & Actions

10.1 Permission by Action

ActionPermissionCondition
View Product Listinventory:product:list:any—
View Activity Logsinventory:product:list:any—
View Product Detailinventory:product:view:any—
Create Productinventory:product:create:any—
Edit Product
(General Data)
inventory:product:update:any—
Delete Productinventory:product:delete:any—
Add Packageinventory:product:create:anyFrom the edit product page
Edit Packageinventory:product:update:anyFrom the edit product page
Delete Packageinventory:product:delete:anyFrom the edit product page

10.2 Action by Status

ActionActiveInactive
View Product Detail✓✓
Edit Product
(General Data)
✓✓
Manage Packages✓✓
Delete Product✓✓
Selected on New Transactions✓—

11. Notifications

This feature does not trigger any notifications.

12. Dependencies

Related PRDs

Master data

Effects on other modules

  • Saving a package creates or updates a Product Inventory row in each store (BR-08).
  • Products along with their packages become options in Purchase Order, Goods Receipt, and Bill.
  • Every change is recorded in the activity log (BR-11).
Last updated on