# Weight

An optional physical weight on each material — mirrored from Shopify for linked materials, editable for virtual — that rolls up into a calculated weight on finished goods and assembly BOMs.

import Term from '~/components/Term.astro';
import { Aside } from '@astrojs/starlight/components';
import DocUpdated from '~/components/DocUpdated.astro';

In Assemblified, every <Term def="raw-material">material</Term> can carry an optional **physical weight** — a value plus a weight unit (`2.5 kg`, `300 g`, `8 oz`). It's separate from the [unit of measure](/features/raw-materials/units/): the unit is how the material is *counted* in a BOM (`m`, `pcs`, `L`); the weight is how much one of those units physically *weighs*.

From the per-material weights, Assemblified derives a **calculated weight** for every finished good's <Term def="bom">bill of materials</Term> and every assembly BOM (defines a <Term def="sub-assembly">subassembly</Term>) — the summed, unit-converted weight of everything the BOM consumes. Planning, inventory, cost and execution are unaffected; weight is purely informational.

## On this page

- The weight field — value, unit, and "blank vs zero"
- Editable (virtual) vs mirrored from Shopify (linked)
- Calculated weight on finished goods and assembly BOMs
- Where weight shows up
- Import / export
- Common gotchas

## The weight field

A material's weight is two pieces:

- **Weight value** — a number ≥ 0. Blank means **unknown** (not zero). An explicit `0` is a valid weight and stays distinct from blank.
- **Weight unit** — must be an active unit in the **Weight** category (`kg`, `g`, `mg`, `lb`, `oz`, or one you add). It is chosen from its own dropdown, independent of the material's consumption unit.

The two travel together: a value with no unit is rejected, and a unit with no value is dropped. Validation uses these exact messages:

- `Weight must be a number greater than or equal to 0.`
- `Weight unit is required when weight is set.`

## Editable vs mirrored

Where a material's weight comes from depends on its type — the same split as unit cost.

| Material type | Weight source | In the Edit material dialog |
|---|---|---|
| **Virtual** | Assemblified-managed — you type it in. | **Editable.** |
| **Shopify-linked** | Mirrored from the Shopify variant. | **Read-only.** |

For a **Shopify-linked** material, weight is pulled from the variant's Shopify weight (`Measurement → Weight`) and kept current automatically — you don't (and can't) edit it in Assemblified:

| When | What happens |
|---|---|
| **You add the variant** (Add from Shopify) | Weight is copied from Shopify alongside the name, SKU, price and cost. |
| **You click _Refresh from Shopify_** | Weight is re-pulled from Shopify with the other mirrored fields. It is on the material page's Attributes card, in its title bar, in the row menu and in the bulk bar. |
| **The variant's cost, weight or inventory tracking changes in Shopify** | Assemblified is told, and refreshes the mirrored weight (along with the cost and the SKU). |

<Aside type="note">
Weight is **read-only toward Shopify** — Assemblified never writes a weight back to the variant. The mirror is one-directional. Each sync also **preserves the existing value when Shopify has none**: if the variant has no usable weight (or its unit doesn't map to an active weight unit), Assemblified leaves the current value untouched rather than clearing it.
</Aside>

## Calculated weight

For a finished good or an assembly BOM, Assemblified computes a **calculated weight** on read — it is never stored. The math is one recursive pass:

> **finished weight** = Σ ( component quantity × component weight ), converted to the canonical weight unit.

- **Canonical unit.** The first active unit in the **Weight** category (normally `kg`). Every component's weight is converted into it before summing, so a BOM mixing `g` and `lb` components still produces one clean total.
- **Waste is excluded.** Unlike the cost roll-up, the weight roll-up ignores each component's waste percentage — scrap isn't part of the shipped product's weight. (This is a deliberate divergence from cost, which *includes* waste.)

If the total can't be computed, the roll-up reports **unavailable** with a specific reason instead of a number:

| Message | Cause |
|---|---|
| `Calculated weight unavailable: no active weight units.` | No unit in the Weight category is active, so there is no canonical unit to convert into. |
| `Calculated weight unavailable: circular sub-assembly reference.` | An assembly BOM references itself, directly or through a cycle. |
| `Calculated weight unavailable: missing weight unit conversion.` | Two component weight units have no conversion between them. Define one under [unit conversions](/features/raw-materials/unit-conversions/). |
| `Calculated weight unavailable: one or more components have no weight.` | At least one component's weight is blank/unknown. |

The reasons are checked in that order — the first one that applies is the one you'll see.

## Where weight shows up

- **The material page** — the Attributes card on the Overview tab shows the material's own weight, read-only (`2.5 kg`, or `-` when unknown; `0 kg` stays distinct from blank).
- **The Edit material dialog** — a Weight + Weight unit pair. Editable for virtual materials, read-only for Shopify-linked.
- **The materials list** — as an optional **Weight** column.
- **Material export** (CSV / XLSX) — `Weight` and `Weight Unit` columns.
- **Finished-good and assembly BOM exports** — the **calculated** weight as `Weight` + `Weight Unit` columns (or the exact unavailable message in the Weight column when it can't be computed).

<Aside type="caution">
Calculated weight is currently surfaced in **exports**, not on the finished-good or assembly BOM page itself. To see a BOM's rolled-up weight today, export it.
</Aside>

## Import / export

The [material CSV/XLSX template](/features/raw-materials/import/) carries two optional columns:

- **`Weight`** — a non-negative number, or blank if unknown. Requires a Weight Unit.
- **`Weight Unit`** — a weight-unit short name. It must resolve to an **active weight unit** (`kg`, `g`, `lb`, `oz`, …).

<Aside type="caution">
Unlike consumption units — which the importer can **create on the fly** from your file — weight units are **never auto-created**. A `Weight Unit` the importer doesn't recognise as an active weight unit fails the row. Add the weight unit under **Settings → Units** first, then re-import.
</Aside>

Blank weight is kept as unknown (never coerced to `0`); an explicit `0` round-trips back as `0`. Exporting materials and re-importing the file preserves weights unchanged.

Finished-good and assembly BOM exports include the **derived** weight columns, but their imports never set a weight — calculated weight is computed from the components, never written directly.

## Common gotchas

- **Weight unit is not the consumption unit.** A material counted in `m` can weigh `0.3 kg` per metre. They are independent fields with independent dropdowns, and only units in the **Weight** category can be picked as a weight unit.
- **Blank is not zero.** A blank weight means "unknown," and any roll-up that includes the material reports *one or more components have no weight*. If a component genuinely weighs nothing, enter `0` explicitly.
- **Shopify weight is read-only here.** To change a Shopify-linked material's weight, edit it on the Shopify variant — Assemblified mirrors it back on the next sync. It won't accept an edit from the Assemblified side.
- **Mixed weight units need a conversion.** If components weigh in different units (`g` and `lb`), the roll-up needs a conversion between them and the canonical unit. Missing one yields *missing weight unit conversion*. The five seeded weight units (`kg`/`g`/`mg`/`lb`/`oz`) all convert to `kg` out of the box.

## Where to next

- [Units of Measurement](/features/raw-materials/units/) — the consumption unit and why the weight category is load-bearing.
- [Unit conversions](/features/raw-materials/unit-conversions/) — the factors the weight roll-up uses to combine mixed weight units.
- [Shopify-linked materials](/features/raw-materials/shopify-linked/) — what else is mirrored from the Shopify variant.
- [Virtual materials](/features/raw-materials/virtual-materials/) — where weight is yours to edit.

<DocUpdated date="2026-11-19" />