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

Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.

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

Inside this diagram

A sequence diagram with 6 participants and 11 messages, in the order they happen.

People

  • Customer App

Systems

  • Restaurant App
  • Dispatch Service
  • Location Service
  • Rider App
  • Tracking Service

Steps in order

  • 1. Restaurant App β†’ Dispatch Service: Order accepted, ready in 12 min
  • 2. Dispatch Service β†’ Location Service: Riders near restaurant
  • 3. Location Service β†’ Dispatch Service: 5 riders with distance (reply)
  • 4. Dispatch Service β†’ Dispatch Service: Score by distance, load, ready time
  • 5. Dispatch Service β†’ Rider App: Offer order to rider 1
  • 6. Dispatch Service β†’ Rider App: Offer to rider 2
  • 7. Rider App β†’ Dispatch Service: Accepted (reply)
  • 8. Rider App β†’ Restaurant App: Arrive and pick up
  • 9. Rider App β†’ Tracking Service: GPS location
  • 10. Tracking Service β†’ Customer App: Live position and ETA (reply)
  • 11. Rider App β†’ Dispatch Service: Delivered

Conditions and loops

  • If: Rider declines or timeout
  • Repeats: Every 5 seconds

Make your own diagram like this

Describe your own system in plain English and the AI sequence diagram generator draws it in seconds, in the same style as this template.

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.