1. Define packaging per sold unit
Store grams per material on the product or variation. If a variation has different packaging from its parent product, calculate from the variation-level data that actually applies.
2. Multiply by order quantity
For each order line, multiply the packaging grams per sold unit by the quantity. This produces product-packaging totals per material.
3. Add a shipping profile
A shipping profile represents the packaging used to dispatch the complete order, such as a small box, medium box or mailer. The profile can contain several materials.
4. Freeze the result historically
The calculated result should not depend on future edits to product or shipping data. An order snapshot captures the relevant context so the calculation remains reproducible.
5. Handle refunds and corrections without rewriting history
If packaging records need adjustment, preserving prior entries and adding explicit reversals or corrections gives a clearer audit trail than overwriting the original data.