BWH Shipping is a Frappe app for quoting, booking and tracking parcels in ERPNext. Your store gets live delivery rates at checkout, staff create and book a shipment from a Delivery Note, and tracking updates arrive by webhook, whichever carrier sits behind it.
It ships with two carriers, and you can add your own by writing one Python class.
Built-in carriers
| Carrier | Best for | Page |
|---|---|---|
| Shiprocket | Domestic India, through Shiprocket's partner couriers | Shiprocket |
| AfterShip | Labels and tracking across hundreds of carriers worldwide | AfterShip |
How a shipment works
Every consignment is a Shipping Request document. Its status climbs one ladder, whichever carrier is behind it:
flowchart LR
D[Draft] --> R[Ready To Ship] --> P[Pickup Scheduled] --> T[In Transit] --> O[Out For Delivery] --> U[Undelivered] --> RTO[RTO]
RTO --> F{{"Final: Delivered, Cancelled or Lost"}}
T -.-> F
O -.-> F
A status moves to any higher rung, and can skip rungs. It never moves down, so a late or out-of-order scan can't drag a shipment backwards. Delivered, Cancelled and Lost share the top rung and are final.
- At checkout, your store asks BWH Shipping for delivery options and prices. It quotes every enabled Shipping Service, using live carrier rates, your Shipping Rules, or a backup charge.
- After the order, a Shipping Request is created, either from a Delivery Note (Create → Shipment) or by your code.
- Booking buys the label from the carrier and stores the AWB, label URL and cost.
- Tracking moves the status up the ladder, from carrier webhooks or the Sync Status button.
Use it in your app shows the code for each step.
Build your own carrier
A carrier is a Frappe Single DocType that holds the carrier's credentials. Its controller class extends ShippingProviderBase and implements five methods:
| Method | What it does |
|---|---|
get_rates |
Quotes every service that can carry a parcel |
create_shipment |
Books the parcel and buys the label |
cancel_shipment |
Cancels a booking |
get_tracking |
Reads the current status from the carrier |
handle_webhook |
Verifies a carrier callback and reports the new status |
Four optional methods add pickups, manifests, resuming a half-finished booking, and listing the carrier's services. The status ladder, webhook endpoint, replay protection and checkout pricing are already done. Your class only talks to the carrier.
Install
You need a site with ERPNext, on Frappe 16 or later. BWH Shipping uses ERPNext's Address, Delivery Note, Shipping Rule and Company.
bench get-app https://github.com/bwhtech/bwh_shipping
bench --site your.site install-app bwh_shipping
Next steps
- Use it in your app: quote at checkout, create and book shipments, react to status changes
- Build a carrier: add your own carrier, step by step
- Carrier reference: every method, parameter and return value