Control center
Order management walkthrough
Order Management coordinates purchase, manufacturing, fulfilment, customs, trading, transhipment and approval views. The route components use orderManagement procedures and, for some manufacturing/customs flows, FIZ and FCZ procedures; support varies by resource, so follow the specific list/create/detail route.
Key routes
- Order overview
Entry point for order lifecycle areas.
- Purchase orders
Browse purchase-order work.
- Manufacturing
Browse manufacturing orders and production routes.
- Fulfilment
Open fulfilment planning and queue screens.
- Customs
Review customs data routes used with orders.
- Trading
Browse trading orders and entrepot route.
- Transhipment
Browse transhipment and manifest routes.
- Approvals
Review the approvals list, queue and escalation surfaces.
Prerequisites and seed data
- Sign in with the tenant that owns the orders and related inventory.
- Seed purchase, manufacturing, fulfilment, trading or transhipment records before expecting non-empty lists.
- Have supplier, SKU, quantities and required customs/production evidence available before submitting a form.
Primary workflows
Create and review a purchase order
Start a purchase record and inspect it through the order list/detail surface.
- Open purchase and review existing records. Purchase orders
- Create a purchase order with the required fields. New purchase order
- Return to the list and open the saved record for detail. Purchase orders
Plan manufacturing and fulfilment
Review manufacturing structure and route a fulfilment request through available screens.
- Review the manufacturing list and BOM route. Manufacturing
- Open the fulfilment planner and check routing/queue state. Fulfilment planner
- Review production-input data in the manufacturing area. Production inputs
Process approvals and customs checks
Review pending approval work and the customs context that may block order execution.
- Open the approval queue and review escalation items. Approval queue
- Review customs declarations and permit routes before execution. Customs declarations
Concepts
- Purchase order
- A supplier-facing request for goods or services; the purchase router provides list/detail/create operations used by the UI.
- Manufacturing order
- An instruction to produce goods, with related BOM and production-input routes.
- Fulfilment
- Planning and execution of work to satisfy demand, represented by planner, routing and queue surfaces.
- Approval
- A human decision point represented by approval queue and escalation pages.
Data sources and implementation status
- The UI uses orderManagement.approvals, customs, fulfilment, manufacturing, purchase, trading and transhipment tRPC namespaces.
- Manufacturing production-input routes also query fiz.production; order flows may create FCZ/FIZ records through their respective procedures.
- Router registration is in backend/src/trpc/trpc.router.ts; domain modules live under backend/src/order-management/, backend/src/fiz/ and backend/src/fcz/.
Permissions
- The API context can derive tenantId from a bearer token. Check each order procedure for applied authentication, tenant and role guards; shared CRUD handlers do not add these guards themselves.
- Approvals, order updates and customs actions may have stricter role gates in their backend procedures; the route structure alone does not grant authority.
- GlobalRole values are defined in prisma/schema.prisma; confirm the exact permission with the relevant procedure and tenant administrator.
Troubleshooting
| Symptom | Check | Where to look |
|---|---|---|
| A list is empty or an order detail is unavailable. | Confirm the tenant, seed the matching resource, and use the ID from its own list. | app/(app)/order-management/ |
| Create form reports an error. | Check required form fields and the matching procedure input schema; do not substitute a no-op submit handler. | backend/src/order-management/ and app/(app)/order-management/ |
| Approval cannot be completed. | Check approval status and procedure-level role authorization; request an authorized approver if needed. | backend/src/order-management/approvals/ and backend/src/trpc/trpc.middleware.ts |
Where things live
- Order-management routes
- app/(app)/order-management/
- Order backend modules
- backend/src/order-management/
- Order router registration
- backend/src/trpc/trpc.router.ts
- FIZ procedures
- backend/src/fiz/
- FCZ procedures
- backend/src/fcz/
Audience: operator · Last reviewed:
