Product EngineeringFeaturesB2B CollectionBackend

Business flows

Trip execution for B2B logistics — status, distance, mobile trail

👤 Utsav Katiyar📅 Updated: Apr 7, 2026🏷️ feature

Business flows

This page describes B2B Collection logistics behavior: trips for organization-site collection runs.


Trip lifecycle

B2BTrip implements state transitions such as start, end, and cancel, with validation on allowed statuses. Cancelling or ending may cascade to trip locations that were never reached (see implementation in admin.trip_management.models.core.trip).

Activity logging and optional push notifications are triggered on save when the trip module is configured to do so.


Distance calculation

When a trip ends, queue_distance_calculation_task can enqueue a Fusion webhook to …/trips/{id}/calculate-distance, using trail data (e.g. Firestore) to compute mileage for operations and audit.


Mobile / field

  • JWT context b2b_logistics for pickup-person auth.
  • Mobile URLs under api-v3/mobile/trip-management/b2b-logistics/… for authenticated field actions.
  • Trail updates may integrate with Firestore location tracking (see trip-management visiting-person views).

Integrations

Trip lifecycle may send push notifications and email links (e.g. trip details for operators) from hooks on the trip / trip-location models—implementation details vary by deployment.

On this page