Skip to content
English
  • There are no suggestions because the search field is empty.

How Product Categories and Their Constraints Work

Source: product_categories_controller.rb:4-84

  • Category name must be unique within a company (case-insensitive check via ILIKE) with a maximum of 30 characters
  • A description is required for every category
  • MYOB-integrated companies cannot set sales_tax_rate or purchase_tax_rate on product categories -- the system blocks the save with an error; the MYOB check also applies on update but only triggers if the tax rates have actually changed
  • A category cannot be renamed if any product groups are assigned to it; however, the description can still be changed
  • A category cannot be deleted if it has product groups -- remove or reassign all groups first
  • Category list can include a "NONE" option (id = null, name = "NONE") when the include_none parameter is true
  • Categories support integration-specific tax type fields for Xero and QuickBooks Online (xero_sales_tax_type, xero_purchase_tax_type, qbo_sales_tax_type, qbo_purchase_tax_type)

Support scenarios

  • "Why can't I create a product category with this name?" → A category with the same name (case-insensitive) already exists
  • "Why can't I set tax rates on my product category when I use MYOB?" → MYOB does not support category-level tax rates; the system blocks this
  • "Why can't I rename this product category?" → The category has product groups assigned to it; change the description instead, or remove all groups first
  • "Why can't I delete this product category?" → It still has product groups linked to it