Product Family

ops product glossary

A Product Family is a logical grouping of related products at a Site. Product families serve as the top level of the Product Hierarchy and can define default standard hours, target scrap rates, and unit costs that apply to all products in the family.

Database Table: ops_product_families

ColumnTypeDescription
idUUID (PK)Auto-generated
site_idUUID (FK)References Site (oee_sites.id)
family_codeVARCHAR(50)Short identifier, unique per site
family_nameVARCHAR(255)Display name
descriptionTEXTOptional description
standard_hoursNUMERICDefault standard hours for products in this family
default_quantityINTEGERDefault target quantity when posting a job
target_scrap_rateNUMERICExpected scrap rate for this product type
unit_costNUMERICCost per unit
sort_orderINTEGERDisplay ordering

Unique constraint: (site_id, family_code)

Standard Hours Fallback

When calculating efficiency, the system uses this priority:

  1. ops_products.standard_hours (product-level)
  2. ops_product_families.standard_hours (family-level fallback)
  3. 0 (if neither is set)

Relationships

  • Belongs to a Site (oee_sites)
  • Has many Products (ops_products.family_id)
  • Referenced by jobs (ops_jobs.product_family_id)
  • Has per-station specs via ops_station_product_standards

Changes in PR #2783

  • Delete behavior changed: Hard-delete replaced soft-delete (archive/restore pattern was removed)
  • archive_ops_product_family() and unarchive_ops_product_family() were replaced by delete_ops_product_family()
  • get_product_family_by_id endpoint was removed (no longer needed)

Codebase Paths

  • Table: database/sql_scripts/tables/ops_product_families.sql
  • Functions: database/sql_scripts/functions/ops/ops_product_family_functions.sql
  • Backend: backend/endpoints/ops.ts

Target OEE Per Station

Product Families define target OEE per station:

  • Each product family can have a different target efficiency at each Station
  • Targets are stored in Station Product Standards (ops_station_product_standards)
  • When a station allows concurrent jobs, the target OEE calculation adjusts for shared capacity
  • OEE is trackable per product family across all jobs for products in that family

See Efficiency Calculation for how target OEE interacts with efficiency calculations.

See Also