HomeBlog → Errand Dispatch Platform (Part 2)

Errand Dispatch Platform Development

Published: 2026-08-18 Author: Wang Lei, Senior Software Engineer Reading Time: 4 min Part 2 of 6

Overview

After a user fills in pickup, delivery and item details (Part 1), the platform must return an accurate fee before payment. The pricing engine ties together map distance, configurable business rules and order attributes — all updatable from the admin panel without redeploying the mobile app.

Part 2 — Pricing Engine

Fee Formula

Delivery price is calculated per vehicle type. The formula implemented in the backend is:

  1. Distance fee — Base fare + max(0, route km − included km) × per-km rate.
  2. Weight fee — max(0, parcel kg − included kg) × per-kg rate.
  3. Item-type surcharge — Flat amount from the selected goods item type (surchargeAmount in admin).
  4. Subtotal — Distance fee + weight fee + item-type surcharge.
  5. Final fee — Subtotal × night coefficient × special-date coefficient (both default to 1 when not applicable).

The mobile app shows this breakdown in the fee-help dialog so users understand what they are paying for.

Per-Vehicle Configuration

Each enabled vehicle type (motorcycle, e-bike, etc.) has its own fee profile in admin:

Special-Date Surcharge Rules

Separate from night pricing, admins can define special-date rules (e.g. public holidays) on the fee-surcharge page:

Route Distance

The home page recalculates the estimate whenever pickup, delivery, weight, vehicle or appointment time changes.

Admin Fee Configuration

Operators adjust pricing without redeploying the app:

FAQ

Can delivery fees be changed without redeploying the app?
Yes. Vehicle fee profiles, item-type surcharges and special-date rules are loaded at order time from the admin panel.

How is the final price calculated?
(Distance fee + weight fee + item-type surcharge) × night factor × special-date factor. Coupons apply on top at checkout.

Series Navigation

Part 1 — Customer Ordering · Part 2 — Pricing Engine · Part 3 — Payment & Wallet · Part 4 — Dispatch & Rider · Part 5 — Admin & Settlement · Part 6 — Deployment & Tech

← Technician Schedule Guide Ready Taxi Dispatch Platform Guide →

Back to Blog