TruSim K Backtest
WO Actuals Preview
Re-pull Actuals onto the WO basis
moitem basis, whose cost column is always zero. Dry run shows old vs new per order and writes nothing.Sign in with your Canwil Google account.
moitem basis, whose cost column is always zero. Dry run shows old vs new per order and writes nothing.This page reads every closed Fishbowl manufacturing order since Jan 2024, looks at what fabric was actually consumed and what labor the operators actually clocked on their Fishbowl Time iPads, and turns that into numbers like "the archer backer costs us $0.97 in sewing labor per square foot to build." You then use those real numbers — plus a margin — to generate a quote price. It replaces our old hardcoded estimates (educated guesses from 2022) with actual data from 801 completed jobs.
Think of it as three things in one:
The Learning tab is the front door. It answers one question: "is the system actually getting better as customers submit configurations and we link the resulting MO/WOs?"
The tab is built around the multi-configurator platform. Today TruSim is the only configurator that links orders, but you'll see scaffolded "not connected yet" cards for Canvas, Industrial Laundry, and TruTruss — they'll activate automatically the moment those configurators start writing configurator_links with their own group prefixes.
Per-vertical card at the top:
Cumulative MAE chart: each dot is one order with actuals pulled, ordered chronologically. Yellow dots are over-estimates (we said it'd cost more than it did), blue dots are under-estimates. The blue line is the running mean of |variance %|. If the line slopes down as you go right, the system is learning. Flat means we're stuck; up means something is regressing — usually a new construction type that the engine hasn't seen yet.
Per-group breakdown: each "group" is a construction family — TruSim today uses keys like SCREEN_TRIPLE, SCREEN_GC340/60BK, DRAPE_V15, ARCHER_BACKER. Confidence colors mirror everywhere else: green = 10+ samples, yellow = 3–9, red = 1–2. Bias % is signed — positive means the engine over-estimates (you'd quote too high), negative means under-estimates (you'd quote too low and lose margin).
Recent feedback events: the last six orders that had actuals pulled. Each row shows the MO, customer, group, time the actuals came in, and the dollar variance. Useful for catching "why did this jump?" after a refresh.
Next milestones: progress bars showing which group is closest to crossing the next confidence threshold. "Pull actuals on 2 more drape v15 orders to reach yellow" is a directly actionable nudge.
Every number on this page traces back to Fishbowl. The chain:
mo, moitem, part, woitem, and wo tables directly. No writes. The connection physically cannot modify Fishbowl.canvas_config_parts collection). So 11.1 yd of GC340/60BK (60" wide) → 11.1 × 60/12 × 3 = 166.5 sqft.woitem.cost, which is the real per-operator dollar amount Fishbowl Time writes when someone clocks out on the iPad. If Maria sewed for 2 hours at $29/hr, that row says $58.00. Not a flat $25/hr average.production_intelligence/. Two collections you'll see referenced on this page:
mo_extracts/{mo_id} — one document per processed MO, holding the full extracted detail (audit trail).part_rates/{pn_safe} — one document per finished-good SKU, holding the aggregated/learned rates.We do not modify anything in Fishbowl. We do not modify MOs, WOs, parts, or customer records. This whole page is read-only against Fishbowl.
This is the main list of every finished-good SKU we've learned rates for.
Each row is one finished-good SKU (like CGC340BAK-IGD — the archer backer) and shows how we've been building that product historically.
| Column | What it means |
|---|---|
| Part # | Fishbowl's part number for the finished good. Always unique. |
| Description | The part description from Fishbowl, verbatim. |
| MOs | How many closed manufacturing orders we have for this SKU. More = more reliable rates. |
| Conf | Confidence badge: green for 10+ MO samples (trust these), yellow for 3–9 (useful but still learning), red for 1–2 (don't bet the farm on these yet). |
| Fabric $/sqft | Median material cost to make one square foot of this product. Based on all MOs combined. |
| Sew min/sqft | Median sewing time per square foot. Includes all trim sewing — see the Glossary. |
| Last built | Most recent completion date for a MO of this SKU. |
Click any row to open a detail modal with:
The median is the middle value — it's robust against outliers. The average gets yanked around by one weird MO. For example, if we have 9 MOs that sewed at 0.5–0.7 min/sqft and one that was posted wrong at 72 min/sqft, the average is now 7.8 min/sqft (useless) but the median is still 0.6 min/sqft (correct). The detail modal shows both so you can spot noise; the main table shows medians.
Type in dimensions → get a cost breakdown and suggested price.
Fill in the inputs (left side):
55) to force a 55% margin for this specific quote.The right side shows:
If you're about to quote a product we've built before: type its part number in "Similar SKU". The autocomplete only offers SKUs with ≥3 MO samples (yellow+ confidence). When you pick one, Quick Quote uses that specific SKU's learned rates — dramatically more accurate than the global blend.
Controls the markup added on top of build cost to produce a customer quote.
Margins work in a three-layer cascade. When quoting, we check for the most specific rule first and fall back if not found:
To edit a vertical default: type the new percentage into any row, hit Save Changes. Changes take effect immediately on the next quote.
Margin here means gross profit margin: the portion of the sale price that is profit. If margin is 70%, then 70% of the quote is profit and 30% is cost. The math: quote_price = build_cost ÷ (1 − 0.70) = build_cost × 3.33. So a $100 cost at 70% margin quotes at $333. Not $170.
Blended rates across ALL parts. Your fallback when no SKU-specific rates exist.
This tab shows two big tables:
Per-SqFt Rates — labor time and fabric cost per square foot, averaged across every build in the system. Each row:
Labor Hourly Rates — the actual dollars-per-hour operators are being paid, pulled from woitem.cost. The hardcoded $25/hr is wrong for pretty much every operation — this table shows the real numbers.
Global rates are a fallback for products we've never made, or rough back-of-envelope estimates. For real quoting, always prefer per-SKU rates (enter a Similar SKU on Quick Quote) — they're 3-5× more accurate because they're tuned to one specific product's construction.
An audit log of every time the learning engine processed MOs.
Each row is one extraction run. Every time you hit "Run Now" (or the nightly cron fires, once that's built), a new row appears.
| Column | What it means |
|---|---|
| Run ID | Unique identifier for that run. A dry badge means it was a dry-run (computed but didn't save). |
| Started | How long ago this run finished. |
| Duration | How long the run took (seconds or minutes). |
| Processed | How many new MOs got extracted in that batch. |
| Errors | How many MOs failed. Non-zero = something weird on those MOs; click into /api/production-intelligence/history?limit=20 for stack traces. |
| Parts Updated | How many finished-good SKU rate-documents got recomputed after that batch. |
| Params | What query params were used (limit, since_mo_id, etc.). |
What "Processed: 0" means: we're caught up — no new closed MOs since the last run.
Hit it to pull in the latest MOs without waiting for the nightly cron.
Clicking ▶ Run Now (next 100) does this, in order:
dateCompleted ≥ 2024-01-01 and id > last_processed.mo_extracts/{mo_id}.It takes about 20 seconds per 100 MOs. If "Processed: 0" comes back, you're up to date.
In the Firestore console, delete production_intelligence/meta.last_processed_mo_id, then hit Run Now in batches. The writes are idempotent (keyed by mo_id), so reprocessing doesn't corrupt anything — it just burns compute.
One real example from end to end so you can check the arithmetic.
Scenario: Quote an archer backer job — 166 sqft of GC340 fabric, 12 grommets, some webbing trim, standard construction. Target margin: 50%.
Rates the engine uses (from part_rates/CGC340BAK-IGD):
Sanity check: at $266.48 quoted minus $133.24 cost, Canwil makes $133.24 profit — which is exactly 50% of the sale price. That's what "50% gross margin" means.
canvas_config_parts for that part.woitem rows (labor entries from the iPad)? If no labor data, no rates. (c) click Run Now to pick up any recently-closed MOs.| MO | Manufacturing Order. A job in Fishbowl that produces one or more finished goods. |
| WO | Work Order. The labor side of an MO. Operators clock time against WOs from their iPads. |
| SO | Sales Order. The customer-facing quote/invoice. |
| Finished good | The thing we make (e.g. CGC340BAK-IGD = an archer backer). Each MO has ≥1. |
| SKU | Part number for a finished good. Used interchangeably with "Part #" on this page. |
| Fabric sqft | Yards consumed × (roll width inches / 12) × 3. The standard conversion. |
| Per-sqft rate | A cost or time value divided by the job's fabric sqft. Our main unit of comparison. |
| Heavy trim / Low trim | Products with trim_yards/sqft > 0.05 are "heavy-trim" (sew slower). Below that = "low-trim" (sew faster). Used to bucket the global blend. |
| Median | The middle value in a sorted list. Robust against outliers. Use this. |
| Stddev | Standard deviation. Measures spread. Low stddev = consistent rate across MOs; high stddev = rate varies a lot. |
| Outlier | A sample more than 2 standard deviations from the mean. Still counted but flagged. |
| Confidence | How many MOs support a SKU's rates. 10+ green, 3-9 yellow, 1-2 red. |
| Extract | The processed data for one MO, stored in Firestore. Source of truth for the learning engine. |
| Buffer (10%) | A markup on build cost to cover shop overhead (utilities, supervision, indirect labor) before margin is applied. |
| Gross margin | Sale price minus cost, divided by sale price. Expressed as %. 50% margin ≠ 50% markup. |
| Parts Master | Our Firestore canvas_config_parts collection. Holds customer-facing labels, categories, and roll widths. |
| LaborSewing | Includes all sewing — edges, attaching trim, velcro, patches, hems. Not just panel joins. |
| LaborSpreading | Time spent spreading fabric for cutting. Per sqft. |
| LaborPacking | Folding, bagging, labeling the finished product. |
| LaborGrommet | Installing grommets. Per-ea. |
| LaborCNC | CNC cutting time. Currently per-sqft proxy. |
| LaborSlitting | Slitting rolls to width. Mostly for laundry-prep operations. |
K is a correction multiplier learned from closed MOs: actual ÷ estimate, per fabric group, split into a materials K and a labor K. K 0.70 on labor means the configurator's labor estimate has run about 30% high.
The backtest replays every closed, clean TruSim MO and asks: if the estimate had been multiplied by K, would it have landed closer to actual? Walk-forward is the honest number — it only uses MOs that closed earlier, the way it will work live. Leave-one-out uses all other MOs and is slightly optimistic.
K is only applied when a group has at least 5 clean MOs, the residual error is 30% or less, and K is between 0.5 and 1.5. Otherwise the legacy estimate is used and the reason is shown. This is read-only and does not change any quote or customer price.
Spanish version of this help pending — this page's guide predates the bilingual rule.
In rough order of planned delivery: