Units of Measurement
Every raw materialRaw materialThe atomic component of a BOM or sub-assembly. Two flavors: a Shopify-linked variant (inventory tracked in Shopify) or a virtual material (DO-side inventory only). Both kinds appear in the same component picker and are consumed identically when a BOM fires — except virtual materials never trigger a Shopify call.
Read more →
has a unit — the label that appears next to its quantity in BOMs, work orders, picklists, and execution logs. Assemblified ships with 15 common units (pcs, kg, m, L, m2, …) and lets you define your own when those don’t fit.
The unit field is cosmetic for the math — the rollup, inventory, and execution code work the same regardless of label. But it’s the first thing operators see on a picklist, so picking the right one matters.
On this page
Section titled “On this page”- The built-in unit list
- Adding a custom unit
- System units vs custom units (what you can hide vs delete)
- Categories — what they’re for today and tomorrow
- Common gotchas
Built-in units
Section titled “Built-in units”Fifteen units are seeded automatically the first time you launch Assemblified:
| Category | Units |
|---|---|
| Count | pcs |
| Weight | kg, g, mg, lb, oz |
| Length | m, cm, ft, in, yd |
| Volume | L, mL, m3 |
| Area | m2 |
Each built-in unit ships with translations for all five app languages (English, German, Spanish, French, Hindi). The dropdown label adapts to the operator’s language preference automatically — pcs reads as “Pieces”, “Stück”, “Piezas”, “Pièces”, “टुकड़े”.
Adding a custom unit
Section titled “Adding a custom unit”When the built-in list doesn’t cover what you need — boxes of 12, rolls, bobbins, hours of labour, sheets, batches — define your own.
- Go to Settings → Units in the app sidebar.
- Click Add Unit.
- Fill in:
- Symbol (required, max 16 chars) — what shows in the dropdown and on rows. e.g.
box,roll,hours. - Name (required) — the human-readable label. e.g.
Box of 12,Roll,Operator hours. - Category (optional) — see Categories below.
- Symbol (required, max 16 chars) — what shows in the dropdown and on rows. e.g.
- Save. The new unit appears in the dropdown immediately, alongside the built-ins.
Custom units have no translations — they always render as the Name you entered, regardless of the operator’s language. If you need a multilingual custom unit, name it neutrally (e.g. just Box rather than Box of 12).
System units vs custom units
Section titled “System units vs custom units”The two row types behave differently when you try to delete or rename them:
| System unit (built-in) | Custom unit | |
|---|---|---|
| Hard-delete | Never. Hidden (isActive=0) only. | Yes, if no raw material references it. |
| Soft-delete (hide) | Yes. Removes from dropdown; keeps the row for historical references. | Yes, if any raw material still uses it. |
| Rename the symbol | Allowed if not in use. Blocked with a 409 if any raw material references the current symbol. | Same. |
| Rename the display name | Always allowed. | Same. |
In practice: if you delete a unit that’s still on raw materials somewhere, it gets hidden instead of removed — so historical execution logs and rows referencing it continue to render correctly. You can re-activate it later by editing the row and toggling Active back on.
Categories
Section titled “Categories”Each unit has a category: weight, length, volume, area, count, temperature, or custom. Custom units default to custom.
Today the category is purely a grouping field — it appears as a badge in the table and doesn’t affect any execution math. It’s there so a future feature can validate dimensional sanity for unit conversions (no kg → m).
The unit_conversions table is also in the schema today, but no UI surfaces it yet. It’s reserved for a future feature where you define 1 kg = 1000 g once and have the BOM math do the conversion automatically. Until then, conversions are manual: if a BOM consumes 0.5 kg of a material stocked in grams, model it as 500 g directly.
Where the symbol shows up
Section titled “Where the symbol shows up”After you pick a unit on a raw material, its symbol appears in:
- Raw material list / detail page — next to unit cost (“$10 / kg”).
- BOM composition — beside each component’s required quantity.
- Work order picklist — the operator-facing print/PDF.
- Material requirements panel on execution logs.
- Build runs — actual-consumed entries.
Changing the unit on a raw material re-renders all of these — but it does not convert any quantities. If you switch a row from kg to g without also multiplying its quantities by 1000, you’ll have a 1000× problem until you fix the numbers.
Common gotchas
Section titled “Common gotchas”- The symbol is the stable identifier. Internally, raw materials store the unit as a plain string (
"kg","box"). Keep symbols short, lowercase-ish, and stable. Reserve the Name field for the friendly description. - No automatic conversions yet. A BOM that uses a 0.5 kg quantity of a material with unit
gwill literally consume 0.5 g, not 500 g. Until conversions are wired up, keep BOM quantities in the same unit as the raw material. - Deleting a system unit just hides it. That’s intentional — historical execution logs reference unit symbols by string, and yanking
kgwould mangle every old log that mentions it. - Custom unit translations don’t exist. If your shop runs in multiple languages, a custom
Box of 12will read asBox of 12in the German UI as well. Only the 15 system units have built-in translations. - Existing data isn’t touched. When you upgrade to a version that has this feature, every raw material already using
kg/pcs/ etc. continues to work — those values match the seeded system units’ symbols exactly.
Where to next
Section titled “Where to next”- Virtual materials — units are most often picked when creating a virtual material.
- Track building cost — using a custom
hoursunit (orpcsas a stand-in) for labour modelling. - Raw materials overview — back to the section root.