Skip to main content

Phase 7 — Delivery Tracking

The flow for tracking the delivery journey — from when the driver picks up the order at the kitchen until it is delivered to the customer. COOCO receives status updates via webhook.


Overview

Driver → RideNDine → COOCO (webhook) → Customer + Chef
StepFromToAction
7.1DriverRideNDineDriver marks picked up
7.2RideNDineCOOCOPOST /webhooks/delivery-status (PICKED_UP)
7.3DriverRideNDineDriver marks delivered
7.4RideNDineCOOCOPOST /webhooks/delivery-status (DELIVERED)
7.5COOCOCustomer + ChefInternal notification

Step 7.1 — Driver Picks Up Order

The driver marks "picked up" on the Driver App. COOCO is not involved at this step.


Step 7.2 — Webhook: Picked Up

From: RideNDine → To: COOCO

Endpoint (COOCO expose): {DIRECTUS_URL}/ridendine/webhooks/delivery-status

Method: POST

Payload received

{
"event": "order_picked_up",
"ridendine_order_id": "<string>",
"status": "PICKED_UP"
}

Save to Directus

  • orders.delivery_status = PICKED_UP

Step 7.3 — Driver Completes Delivery

The driver marks "delivered" on the Driver App. COOCO is not involved at this step.


Step 7.4 — Webhook: Delivered

From: RideNDine → To: COOCO

Endpoint (COOCO expose): {DIRECTUS_URL}/ridendine/webhooks/delivery-status

Method: POST

Payload received

{
"event": "order_delivered",
"ridendine_order_id": "<string>",
"status": "DELIVERED"
}

Save to Directus

FieldValue
orders.delivery_statusDELIVERED
orders.statusDELIVERED or COMPLETED

Step 7.5 — Completion Notification (Internal)

From: COOCO → To: Customer + Chef

Directus Flow sends an email when orders.status = DELIVERED.

No requests are sent to RideNDine at this step.