PrintUp Biz docs Yêu cầu & nghiệm thu P0
Baseline · brief v2026-09-16 (16/09/2026) 5d0302ef

Lưu trữ – Yêu cầu chức năng (FR-01..FR-41)

42 FR tái triển khai được của PrintUp P0: tài khoản/giỏ hàng, danh mục/định giá, SePay, duyệt thiết kế, sản xuất/QC, hóa đơn/giao hàng thủ công, agent/referral, RBAC và mô hình dữ liệu lõi.

Đã chuyển vào lưu trữ ngày 01/10/2026. Yêu cầu nghiệp vụ của Core Flow đặt hàng nay quản lý theo mô hình user story tại User stories. Trang này giữ nguyên để tra cứu và truy vết mã FR. Cho tới khi CEO PrintUp duyệt việc đổi căn cứ nghiệm thu và ghi vào quyết định, FR vẫn là căn cứ nghiệm thu hiện hành.

FR-01..FR-41 là functional baseline của implementation freeze v1. Decision liên quan hiện đã được khóa; dec dùng để truy vết rationale/policy chứ không biểu thị điểm chặn còn mở.

Trạng thái thường gặp:

  • Implementation freeze v1: behavior đã đủ rõ để code/test.
  • Founder decision 16/09/2026: behavior do clarification Founder khóa.
  • Chuẩn cơ sở 16/09/2026: requirement gốc còn hiệu lực, có technical detail do team implement theo NFR/AC.
  • Simplified: phạm vi P0 đã thu gọn nhưng requirement còn hoạt động.
  • Deferred by founder: ngoài P0, chỉ quay lại qua change request/version mới.

Nhóm FR:

  • FR-01..FR-10: account/auth/guest cart, catalog/design/pricing, quote/order/SePay/invoice/tracking/referral.
  • FR-11..FR-19: Admin/backoffice Web, production/QC, customer/quote/agent/reporting/design approval.
  • FR-20..FR-28: pricing engine + extension point Khối 2.
  • FR-29..FR-39: manual fulfilment + explicit deferred shipping/COD automation.
  • FR-40..FR-41: RBAC/authz và core data model.

Real catalog/rates/margins/VAT/commission/provider credentials là deployment inputs. Fixture/config placeholder được dùng để implementation và test trước khi seed dữ liệu thật.

Bảng mã

Danh sách yêu cầu

Lọc trực tiếp trên 41 thẻ requirement.

8.1. Chức năng khách hàng — KH-01..KH-10

Implementation freeze v1 + D-39 change request: mobile-first, passkey-first customer auth với email/password secondary và email OTP fallback/recovery, single business account, guest cart/account-required checkout, product-config driven standard ecommerce + print/customizable flows, SePay, email + push, pricing snapshot và manual invoice/shipping.

FR-01 — [KH-01] Tài khoản, đăng nhập và checkout identity

P0 Founder change request 25/09/2026

Email là định danh account/contact/recovery, normalize và unique case-insensitive. Passkey là lựa chọn đăng ký/đăng nhập mặc định số 1; email + password là lựa chọn số 2; email OTP là fallback/recovery. Passkey login hỗ trợ discoverable credential/identifier-less flow nên user không phải nhập email trước. Passkey-first registration không bắt tạo password nhưng vẫn phải verify email bằng OTP trước checkout. Guest browse/add-to-cart được nhưng checkout phải login/create account. Personal và business account tách loại; mỗi business chỉ có một account, không multi-user organization.

Tiêu chí nghiệm thu

  • Passkey là CTA đầu tiên trên register/login; email + password là CTA thứ hai.
  • Passkey login identifier-less dùng đúng account mà không yêu cầu nhập email trước.
  • Passkey-first registration không yêu cầu password nhưng account chưa verify email vẫn không được checkout.
  • Email + password và email OTP fallback dùng cùng một account.
  • Một account có thể có nhiều passkey và quản lý chúng trong Security.
  • Guest cart merge sau login và không tạo order dưới guest identity.
  • Business account không có member/invite flow.
  • Recovery email OTP có thể khôi phục password hoặc đăng ký passkey thay thế.

Gợi ý kiểm thử

  • Register bằng passkey + verify email OTP + checkout.
  • Login identifier-less bằng passkey trên credential đã đăng ký.
  • Login secondary bằng email + password.
  • Login/recovery fallback bằng email OTP.
  • Reject WebAuthn challenge replay, expired challenge, RP ID/origin mismatch và credential không thuộc account.
  • Add second passkey, rename/remove passkey và block unsafe removal of last usable auth method.
  • Sai OTP quá limit và resend/rate-limit hoạt động.
  • Reset password bằng email OTP và kiểm session dài hạn cũ bị revoke.
  • Guest add-to-cart rồi login/create account, merge cart và checkout.
  • Tạo business account và kiểm không có member list/invite.

FR-02 — [KH-02] Duyệt danh mục và product behavior

P0 Founder clarification 16/09/2026

Khách xem product/variant active theo nhóm. Catalog configuration-driven và phải hỗ trợ cả standard ecommerce product lẫn print/customizable product trong cùng app. UI chỉ hiển thị option áp dụng theo product config: standard product có thể chỉ chọn variant/phân loại + quantity; print product có thể thêm material/dimension/finishing/design.

Tiêu chí nghiệm thu

  • Chỉ SKU active/publishable xuất hiện.
  • Không ép standard ecommerce product nhập design/print options.
  • Print/customizable product hiển thị đúng option được Admin cấu hình.
  • Catalog thật có thể nhập qua Admin không cần sửa code.
  • Một cart/order có thể chứa item khác product behavior.

Gợi ý kiểm thử

  • Tạo fixture standard product và kiểm chỉ variant + quantity.
  • Tạo fixture print/customizable product và kiểm material/dimension/finishing/design config.
  • Tạo cart mixed-mode.
  • Tạo SKU active/inactive và kiểm catalog.
  • Thử publish SKU thiếu required config của mode đã chọn và xác nhận bị chặn.

FR-03 — [KH-03] Đính kèm public design URL khi product yêu cầu

P0 Founder clarification 16/09/2026

Chỉ item có customization_mode=public_design_url mới yêu cầu khách gắn HTTPS public URL. URL có thể từ DesignO, Canva hoặc provider khác; PrintUp chỉ lưu URL/version/metadata, không API/SDK/OAuth và không direct file upload P0. Item customization_mode=none bỏ qua hoàn toàn design/file gate.

Tiêu chí nghiệm thu

  • URL version gắn đúng order item khi product yêu cầu.
  • Standard ecommerce item không bị yêu cầu URL và không có file-approval blocker.
  • Production Approver mở/download được URL mà không cần credential riêng của khách.
  • URL change sau approval reset trạng thái file.
  • Không outbound API call tới DesignO/Canva.

Gợi ý kiểm thử

  • Standard product checkout không design URL.
  • Gắn DesignO/Canva/HTTPS provider link public cho print item.
  • Gắn link private/hết quyền và kiểm trạng thái Needs action.
  • Đổi URL đã approve và kiểm tạo version mới/reset approval.

FR-04 — [KH-04] Tính giá tự động theo pricing mode

P0 Founder clarification 16/09/2026

Pricing path do product config quyết định. fixed_unit_price tính từ giá variant × quantity rồi áp discount/floor-minimum/VAT; print_engine tính từ production quantity, material/yield, digital/offset, finishing, fixed costs, target/minimum margin, discount policy và VAT theo FR-20..FR-27.

Tiêu chí nghiệm thu

  • Standard ecommerce product không cần print-cost inputs.
  • Print product vẫn có đầy đủ breakdown/config version/print technology/floor.
  • Mọi input ảnh hưởng giá làm recompute.
  • Không checkout dưới floor/minimum-net rule đã cấu hình.
  • Order snapshot lưu pricing mode và kết quả bất biến.

Gợi ý kiểm thử

  • Fixed-unit variant + quantity + promo/VAT/floor fixture.
  • Chạy tối thiểu 12 golden fixtures print engine.
  • Thay quantity/material/dimension/finishing/promo và đối chiếu breakdown khi áp dụng.
  • Kiểm digital/offset crossover và floor.

FR-05 — [KH-05] Yêu cầu báo giá riêng

P0 Implementation freeze v1

Cấu hình không instant-price được, vượt constraint, có charge đặc biệt/shipping hoặc cần floor override được chuyển sang manual quote. Standard ecommerce product có fixed-unit pricing hợp lệ không bị ép qua manual quote chỉ vì không có print config.

Tiêu chí nghiệm thu

  • Quote versioned với Draft/Sent/Accepted/Rejected/Expired/Converted.
  • Validity mặc định 7 ngày configurable.
  • Customer accept trong account; accepted quote convert thành order snapshot.

Gợi ý kiểm thử

  • Tạo quote multi-item, gửi, version lại, expire, accept và convert.
  • Thay input ảnh hưởng giá sau accept và xác nhận cần reprice/new version.
  • Standard fixed-price product checkout instant không qua quote.

FR-06 — [KH-06] Đặt hàng và thanh toán chuyển khoản

P0 Implementation freeze v1

Checkout reprice từng item theo pricing mode, tạo order idempotent với order number/payment reference duy nhất. P0 chỉ bank transfer + SePay, kỳ vọng full amount; partial/over/under/unmatched vào manual reconciliation.

Tiêu chí nghiệm thu

  • Double tap/retry không tạo duplicate order.
  • SePay replay không cộng trùng.
  • Order chỉ Paid khi match hợp lệ hoặc Accounting reconcile.
  • Payment window mặc định 24h configurable; late payment vào reconciliation.
  • Production approval chỉ được yêu cầu cho item production-enabled và khi Paid.

Gợi ý kiểm thử

  • Double-submit checkout mixed-mode.
  • Thanh toán đúng full amount.
  • Replay event.
  • Partial/over/under/unmatched/late payment.
  • Accounting reconcile có audit.

FR-07 — [KH-07] Thông tin hóa đơn VAT

P0 Implementation freeze v1

Khách nhập/lưu invoice info; một order tối đa một invoice record. Kế toán phát hành thủ công bên ngoài; customer sửa được tới trạng thái Issued.

Tiêu chí nghiệm thu

  • Snapshot invoice info gắn đúng order.
  • Sau Issued customer không sửa; Accounting được điều chỉnh reference/status.
  • Không invoice provider API P0.

Gợi ý kiểm thử

  • Checkout business/personal có invoice request.
  • Sửa trước Issued và bị chặn sau Issued.
  • Accounting cập nhật invoice ref/status.

FR-08 — [KH-08] Theo dõi đơn hàng và thông báo

P0 Implementation freeze v1

Khách xem timeline order/payment và các trục file/production/fulfilment khi áp dụng. Transactional notification P0 dùng email + push cho event áp dụng theo D-21; delivery status/error được lưu. Tracking về sau lấy data từ ERP; khi chưa có ERP data thì chưa cần implement integration (D-37).

Tiêu chí nghiệm thu

  • Timeline phản ánh state nội bộ thực và không hiển thị gate không áp dụng như đang chờ.
  • Email được attempt cho event áp dụng; push best-effort khi có token/permission.
  • Push failure không block workflow; transient provider error retry tối đa 3 lần.
  • Chưa có ERP: timeline chạy hoàn toàn bằng data nhập tay.

Gợi ý kiểm thử

  • Chạy standard ecommerce order và kiểm không có fake file/production wait state.
  • Chạy print order end-to-end và đối chiếu timeline.
  • Kích hoạt payment/file/production/shipment/cancel event khi áp dụng và kiểm email+push/delivery log.
  • Mô phỏng push/email transient failure và kiểm retry/fallback.

FR-09 — [KH-09] Đặt lại đơn cũ

P0 Implementation freeze v1

Cho phép reorder từ order cũ bằng cách clone variant/configuration/link reference khi áp dụng nhưng luôn dùng availability, product behavior và pricing hiện hành.

Tiêu chí nghiệm thu

  • Không giữ giá cũ âm thầm.
  • Không tạo design/print config cho standard product nếu product behavior hiện hành không yêu cầu.
  • SKU/config không còn active phải yêu cầu customer chọn lại hoặc manual quote.

Gợi ý kiểm thử

  • Reorder fixed-unit product sau đổi giá.
  • Reorder print product sau đổi bảng giá/config.
  • Reorder SKU inactive và kiểm flow fallback.

FR-10 — [KH-10] Mã giới thiệu

P0 Implementation freeze v1

Cho phép nhập referral code khi signup/checkout. Code unique case-insensitive; cấm self-referral; attribution snapshot vào order và khóa sau payment confirmed.

Tiêu chí nghiệm thu

  • Invalid/self code bị từ chối.
  • Referral không đổi sau payment.
  • Attribution phục vụ report/commission một tầng.

Gợi ý kiểm thử

  • Valid/invalid/self referral.
  • Thử sửa referral sau payment và bị chặn.

8.2. Quản trị nội bộ — QT-01..QT-09

Admin/backoffice Web là P0 control plane. Admin quyết định product behavior per product/variant; public/customer Web storefront thuộc P0 (Founder 17/09/2026) và dùng chung backend API/flow với mobile.

FR-11 — [QT-01] Quản lý sản phẩm, behavior và link mẫu

P0 Founder clarification 16/09/2026

Admin thêm/sửa/ẩn product/variant và cấu hình behavior tương đương customization_mode, pricing_mode, fulfilment_mode. Standard ecommerce product có thể chỉ cần variant/quantity + fixed unit price + direct fulfilment; print/customizable product có thể bật production/pricing parameters và public template/reference URL. Không sync thư viện DesignO/Canva qua API.

Tiêu chí nghiệm thu

  • Unique SKU.
  • Publish validation chỉ yêu cầu field đúng với mode đã chọn.
  • Không bắt standard product có material/print/design config.
  • Hide SKU không ảnh hưởng lịch sử order.
  • Đổi product behavior chỉ áp dụng cart/order mới; order cũ giữ snapshot.

Gợi ý kiểm thử

  • CRUD standard product và print product.
  • Publish validation theo từng mode.
  • Chuyển config trên product mới và kiểm mobile rendering/checkout path.
  • Ẩn SKU và kiểm order lịch sử còn đọc được.

FR-12 — [QT-02] Quản lý pricing configuration

P0 Founder clarification 16/09/2026

Admin cấu hình versioned fixed-unit prices cho standard ecommerce và material/print/finishing/fixed cost, waste/yield, margin cho print engine; VAT, customer tier, quantity discount và promo/coupon dùng chung mà không sửa code.

Tiêu chí nghiệm thu

  • Config có validation/version/audit.
  • Order/quote cũ giữ snapshot.
  • Floor/minimum-net logic không bypass qua discount.
  • Standard product không phụ thuộc print rate table.

Gợi ý kiểm thử

  • Đổi fixed-unit variant price và reprice cart.
  • Đổi từng nhóm print config và chạy golden fixtures.
  • Tạo promo fixed/percentage và kiểm stacking/floor.

FR-13 — [QT-03] Quản lý order/state theo product flow

P0 Founder clarification 16/09/2026

Admin/backoffice quản lý order và state; payment/refund gates dùng chung, file/production gates chỉ áp dụng cho item được product config bật. Mixed order theo dõi state từng item và chỉ Completed khi mọi item-specific gate + fulfilment đã đóng.

Tiêu chí nghiệm thu

  • Standard ecommerce item không bị block bởi file/production state.
  • Production-enabled item không bypass Paid/Production Approver gate.
  • Sau payment customer không self-edit/cancel.
  • Order change price-affecting reset/reprice/approval đúng policy khi gate áp dụng.

Gợi ý kiểm thử

  • Standard direct-fulfilment item Paid -> fulfilment without file/production.
  • Print item transition hợp lệ/không hợp lệ bằng từng role.
  • Mixed order chỉ Completed khi cả hai item hoàn tất.
  • Thử cancel/change trước và sau payment/production approval.

FR-14 — [QT-04] Điều phối sản xuất và QC khi áp dụng

P0 Founder clarification 16/09/2026

Chỉ item fulfilment_mode=production_then_fulfilment mới tạo production order. Production-enabled item có production ticket/print view; Production cập nhật progress; Production Approver duyệt file khi cần và production; QC ghi result; Rework/Scrap ghi reason/quantity/note. Direct-fulfilment item không tạo production order.

Tiêu chí nghiệm thu

  • State theo D-13.
  • Production user không approve gate.
  • Item no-design nhưng production-enabled dùng file gate Not required.
  • Direct-fulfilment item đi qua fulfilment mà không cần production state.
  • Order chỉ complete khi item-specific production/QC và fulfilment phù hợp hoàn tất.

Gợi ý kiểm thử

  • Tạo standard direct-fulfilment order và kiểm không có production order.
  • Tạo print production order.
  • Tạo production-enabled/no-design item.
  • In/view production ticket.
  • Run QC pass/rework/scrap.
  • Thử unauthorized approve.

FR-15 — [QT-05] Quản lý customer/business

P0 Implementation freeze v1

Xem account/profile/address/history theo quyền. Business account một-một với business profile, tax code unique khi có; phone là contact không phải login ID.

Tiêu chí nghiệm thu

  • RBAC đúng scope.
  • Order giữ snapshot contact/address.
  • Không organization membership P0.

Gợi ý kiểm thử

  • Personal/business profile và multiple address.
  • Duplicate tax code.
  • Cross-role access.

FR-16 — [QT-06] Quản lý manual quote

P0 Implementation freeze v1

Sales/Admin tạo/version/send/expire quote; customer accept; quote convert order; floor override chỉ Admin.

Tiêu chí nghiệm thu

  • Trace được mọi version/status.
  • Expired/rejected quote không convert.
  • Override có reason/audit.

Gợi ý kiểm thử

  • Full quote lifecycle và override approval.

FR-17 — [QT-07] Quản lý agent/referral/commission

P0 Implementation freeze v1

Open application, Admin approval, unique referral code, one-tier attribution, configurable commission rate, eligibility và monthly payout batch theo D-18. Tài khoản được approved làm agent KHÔNG được đặt đơn/checkout bằng tài khoản đó (D-38).

Tiêu chí nghiệm thu

  • Pending không active.
  • No self-referral.
  • Tài khoản agent bị chặn tạo order/checkout server-side; phải dùng tài khoản mua hàng riêng.
  • Commission base loại VAT/shipping/refund.
  • Chỉ Paid+Completed eligible.
  • Một commission không pay hai lần; refund sau payout thành negative adjustment.

Gợi ý kiểm thử

  • Apply->approve->referral->completed order->monthly payout.
  • Agent account thử checkout và bị chặn rõ ràng (D-38).
  • Cancel/refund trước payout.
  • Refund sau payout.
  • Duplicate payout guard.

FR-18 — [QT-08] Báo cáo

P0 Implementation freeze v1

Report doanh số theo ngày/product/agent/customer, margin/order/payment, commission và manual shipping data trên timezone P0. Product/pricing mode phải reportable để phân biệt standard ecommerce và print/customizable.

Tiêu chí nghiệm thu

  • Đối chiếu được với source records/snapshots.
  • Refund/adjustment không làm double count.
  • Có thể filter/group theo product behavior/pricing mode.

Gợi ý kiểm thử

  • Dataset nhiều order/payment/refund/agent với cả fixed-unit và print-engine product rồi đối chiếu report.

FR-19 — [QT-09] Kiểm/duyệt design thủ công khi áp dụng

P0 Founder clarification 16/09/2026

Chỉ item customization_mode=public_design_url mới vào file review. Production Approver mở public URL, kiểm checklist file/color, ghi pass/fail/note/evidence; URL change reset approval. Không auto color/preflight API. Item customization_mode=none có file gate Not required.

Tiêu chí nghiệm thu

  • Checklist lưu actor/time/version.
  • Chỉ one active Production Approver approve.
  • RGB/spot risk phải có warning/note nếu approve.
  • Standard ecommerce item không xuất hiện như đang chờ file.

Gợi ý kiểm thử

  • Standard product no-file flow.
  • Public/private link, size/bleed/DPI/font/color cases.
  • URL version change.
  • Unauthorized approve.

8.3. Pricing engine và extension point Khối 2

Pricing formula và policy đã freeze; product chọn fixed_unit_price hoặc print_engine. Real prices/rates/catalog là deployment data.

FR-20 — Cấu trúc giá theo pricing mode

P0 Founder clarification 16/09/2026

fixed_unit_price dùng configured unit price × quantity làm base net; print_engine dùng production cost = material + print + finishing + fixed rồi target/floor theo gross margin. Cả hai mode dùng discount/VAT/floor-minimum policy chung. Shipping không tự cộng instant checkout P0.

Tiêu chí nghiệm thu

  • Breakdown/version/pricing mode truy vết được.
  • Standard product không cần fake production cost components.
  • Manual quote có thể có shipping adjustment.

Gợi ý kiểm thử

  • Fixed-unit fixture.
  • Print-engine golden fixtures breakdown.

FR-21 — Production quantity và waste

P0 Implementation freeze v1

Với pricing_mode=print_engine, production_qty = ordered_qty + waste; waste hỗ trợ fixed và/hoặc percentage theo config. fixed_unit_price không yêu cầu production_qty.

Tiêu chí nghiệm thu

  • Print-engine item lưu ordered_qty, waste và production_qty.
  • Fixed-unit item không bị yêu cầu waste config.

Gợi ý kiểm thử

  • Fixed/percentage/combined waste cases.
  • Fixed-unit product publish/price không cần waste.

FR-22 — Hao phí khổ/yield vật liệu

P0 Implementation freeze v1

Với print_engine, material cost phản ánh yield/khổ thực và phần vật liệu không dùng được theo config. Không áp dụng cho fixed_unit_price trừ khi product đổi pricing mode.

Tiêu chí nghiệm thu

  • Không tính cost print chỉ theo diện tích thành phẩm.
  • Fixed-unit product không cần material/yield config.

Gợi ý kiểm thử

  • Hai layout/yield khác nhau cùng thành phẩm cho cost khác phù hợp.
  • Fixed-unit product no-yield case.

FR-23 — So sánh digital và offset

P0 Implementation freeze v1

Với print_engine, tính cost digital/offset độc lập khi đủ điều kiện và chọn phương án có total production cost thấp hơn. fixed_unit_price không chạy comparison này.

Tiêu chí nghiệm thu

  • Lưu cost từng phương án và lựa chọn khi print_engine.

Gợi ý kiểm thử

  • Golden fixtures quanh crossover.
  • Fixed-unit product không tạo print-tech choice giả.

FR-24 — Floor/minimum-net và override

P0 Founder clarification 16/09/2026

print_engine dùng floor_net_price theo minimum gross margin; fixed_unit_price dùng configured minimum-net/floor hoặc cost/margin rule tương đương. Check chạy sau mọi discount. Chỉ Admin override một quote/order với reason/audit.

Tiêu chí nghiệm thu

  • Customer path không bypass floor/minimum-net.
  • Không có global floor bypass.

Gợi ý kiểm thử

  • Discount/promo xuống dưới floor ở cả fixed-unit và print-engine.
  • Admin one-off override và Sales unauthorized attempt.

FR-25 — Realtime recompute và policy order

P0 Implementation freeze v1

Recompute khi input giá áp dụng cho pricing mode đổi; áp discount/VAT/rounding theo D-08/D-33; cart/reorder dùng product behavior + pricing config hiện hành.

Tiêu chí nghiệm thu

  • Không stale price/version.
  • Không yêu cầu print inputs trên fixed-unit item.

Gợi ý kiểm thử

  • Rapid variant/quantity changes fixed-unit.
  • Rapid print input changes, promo, price-version change.

FR-26 — No-code pricing configuration

P0 Founder clarification 16/09/2026

Admin thay fixed-unit price hoặc print-engine pricing params không sửa/deploy code; config versioned/audited.

Tiêu chí nghiệm thu

  • Validation và history đủ replay giá.

Gợi ý kiểm thử

  • Edit fixed price và print config rồi chạy fixtures; order cũ giữ snapshot.

FR-27 — Pricing/margin snapshot từng order

P0 Founder clarification 16/09/2026

Lưu pricing mode, base/sale net, discount, floor/minimum-net, VAT và resulting margin/cost data khi có. Print-engine thêm production cost, target/min margin, print technology; fixed-unit không cần fake các field print.

Tiêu chí nghiệm thu

  • Không đổi lịch sử khi pricing/product config đổi sau đó.
  • Snapshot đủ phân biệt standard ecommerce vs print-engine.

Gợi ý kiểm thử

  • Create fixed-unit + print order, change config, verify historical snapshot.

FR-28 — Extension point phân đơn Khối 2

Architecture Baseline 16/09/2026

Khối 1 sản xuất tại nhà máy Công ty khi item cần production, nhưng domain/data không hard-code theo cách buộc rewrite khi sau này thêm facility/routing theo product/capacity/location/quality. Direct-fulfilment product không bị ép qua facility routing.

Tiêu chí nghiệm thu

  • Architecture review có extension point hợp lý; artefact cụ thể do team kỹ thuật chọn.

Gợi ý kiểm thử

  • Review service/data contracts và giả lập thêm facility reference mà không đổi core order/pricing semantics.

8.4. Fulfilment thủ công

Manual-first, tối đa một shipment active/order; shipping fee không tự tính ở instant checkout. Định hướng carrier theo loại hàng (D-35): hàng nhỏ gọn → GHN/GHTK khi tích hợp ở phase sau; hàng cồng kềnh/giao hàng gấp → báo giá riêng qua manual quote. Direct-fulfilment và production-then-fulfilment cùng dùng module này khi item đủ điều kiện.

FR-29 — Thông tin fulfilment thủ công

P0 Founder clarification 16/09/2026

Order có thể no-shipping/pickup hoặc có một active shipment. Direct-fulfilment item có thể ready sau order/payment gates; production-enabled item chỉ ready sau production/QC. User có quyền nhập carrier/service/actual fee/note.

Tiêu chí nghiệm thu

  • Không cần shipping API.
  • Không split shipment P0.
  • Không bắt direct-fulfilment item chờ production.

Gợi ý kiểm thử

  • Standard ecommerce direct-fulfilment flow.
  • Print production-then-fulfilment flow.
  • Pickup/no-shipping và one-shipment flow.

FR-30 — Chọn carrier/service thủ công

P0 Implementation freeze v1

Staff chọn carrier/service bằng công cụ ngoài; actual fee ghi như operational cost. Định hướng carrier: hàng nhỏ gọn → GHN/GHTK; hàng cồng kềnh/giao gấp → báo giá riêng qua manual quote (D-35).

Tiêu chí nghiệm thu

  • Carrier/service/fee lưu đúng order.

Gợi ý kiểm thử

  • Manual carrier/service/fee entry.

FR-31 — Lưu tracking reference

P0 Implementation freeze v1

Nhập tracking code/URL từ shipment tạo ngoài hệ thống.

Tiêu chí nghiệm thu

  • Tracking ref unique đủ dùng trong order và customer timeline.

Gợi ý kiểm thử

  • Create/update tracking bằng role có quyền.

FR-32 — Cập nhật trạng thái giao thủ công

P0 Implementation freeze v1

User có quyền cập nhật shipment state bằng tay; customer nhận email + push theo D-21.

Tiêu chí nghiệm thu

  • Mỗi update có actor/time.
  • Không carrier webhook P0.

Gợi ý kiểm thử

  • Shipment created/in transit/delivered/failed và notification.

FR-33 — COD

Deferred Deferred by founder 16/09/2026

Không có COD payment/reconciliation trong P0.

Tiêu chí nghiệm thu

  • Core checkout không phụ thuộc COD fields/rules.

Gợi ý kiểm thử

  • P0 E2E chạy không COD module.

FR-34 — Shipping label/API

Deferred Deferred by founder 16/09/2026

Không create label qua API; label dùng từ external carrier tool. Khi tích hợp ở phase sau theo D-35, carrier mục tiêu cho hàng nhỏ gọn là GHN và GHTK.

Tiêu chí nghiệm thu

  • Không blocker P0.

Gợi ý kiểm thử

  • Architecture không require label provider.

FR-35 — Giao thất bại/return

P0 Implementation freeze v1

Ghi failed/return reason/status thủ công; order không complete sai; cancel/refund manual theo D-26.

Tiêu chí nghiệm thu

  • Reason/actor/time lưu được.
  • Customer notification email+push.

Gợi ý kiểm thử

  • Failed + return + refund request flow.

FR-36 — Báo cáo shipping manual

P1 Simplified 16/09/2026

Tổng hợp carrier/actual fee/status từ dữ liệu nhập tay; không giả định realtime carrier data.

Tiêu chí nghiệm thu

  • Missing manual data được phân biệt rõ.

Gợi ý kiểm thử

  • Dataset shipping manual.

FR-37 — Volumetric realtime

Deferred Deferred by founder 16/09/2026

Không nằm P0. Hàng cồng kềnh/giao hàng gấp được xử lý bằng báo giá riêng qua manual quote theo D-35.

Tiêu chí nghiệm thu

  • Không dependency divisor/carrier API.

Gợi ý kiểm thử

  • Architecture check.

FR-38 — Region/COD automation

Deferred Deferred by founder 16/09/2026

Không nằm P0; payment P0 là SePay transfer.

Tiêu chí nghiệm thu

  • Checkout không region/COD rule dependency.

Gợi ý kiểm thử

  • P0 checkout without region/COD engine.

FR-39 — COD reconciliation automation

Deferred Deferred by founder 16/09/2026

Không nằm P0.

Tiêu chí nghiệm thu

  • Không remittance/COD provider dependency.

Gợi ý kiểm thử

  • P0 accounting flow without COD module.

8.5. Dữ liệu, RBAC và audit

Core schema được mở rộng đủ cho implementation freeze, gồm product behavior config để không hard-code toàn app là print-only, nhưng tránh module ngoài P0.

FR-40 — Permission matrix và authorization

P0 Implementation freeze v1

Áp dụng role Customer, Agent, Sales, Production, Production Approver, Accounting, Admin, Management; server/API enforce; chỉ một Production Approver active.

Tiêu chí nghiệm thu

  • UI/API cùng policy.
  • Action nhạy cảm audit.
  • Auth foundation dùng cùng account/JWT authorization; customer passkey/password/OTP chỉ là phương thức chứng minh identity, role mới quyết định quyền.

Gợi ý kiểm thử

  • Matrix positive/negative tests, cross-role access, approver reassignment.

FR-41 — Mô hình dữ liệu lõi Khối 1

P0 Founder clarification 16/09/2026

Core schema gồm account/auth/profile/address/business, WebAuthn passkey credential + short-lived one-time challenge state, product/variant/catalog config + product behavior (customization/pricing/fulfilment mode), cart/item config, design link/version/file approval khi áp dụng, fixed-unit hoặc print pricing config/version/snapshot, quote/version, order/item, payment/reconciliation/refund, production/QC/rework khi áp dụng, shipment, invoice, agent/referral/commission/payout, notification delivery/device token, internal role/assignment và audit log.

Tiêu chí nghiệm thu

  • Không business membership/multi-user org.
  • Không inventory/procurement module P0 nhưng vẫn bán được standard ecommerce product.
  • Order item snapshot lưu product behavior/pricing mode để lịch sử không đổi khi Admin reconfig product.
  • Soft delete mặc định; hard purge separate/audited; audit delete record không cascade.
  • Không DesignO/Canva/shipping/invoice API dependency.
  • Money VND integer và timestamps/unit theo D-30.

Gợi ý kiểm thử

  • ERD traceability tới FR.
  • Standard + print product schema/checkout/order snapshot.
  • Mixed order conditional gates.
  • Delete/hard-purge audit.
  • Business unique tax code.
  • Order/payment idempotency constraints.
  • Commission/payout unique guards.
  • Notification delivery log.

8.6. Dịch vụ giá trị gia tăng

Dịch vụ bổ sung theo clarification Founder 17/09/2026; luồng báo giá riêng tái dùng manual quote FR-05.

FR-42 — [KH-11] Yêu cầu dịch vụ thiết kế bên ngoài

P0 Founder clarification 17/09/2026

Khi đặt hàng hoặc khi tìm sản phẩm, khách có thể yêu cầu dịch vụ thiết kế/thiết kế thuê ngoài: brief/mô tả + tham khảo HTTPS public URL (nếu có); yêu cầu không có giá instant. Sales/Admin chuẩn hóa và lập báo giá riêng qua manual quote; sau accept, dịch vụ là order item dịch vụ riêng không có design/file/production gate trừ khi item đó gắn sản phẩm in.

Tiêu chí nghiệm thu

  • Yêu cầu design service được tạo/lưu/truy vết như quote subject.
  • Báo giá riêng, không tự tính giá instant.
  • Sau convert, service item không ép design/production flow.
  • Chi phí thuê ngoài được ghi như operational cost.

Gợi ý kiểm thử

  • Tạo yêu cầu design service khi đặt hàng và khi tìm sản phẩm.
  • Quote riêng và convert thành order.
  • Service item không bị ép design URL/production gate.

Baseline nguồn: biz-docs/SOURCE-REQUIREMENTS.md · 16/09/2026 · repo RunLumi/printup

Requirement có trong đặc tả 16/09/2026 được đánh dấu Baseline. Chi tiết chưa đủ để code/nghiệm thu phải nằm ở trạng thái Cần chốt hoặc D-xx Mở, không tự suy diễn thành cam kết. Trạng thái được cập nhật trong biz-docs/data/.