Products
Maintain the shared catalog, categories, units, and pricing helpers. This guide follows version 3.1.7 (03acdf712c).
For storefront and POS usage, see Sales and POS Client.
Module layout
backend/core-api/src/modules/products/:
graphql/schemas/{product,category,uom,package,rule,similarity,config,index}.tswith matching resolvers.db/definitions/{products,categories,uoms,packages,rules,similarities,configs}.tsanddb/models/{Products,Categories,Uoms,Packages,Rules,Similarities,Configs}.ts.trpc/{product,category,uom,similarity,config,index}.ts.
A product carries code (unique), categoryId, type, status, unitPrice, barcodes, tagIds, variants, and customFieldsData. UoM entries describe units and sub-units; Packages, Rules, and Similarities support bundling and pricing; Configs stores global product settings.
Working with products
- Create categories before bulk-importing products so imports can resolve
categoryId. - Use UoM consistently: price and stock calculations depend on the selected unit.
- Prefer the product
codeas the stable external key for POS and ERP sync rather than the display name.
Verify
- Create a category, a UoM, and a product with a unique code.
- Fetch it through GraphQL and through a POS or sales flow.
- Update the price and confirm the change propagates to new orders without altering historical records.
Source references
Was this helpful?