CloudSketch AI Logo
FeaturesTemplatesPricingEnterpriseAboutContactLog in
πŸŒ™β˜€οΈ
Log inStart free
Home/Templates/Food Delivery & QSR

πŸ” Food Delivery & QSR Β· Sequence

Delivery Rider Assignment Sequence

How a food delivery platform picks a rider for an order: nearby riders, batching, acceptance and live tracking.

More Food Delivery & QSR templates

Drawing diagram…

What this diagram shows

  • Riders are chosen by distance to the restaurant and food-ready time
  • An order can be offered to the next rider if the first declines
  • Customers track the rider live once food is picked up

Prompt used

Rider assignment sequence: when the restaurant accepts an order, the dispatch service asks the location service for riders near the restaurant, scores them by distance, current load and estimated food-ready time, and offers the order to the best rider. If the rider declines or times out, it goes to the next one. After pickup, rider GPS updates stream to the tracking service and the customer app shows live location and ETA.

Mermaid code
sequenceDiagram
  participant R as Restaurant App
  participant D as Dispatch Service
  participant L as Location Service
  participant RA as Rider App
  participant T as Tracking Service
  actor C as Customer App
  R->>D: Order accepted, ready in 12 min
  D->>L: Riders near restaurant
  L-->>D: 5 riders with distance
  D->>D: Score by distance, load, ready time
  D->>RA: Offer order to rider 1
  alt Rider declines or timeout
    D->>RA: Offer to rider 2
  end
  RA-->>D: Accepted
  RA->>R: Arrive and pick up
  loop Every 5 seconds
    RA->>T: GPS location
    T-->>C: Live position and ETA
  end
  RA->>D: Delivered

Related templates

C4 ArchitectureProFood Delivery & QSR

Food Delivery Platform Architecture

A Swiggy/Zomato-style food delivery platform: customer, restaurant and rider apps, and the services that match orders, riders and payments.

SequenceFood Delivery & QSR

Food Order to Doorstep Sequence

Everything that happens between a customer tapping Place Order and the food arriving: payment, restaurant acceptance, rider assignment, pickup and delivery.

State MachineFood Delivery & QSR

Food Order Status State Machine

Every status of a food delivery order, from placed to delivered, including restaurant rejection, no rider and customer cancellation.

FlowchartFood Delivery & QSR

Restaurant Kitchen Order Flow

How orders from dine-in, takeaway and delivery apps flow through a restaurant kitchen display system to the pass and out.

Database ERDFood Delivery & QSR

Food Delivery Menu and Orders Schema

A schema for a food delivery platform: restaurants, menus, items with add-ons, customers, orders, order items and riders.

DeploymentProFood Delivery & QSR

Food Delivery Peak-Hour Scaling

How a food delivery platform scales for lunch and dinner peaks: pre-scaling, autoscaling services, sharded databases and a surge-protected dispatch.