Phase 5 β Chef Preparation
The flow where the chef receives a notification, processes the order, and updates its status to RideNDine for driver coordination.
Overviewβ
COOCO (notify) β Chef β COOCO (status update) β RideNDine
| Step | From | To | Action |
|---|---|---|---|
| 5.1 | COOCO | Chef | Internal notification |
| 5.2 | Chef | COOCO | PATCH /items/orders/:id |
| 5.3 | COOCO | RideNDine | PATCH /orders/status |
| 5.4 | RideNDine | COOCO | HTTP 200 acknowledge |
Step 5.1 β Notify Chef (Internal)β
From: COOCO β To: Chef
Purpose: Chef is notified of a paid order.
Directus Flow triggers when orders.payment_status = PAID:
- Sends email / push notification to the chef
No requests are sent to RideNDine at this step.
Step 5.2 β Chef Updates Statusβ
From: Chef β To: COOCO
Endpoint: PATCH /items/orders/:id
Chef updates via the OrderManagementPage:
| Action | status |
|---|---|
| Accept order | PREPARING |
| Reject order | CANCELLED |
| Done cooking | READY_FOR_PICKUP |
Step 5.3 β Sync Status to RideNDineβ
From: COOCO β To: RideNDine
Endpoint: PATCH /orders/status
Purpose: RideNDine knows when a driver needs to be dispatched.
Trigger: Directus Flow when orders.status changes, or an Extension hook.
Request Bodyβ
{
"ridendine_order_id": "<orders.ridendine_order_id>",
"external_order_id": "<orders.id>",
"status": "PREPARING | READY | CANCELLED",
"estimated_ready_at": "<ISO8601>",
"chef_note": "<optional note>"
}
Step 5.4 β RideNDine Acknowledgeβ
From: RideNDine β To: COOCO
RideNDine returns HTTP 200 confirming it has received the status.
COOCO logs to integration_events. No additional fields need to be saved.