Skip to content

Orders

Orders in EmberX are created by staff on behalf of guests — typically from within a conversation. Guests do not place orders directly; instead, they make a request via chat and staff add the items from the product catalog.

How Orders Are Created

Orders originate from conversations:

  1. A guest scans a QR code and starts a conversation (e.g., “Can I get a bottle of wine and some fruit?”)
  2. Staff open the product catalog within the conversation
  3. Staff select the relevant products and quantities
  4. The order is created and linked to both the Conversation and the Guest

This means every order has full context: which room the guest is in, which Service Center handled it, and the full chat history.

Order Status Lifecycle

EmberX uses a simple 4-state lifecycle with enforced transition rules:

pending ──→ wip ──→ completed (final)
└──→ cancelled cancelled (final)
(from wip too)
StatusMeaning
pendingOrder created, waiting for staff to begin processing
wipWork In Progress — staff have acknowledged and are fulfilling
completedOrder delivered/fulfilled successfully
cancelledOrder was cancelled (by staff or guest request)

Transition Rules

FromCan move to
pendingwip or cancelled
wipcompleted or cancelled
completed(final — no further changes)
cancelled(final — no further changes)

There is no intermediate “ready” or “confirmed” state — the transition from wip to completed represents full fulfillment. Once an order reaches completed or cancelled, its status is locked.

Orders Dashboard

Navigate to Orders in the main sidebar to view all orders. The dashboard provides:

Status Filter Chips

At the top of the page, quick-filter chips show live counts for each status:

pending (3) wip (1) completed (12) cancelled (2)

Click any chip to filter the table to that status. Click again to clear the filter.

Updating Order Status

From the Orders table:

  1. Find the order.
  2. Click the ⋯ (Actions) button in the row.
  3. Select the target status from the dropdown (e.g., Mark as wip, Mark as completed, Mark as cancelled).
  4. The change saves immediately and a toast notification confirms.

Only valid next states are shown — completed and cancelled orders display no action menu.

You can also update status from within the linked conversation.

Order Structure

Each order stores:

FieldDescription
itemsJSON array: [{ productId, name, price, quantity }]
totalPriceCalculated total (sum of items × quantity)
notesOptional guest note attached to the order
statusCurrent status (pending / wip / completed / cancelled)
guestIdThe guest who requested the order
conversationIdThe conversation where the order was created

Products & Pricing

Products are managed separately in the Products module. Each product can have:

  • A base price
  • A discount (percentage or fixed amount)
  • Multiple images
  • Tags for categorization

When an order is created, the product’s current name and price are snapshot into the items JSON — so historical orders always reflect the price at time of purchase, even if the product price changes later.

Filtering Orders

The Orders table supports filtering by status using the chip buttons at the top. All other sorting and searching is handled in the data table columns.

Orders Analytics Dashboard

The Orders Analytics section appears on the main Dashboard (Overview) page — giving managers and admins a real-time view of order performance without leaving the home screen.

Period Selector

Switch between three time windows using the pill buttons at the top of the analytics section:

PeriodCoverage
7dLast 7 days
30dLast 30 days (default)
90dLast 90 days

KPI Cards

Four summary cards show all-time totals at a glance:

CardMetric
Total OrdersAll orders ever created; sub-label shows pending count
Total RevenueSum of totalPrice for all orders; sub-label shows average order value
In ProgressOrders currently in wip status
CompletedAll completed orders; sub-label shows cancelled count

Charts

ChartTypeDescription
Orders per DayVertical bar chartDaily order count for the selected period. X-axis tick density adjusts automatically (every day for 7d, every 5 days for 30d, every 10 days for 90d)
Orders by StatusDonut / pie chartDistribution of all-time orders across the 4 statuses
Top Selling ProductsHorizontal bar chartProducts ranked by total quantity sold in the selected period