# Enterprise retail simulation — H&M · IKEA · Best Buy

This document is the product/engineering simulation used to harden ZES-QRE for
**in-store-primary** omnichannel retail. It lists what a global brand would
expect, what we ship today, remaining gaps, and go-to-market pitches.

Ground-up company walkthrough: [`COMPANY-SIMULATION.md`](./COMPANY-SIMULATION.md) · AI bots: [`AI-NAV.md`](./AI-NAV.md) · [`/llms.txt`](../llms.txt)

---

## Simulation method

For each brand we walked:

1. **Store open** — POS ready in &lt;3s after login, scan → price → tender
2. **Stock truth** — same article # across shelf QR, POS, web, DC transfer
3. **Remote ops** — HQ / other stores reach private data without exposing IP
4. **Returns desk** — restockable vs scrap RMA
5. **Loyalty** — earn on paid POS sales, visible on customer record
6. **Website** — Product Studio page publishable to real WordPress site
7. **Latency** — private storage RTT, cache, product resolve in one hop
8. **Promos** — timeboxed percent/fixed codes on POS + web
9. **Planogram** — bay/fixture/SKU placement per store location
10. **EDI / SAP** — partner file/webhook → purchase order
11. **BOPIS** — allocate store → soft reserve → ready → complete pickup

---

## Capability matrix (today)

| Capability | H&M need | IKEA need | Best Buy need | ZES-QRE now |
|---|---|---|---|---|
| Multi-tenant SaaS workspace | Yes | Yes | Yes | Yes |
| In-store POS + shifts + Z | Yes | Yes | Yes | Yes |
| QR shelf → product page | Strong | Strong | Strong | Yes (Product Studio) |
| Private on-prem data + remote staff | Prefer | Prefer | Prefer | Yes + **auto Cloudflare Tunnel** |
| Multi-store locations | Chain | Chain | Chain | **Chain Ops locations** |
| DC → store transfers | Yes | Critical | Yes | **Stock transfers** |
| Returns / RMA | Yes | Yes | Critical | **Returns desk** |
| Loyalty points | Yes | Soft | Yes | **Loyalty earn + customer fields** |
| Purchase orders / incoming | Yes | Yes | Yes | Yes |
| Carrier shipping labels | Soft | Soft | Strong | Yes (DHL/DSV/UPS…) |
| WordPress / website publish | Soft | Soft | Soft | Yes (REST + export) |
| EDI / GLN / SAP sync | Critical at scale | Critical | Critical | **Yes** (CSV / EDIFACT-lite / IDoc-lite + webhook ack → PO) |
| Planogram / space mgmt | Strong | Strong | Soft | **Yes** (fixtures/bays/slots; ops-grade, not 3D CAD) |
| Promo / markdown engine | Strong | Strong | Strong | **Yes** (percent/fixed, windows, channels) |
| BOPIS / ship-from-store allocator | Strong | Strong | Critical | **Yes** (score stores, soft reserve, `READY_FOR_PICKUP`) |
| Multi-currency / tax jurisdictions | Strong | Strong | Strong | **Partial** (default VAT rate) |
| Franchise / region RBAC | Strong | Soft | Soft | **Partial** (Admin/Chef/Staff) |

---

## Flaws found in simulation → fixes shipped

### F1 — Remote access required a manual tunnel
**Fix:** `ZES-QRE.exe` auto-downloads `cloudflared`, starts quick tunnel, publishes URL to Admin.

### F2 — Private mode broke `orderBy` and multi-write batches
**Fix:** Private adapter `orderBy` + private `batch()` / emulated `runTransaction`.

### F3 — Product scan did 3 sequential lookups
**Fix:** `/api/resolve/product?q=` + POS catalog prefetch.

### F4 — GET cache too short
**Fix:** Stable TTL up to 12s; invalidate changed paths only.

### F5 — No multi-site stock / RMA / loyalty
**Fix:** Chain Ops + loyalty ledger on POS earn.

### F6 — Fortune-50 commerce gaps (EDI, promo, planogram, BOPIS)
**Fix:** Modules `edi-connector`, `promos`, `planogram`, `bopis` + product-page pickup path + `/api/edi/webhook` + AI discovery (`llms.txt`, `AI-NAV.md`, `COMPANY-SIMULATION.md`).

---

## Remaining gaps (honest — global estate phase-2)

1. **Deep SAP fashion/retail packs** — partner-certified message libraries beyond IDoc-lite / EDIFACT-lite mappings  
2. **3D planogram / space-planning CAD** — we ship operational bay placement, not visual planning suites  
3. **Workforce enterprise** — multi-country labor law packs  
4. **WORM compliance archive** for regulated markets  
5. **Named Cloudflare Tunnel UX** — token field exists; Zero Trust dashboard still external  
6. **Multi-currency / tax jurisdiction packs** — still partial  

**Cleared for mid-market / bodega pilots (see 730-day sim):** lot FIFO, attended auto-waste sweep, BOPIS hold TTL. Roadmap: [`FUTURE-OPTIMIZATION.md`](./FUTURE-OPTIMIZATION.md).

None of the phase-2 items block a **regional multi-store pilot**. They matter for a full Fortune-50 global cutover without an integration program.

---

## Pitches

### H&M — why switch (or pilot)
H&M wins on **speed of store storytelling + QR**. Product Studio + Promos + Planogram give every article a page, a shelf bay, and a timeboxed markdown without a separate CMS/promo stack. Private storage + tunnel keeps EU data local. EDI Connector lands vendor ORDERS into Purchase Orders while SAP remains the financial spine.  
**Why it would not be better (yet):** deep SAP fashion message packs and 3D space planning.  
**When it is better:** regional pilots where store teams outpace central IT.

### IKEA — why switch (or pilot)
IKEA care about **article truth** and **location stock**. Article-first model (QR, Storage, planogram slots, transfers, BOPIS, pick) matches SKU discipline. Returns desk maps bulky reverse logistics better than pure e-com stacks.  
**Why it would not be better (yet):** kitchen configurator ecosystems / CAD planograms.  
**When it is better:** city stores and click-and-collect rooms that need POS + pick + QR education in one subscription.

### Best Buy — why switch (or pilot)
Best Buy needs **omnichannel SKU + services-adjacent POS**. BOPIS allocator soft-reserves store stock, desk marks `READY_FOR_PICKUP`, and completes pickup with stock deduction. Web buy on product pages can request pickup. EDI webhook certifies partner connectivity. Loyalty earn closes membership at tender.  
**Why it would not be better (yet):** carrier-grade ship-from-store optimization across hundreds of nodes without custom scoring rules.  
**When it is better:** micro-fulfillment side rooms and brand shops that want one $199/mo workspace instead of five vendors.

---

## Operator “day in the life” (post-fix)

1. Admin → Private storage → mark storage-base PC  
2. Install/run `ZES-QRE.exe` — cloudflared auto-starts; tunnel URL in Admin  
3. Staff open POS — warm catalog; scan; promo code; pay; loyalty  
4. Chain Ops — transfer DC → store; Planogram — confirm bay  
5. EDI Connector — process overnight ORDERS → PO → receive  
6. BOPIS Desk — ready + complete pickup orders  
7. Product Studio — Publish QR + Push to WordPress  

If those steps feel boring, the product is ready for a serious pilot.
