Lesson: Trip chaining — offer the next trip while the driver is mid-trip
A step-by-step walkthrough — offer a next trip to a busy driver with an estimated completion time, get their acknowledgement from the PWA, and watch it activate automatically the moment the current trip ends.
In this lesson you walk trip chaining end to end on the real screens: one of your drivers is mid-trip and you want them to roll straight into another trip afterwards. The platform shows a next-trip offer on their phone while they are still en route; they accept (or decline) with one tap, and when the current trip terminalizes the next one becomes their active trip automatically — same truck, same trailer, same claims.
Two people are needed — an admin on the web dashboard and a driver on their phone — or try both roles on a demo tenant.
Think ride-hailing apps
Just like a ride-hailing app sends you the next ride while you are still on the current one, the WinTrack dispatcher sends a chained next-trip offer to a busy driver — the driver decides now, the trip starts by itself when they are free.
Before you start
- A driver currently on an active trip (status «قيد رحلة» / on-trip) — chaining works only for trip-busy drivers; a driver held by a move order or a blind-loading order cannot be chained.
- An active contract with an approved route — the next trip goes on it.
- The same vehicle (and trailer, if one is assigned) must be used for the next trip — the system rejects a chained trip on a different bundle, because the driver + vehicle claims transfer as-is.
- The driver's phone has the app installed and is signed in.
The scenario at a glance
| # | Stage | Who | Where | Result |
|---|---|---|---|---|
| 1 | Send a next-trip offer to a busy driver | Admin | Web dashboard | A «بانتظار القبول» (pending) trip chained after the current one |
| 2 | Driver acknowledges the offer | Driver | Driver PWA | «تمت الموافقة — ستجهز تلقائيًا» (acknowledged) |
| 3 | Finish the current trip | Both | Web + PWA | The offer becomes the active trip automatically |
| 4 | Run the chained trip | Driver | Driver PWA | A completed trip with revenue, like any other |
The lesson
1. Admin: send the offer from the dispatch wizard
Open «إرسال رحلة جديدة» (new trip) from the sidebar. In the «اختر السائق (المجهز)» (pick driver) step, click the driver field to open the list:
- A driver busy on a trip now appears selectable with a «قيد رحلة» (on-trip) chip and a chaining line summarizing their current trip: trip number, destination, and the estimated time remaining labeled «تقديري» (estimated) — a hint for picking the right driver, not a promise.
- Drivers busy on other jobs (move / blind-loading orders) stay disabled, as before.
Select the driver: a «عرض رحلة تالية» (next-trip offer) dialog appears with the current trip's destination and ETA and a short explainer. Review it and click «إرسال كعرض تالٍ» (send as a next-trip offer), then continue as usual.
2. Admin: finish the steps and send
Nothing else changes: pick the contract and route, then the load details, then documents. On the confirm step you will see the purple «🔗 عرض رحلة تالية (ربط الرحلات)» band reminding you this trip goes out as a chained offer. Click «تأكيد وإرسال الرحلة».
✅ Success check: you get «تم إرسال الرحلة بنجاح», and the trip is born «بانتظار القبول» (pending acceptance) chained after the driver's current trip. Note the driver is not claimed again — the current trip's live claims are the same hold protecting the next one; nobody else can dispatch this driver or vehicle while the chain exists.
3. Driver: review and acknowledge
On the driver home screen, a «عرض الرحلة التالية» card appears right below the current trip card with a «تالية» (next) badge: route, load, bonus, and the explainer «ستبدل تلقائيًا بعد إكمال رحلتك الحالية» (switches automatically after you finish your current trip).
- «موافقة» (accept) means "understood" — an acknowledgement only. The trip does not start now; the card flips to a green «✓ تمت الموافقة — ستجهز تلقائيًا بعد رحلتك الحالية» band and the driver keeps working their current trip as if nothing happened.
- «رفض» (decline) opens the decline dialog with a required reason. The offer is rejected and the current trip is untouched — no driver or vehicle state change, and the decline does not affect the driver's rating.
✅ Success check: after acknowledging, a 🔗 notification lands in «الإشعارات» and the trip carries a «تالية» badge in the «الرحلات» tab until the switch.
4. Finish the current trip — the automatic switch
When the current trip terminalizes (driver completes the delivery, or admin updates the status), the platform does the rest in the same instant:
- Driver + vehicle (+ trailer) claims transfer automatically from the finished trip to the next one — no gap in the claims, nobody can snatch the driver at that moment.
- The driver gets a "your next trip is ready" notification and the chained trip becomes their active card to run like any normal trip (the earlier acknowledgement was not a start — finishing the first trip is the start).
- If the offer was never acknowledged, nothing switches on its own while it sits there; a cancelled offer leaves no trace on the driver's state.
✅ Success check: the finished trip is «completed», the chained trip is now in flight on the same equipment, with zero extra dispatcher action.
5. Driver: run the chained trip
From here it is the familiar flow: checklists, bayan al naql, weight station, delivery, finish — every normal trip rule applies, and revenue/bonus/settlement are computed per trip as always. Chaining changes only when the trip is sent and when it activates — not how it runs.
Admin notes
- Offers do not expire — the offer stays on the driver's screen until the current trip ends, or until you cancel it from the trips screen (cancelling an already-acknowledged offer is allowed too).
- One pending offer per driver — a second chained offer on the same parent is rejected until the first one is consumed (by the switch) or cancelled.
- Cancelling the current trip as admin does not cancel the offer: it activates as usual when the current trip terminalizes, and the driver remains free to decline it if it no longer suits.
- The «تقديري» ETA is an estimate — computed from the vehicle's last known position to the current trip's destination with a road factor plus a per-stage buffer; without a GPS fix or distance it falls back to the planned figure or disappears. Use it to compare drivers, not as an arrival promise.
- Partner (provider) drivers are out of scope for chaining in v1 — it works for your own tenant's drivers only.
If something breaks
| Symptom | Likely cause | What to do |
|---|---|---|
| The busy driver is not selectable | Not on an active trip, held by a move/blind-loading order, or a provider driver | Dispatch them normally once free |
| «يوجد عرض رحلة تالية معلّق لهذا السائق» | A previous offer is still pending | Wait for the switch, or cancel the old offer from the trips screen |
| Dispatch rejected over equipment mismatch | The new trip uses a different vehicle/trailer than the parent | Pick the parent trip's exact bundle |
| The driver sees no offer card | Device offline, or stale screen | Pull to refresh; verify they are signed in |
Check your understanding
- You can send a chained offer to a busy driver and know the trip is born «بانتظار القبول» without a new claim — the parent trip's live claims are the hold.
- You can read the chaining line in the driver list (current trip, destination, «تقديري») as a comparison hint, not an arrival promise.
- You can explain the difference to drivers: «موافقة» acknowledges without starting; «رفض» cancels the offer without touching the current trip or the rating.
- You know what happens the moment the current trip ends: claims transfer and the offer becomes the active trip.
- You know the one-offer-per-driver and no-expiry rules, and how to cancel an acknowledged offer from the trips screen.
What's next
- The next step in the cycle: Trip workflow — from bayan al naql to settlement (applies fully to the chained trip).
- Blind loading: the blind-loading lesson — another way a busy driver picks up work, done differently.
- More lessons are coming in the tutorials section — one lesson per feature.