> For the complete documentation index, see [llms.txt](https://docs.shortcutco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shortcutco.com/readme/dispatch/optimize-routes-and-the-assistant.md).

# Optimize routes and the Assistant

Let Shortcut work out the driving order, and use the Assistant (Cmd+K) to fix a day or rebalance crews.

You can always order routes by hand (see [Assign crews and set the route order](/readme/dispatch/assigning-and-ordering-routes.md)). These tools do it for you, and they always show you a preview before anything changes.

{% embed url="<https://www.youtube.com/watch?v=EPD1PFojCVs>" %}
Video: optimizing six crews in one pass (1:48).
{% endembed %}

## Before you start: two settings that make a big difference

1. **Set your route start and end address.** Open **Settings → Operations → Scheduling & jobs** and enter where crews start and finish the day (your shop or yard). The optimizer plans the route from there and back. If you leave it blank, it just orders the stops relative to each other. See [Scheduling & jobs](/readme/configuration/settings-capacity-+-route-start-and-end.md).
2. **Make sure addresses can be found on the map.** A stop that Shortcut can't place on the map is skipped by the optimizer and stays where it was. These show up on the **Needs attention** tab as **Missing coordinates**, with a **Fix address** button.

## Optimize routes

**For the whole day:** open **⋯** in the header and choose **Optimize routes**.

**For one crew:** open the **⋯** on that crew's lane header and choose **Optimize**.

Either way, a window opens (**Optimize All Routes** or **Optimize Route: Crew A**) and starts working straight away; there are no settings to choose. Stops in the **Unassigned** lane are left out because they don't belong to a route yet.

* **One crew** puts that crew's scheduled stops in the shortest driving order. Nothing moves to another crew.
* **All crews** plans the whole day at once, so it can also move a stop to a different crew when that shortens the day overall. It spreads the work so no crew is given much more than the larger of its own plan and an even share of the day. It treats crews as interchangeable, though: it doesn't know which crew handles chemical or irrigation work. If a crew's stops must stay with that crew, optimize that crew on its own instead.

While it runs you'll see **Optimizing routes** with a timer. A big day can take a couple of minutes. Keep the window open.

When it's done you get **Preview ready**. Nothing has changed yet. The preview shows:

* **What you'd save.** A table with one row per crew: **Miles** and **Drive time**, before → after, with the difference (for example **42.3 → 35.1 −7.2 mi** and **1 h 50 min → 1 h 32 min −18 min**). When you optimize all crews, an **All crews** row at the bottom adds them up. Drive time is time on the road only, not time on site. If Shortcut couldn't measure the before and after for every crew, you'll see **Savings unavailable for this run.** instead of numbers.
* **What moves.** Each customer whose place changes, with **Stop 7 → Stop 3** and **Earlier** or **Later**.

Click **Apply preview** to use the new order, or **Close** to keep what you had. After applying, the board refreshes with the new numbers.

<figure><img src="https://2299783971-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOhi7KtJ4vY1pDKwWu5SV%2Fuploads%2Fgit-blob-ed60ea3cce6c6a83d6abd33b7e1e3d2511aea460%2Fdispatch-optimize-savings.png?alt=media" alt="The Optimize All Routes preview: a per-crew table of miles and drive time before and after, an All crews total, and the list of stops that move"><figcaption><p>Before you apply, the preview shows each crew's miles and drive time before and after, and which stops move.</p></figcaption></figure>

A few things to know:

* **Crews hear about it when it matters to them.** If applying gives a crew a stop or takes one away today, or changes the order of their next three unstarted stops, everyone on that crew gets a **Your route changed** push. Otherwise they see the new order the next time they open Today. See [What your crew sees](/readme/dispatch/assigning-and-ordering-routes.md#what-your-crew-sees).
* **The new order is for today only.** If you'd like it to stick, drag any stop slightly and use **Keep every Tuesday** on the pill that appears, or simply run Optimize again next week.
* **There's no undo after applying**, so check the preview first. If you don't like the result, drag the stops back or run Optimize again.
* **If one crew would end up with far too much,** Optimize stops before showing a preview, for example *"Route optimization would give one crew 40 stops (limit 18), so no preview was created and nothing changed."* Check the day's crews and stops, then try again, or optimize crews one at a time.
* If something goes wrong you'll see **Optimization failed safely. No changes were made.** with a **Retry optimization** button.

## The Assistant (Cmd+K)

Press **Cmd+K** (Mac) or **Ctrl+K** (Windows) anywhere in Dispatch, or open **⋯ → Assistant**. A command box appears with shortcuts and a place to type.

### Fix today's schedule

Looks at the day for problems (stops nobody can reach in time, crews that are overloaded, stops with no crew) and proposes specific fixes: *assign this customer to Crew B*, *move this one to Thursday*, *put this one earlier in the run*. You'll see each proposal with its reason. Click **Apply Fixes** to make all the changes, or **Cancel**. If the day looks fine, it says **Schedule looks good**.

### Balance crews

Evens out the workload. It shows a before-and-after bar chart per crew and a table of proposed moves (**Job**, **Move**, **Reason**). Click **Apply Moves** to make them. If nothing needs moving, it says **Crews are balanced**.

### Show at-risk items

Highlights the stops most likely to go wrong today so you can look at them first.

### Typing a request

You can also type what you want in plain English, for example *"Move today's mowing to Thursday"* or *"Show unassigned jobs"*. Dispatch shows **Interpreted as:** and what it plans to do. Click **Run** or **Review proposal** and you'll see the exact list of changes with a **Confirm schedule changes** button. Nothing changes until you confirm.

{% hint style="info" %}
**Show unassigned jobs** simply applies the No crew filter, and **Reduce drive time** simply opens the map.
{% endhint %}

## Related pages

* [Dispatch overview](/readme/dispatch.md)
* [Assign crews and set the route order](/readme/dispatch/assigning-and-ordering-routes.md)
* [Scheduling & jobs (route start and end)](/readme/configuration/settings-capacity-+-route-start-and-end.md)
* [Route map](/readme/dispatch/route-map.md)

<details>

<summary>Still stuck?</summary>

Email **<hello@shortcutco.com>** with the date, which crew, and a screenshot of the preview.

</details>
