LastMile Dispatch & Routing Rules: Configuring Assignment and Routing Rules
Two rule pages that work as a pair: dispatch rules decide which driver gets a delivery, routing rules decide how that driver’s route is built — conditions, strategies, hard rules and weighted preferences.
LastMile has two different rule pages, and they do two different jobs. Dispatch rules — LastMile → Dispatch rules (/lastmile/dispatch-rules) — answer “which driver should get this delivery?”: they match deliveries by area, cargo type and hub, then hand them to a driver with the strategy you choose. Routing rules — LastMile → Routing → Routing Rules (/lastmile/routing/rules) — answer “once stops are assigned, how should the route be built?”: hard rules that must always hold, plus soft preferences that score the options. Set the dispatch rules first, then tune the routing rules.
Step 1: Write a dispatch rule — who it matches#
- Open LastMile → Dispatch rules and click New rule.
- Give the rule a name, set its priority (lower rules are tried in priority order when several could match — keep the numbers simple, e.g. 10, 20, 30) and leave Enabled on.
- Set the match conditions: Zones (a delivery matches when its address, city or postal code contains any term you enter), Handling units (parcel, pallet or bulky) and Hubs (only deliveries of the hubs you pick).
- Leave a condition empty when it should not limit the rule — an empty condition means “any”. A rule with every condition empty matches every delivery.
Step 2: Choose what happens when a rule matches#
- Nearest driver: the delivery goes to the closest suitable driver. Assigned driver: it goes to one of the candidate drivers you name on the rule. Round robin: deliveries are shared out evenly among the candidate drivers, one after another.
- Candidate drivers: pick the drivers a rule may use. Leave it empty to allow all active drivers.
- Auto-create route: turn this on when matched deliveries should also be gathered into a route sheet automatically, instead of waiting for someone to build the route by hand in LastMile → Routes.
- Save the rule. Back on the list you can edit or delete any rule, and switch a rule off with its Enabled toggle instead of deleting it — a switched-off rule simply stops matching.
Step 3: Run auto-dispatch and read the result#
- On LastMile → Dispatch rules, click Run auto-dispatch. Docklify walks the pending deliveries, applies the enabled rules in priority order and assigns each delivery to a driver.
- Read the result popup: how many deliveries were assigned, how many routes were created, and — when some deliveries could not be placed — the unassigned list with the reason for each one (the popup shows the first few).
- Fix unassigned deliveries by widening a rule — add the missing zone term, leave the hub condition empty, or add more candidate drivers — then run auto-dispatch again. Assigned deliveries continue in LastMile → Routes and LastMile → Deliveries.
Step 4: Tune how routes are built — Routing Rules#
Open LastMile → Routing → Routing Rules (/lastmile/routing/rules). The page groups its rules in two sections. Hard rules — must always hold: if a routing option breaks a hard rule, that option is rejected outright, no matter how good it looks otherwise. Soft preferences — weighted scoring: each preference scores the options, and a higher weight gives that preference more say in the final route. Expand any rule to read its plain-language explanation and set its parameters.
- Turn a rule on or off with its switch, drag a soft preference’s weight to make it matter more or less, and fill in the rule’s own parameters (limits, windows and similar values) where it offers them.
- Changes save as you make them — there is no separate Save button to hunt for on this page, and routing uses the new settings the next time routes are built, for example from the Routing Center in LastMile → Routing.
- Rules the system always follows but you cannot configure are listed in their own section at the bottom, so you can see exactly how routes are built instead of guessing.
Step 5: Per-shipper settings, presets and the what-if test#
- Shipper selector (top of the Routing Rules page): leave it on “All (tenant default)” to edit the settings everyone shares, or pick one shipper to give just that shipper its own routing rules. When rules conflict, the order is: shipper setting first, then tenant default, then system default — and each rule row carries a small badge showing where its current setting comes from.
- Preset templates: pick a preset at the top of the page and apply it to start from a ready-made set of rule settings instead of tuning every rule one by one. Applying a preset replaces the current settings (the page asks you to confirm), and presets apply to the tenant default — switch the shipper selector back to “All” to use them.
- What-if test: pick a historical delivery document and run the rules over it read-only. You see which rules the document hits and which it misses, and the decision view shows how the options were evaluated — how many candidates were considered and how many the hard rules excluded. Nothing is changed by a test run, so try a new setting here before trusting it on live routes.
Docklify features used in this article#
- Dispatch rules (conditions: zones / handling units / hubs; priority and on/off) — LastMile → Dispatch rules (/lastmile/dispatch-rules)
- Dispatch strategies and candidate drivers (nearest / assigned / round robin; auto-create route) — LastMile → Dispatch rules → New rule (/lastmile/dispatch-rules)
- Run auto-dispatch with an assigned / routes-created / unassigned result — LastMile → Dispatch rules → Run auto-dispatch (/lastmile/dispatch-rules)
- Routing rules: hard rules and weighted soft preferences with per-rule parameters — LastMile → Routing → Routing Rules (/lastmile/routing/rules)
- Per-shipper rule settings with source badges — LastMile → Routing → Routing Rules → Shipper selector (/lastmile/routing/rules)
- Preset templates and the read-only what-if test — LastMile → Routing → Routing Rules (/lastmile/routing/rules)