Order Actions
Cancel, resubmit, and manage order lifecycle in the Ordering Portal
Order Actions
The Ordering Portal provides several actions customers can take on their orders depending on the current status.
Available Actions by Status
| Order Status | Cancel | Resubmit | Upload Docs | Add Notes | Download |
|---|---|---|---|---|---|
| Unprocessed | Yes | — | Yes | Yes | — |
| Pending | Yes | — | Yes | Yes | — |
| Submitted | — | — | Yes | Yes | — |
| On Hold | — | Yes | Yes | Yes | — |
| Rejected | — | Yes | Yes | Yes | — |
| Ordered | — | — | — | Yes | — |
| Received / Complete | — | — | — | Yes | Yes |
| Cancelled | — | — | — | — | — |
Cancel Order
Single Order Cancellation
Route: POST /order/{id}/cancel
Available when: Order status is pending or unprocessed
Flow:
- Customer clicks "Cancel" button on the order card (In Progress view) or order detail page
- A confirmation dialog appears
- On confirmation, the order status changes to
cancelled - The order disappears from active views
- May trigger refund processing if payment was made
Batch Cancellation
Route: POST /orders/cancel-multiple
Available when: Multiple orders in a group are pending
Flow:
- On a grouped order card, customer clicks "Cancel All"
- Confirmation dialog appears
- All orders in the group are cancelled in one request
- Results are returned per order (some may fail if status changed)
Resubmit Order
When Resubmission Is Needed
Orders are put On Hold or Rejected when:
- Required documents are missing or incorrect
- Information in the order is incomplete
- The vendor cannot process the order as submitted
Resubmission Flow
Route: POST /order/{id}/submit-for-processing (single) or POST /ordering/api/orders/resubmit (batch)
- Customer opens the on-hold or rejected order
- Reviews the rejection/hold reason (visible in order notes or status)
- Uploads corrected or additional documents
- Adds notes explaining what was corrected
- Clicks "Resubmit" button
- Order status changes from
on-hold→resubmitted - FTS staff are notified of the resubmission
- A new expected date may be calculated
Where to Find Orders Needing Resubmission
- Sidebar: "On Hold" badge shows the count of orders needing attention
- On Hold view:
/orders/on-hold— lists all orders requiring action - Resubmitted view:
/orders/resubmitted— shows orders already resubmitted
Download Documents
Available when: Order status is received, complete, or completed
Customers can download:
- Individual documents — click the download icon on any document
- Vendor-delivered reports — available from the order detail page
Download routes:
GET /attachment/{id}/view— streams the file inlineGET /attachment/{id}/download— forces a file download with proper filename
Status Transitions Customers Can Trigger
Customer Actions:
┌─────────────┐ ┌──────────┐ ┌───────────┐
│ Unprocessed │ ──→ │ Pending │ ──→ │ Submitted │
└─────────────┘ └──────────┘ └───────────┘
│ │
│ (cancel) │ (cancel)
▼ ▼
┌───────────┐ ┌───────────┐
│ Cancelled │ │ Cancelled │
└───────────┘ └───────────┘
┌──────────┐ ┌──────────────┐
│ On Hold │ ──→ │ Resubmitted │
└──────────┘ └──────────────┘
(resubmit with docs + notes)FTS staff handle transitions to: ordered, allocated, received, complete.
User Context
Route: GET /ordering/api/me
The portal checks user permissions before showing actions:
- Returns user profile, company, user group, and permissions
- Determines whether cancel buttons are shown (feature flag:
enable_cancel_order) - Determines whether account billing is available (
hasAccount) - Used by frontend to gate UI elements based on role