> ## Documentation Index
> Fetch the complete documentation index at: https://docsy3.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Visit Group

> Keep related visits on the same vehicle and set their order.

**Visit Group** keeps related visits together and in order, for example making sure a pickup happens before its delivery. All visits in the same group are given to the **same vehicle**.

> [!NOTE]
>
> Required permission:
>
> * View task
> * Edit task
> * Route optimization

## Setting a visit group

Open **Edit Visit** for a visit on the [Visit](https://docsy3.mile.app/pages/planning/routing/visit.md#editing-a-visit) page. Two fields set the group:

![Grouped Visit and Priority](https://mintcdn.com/mile-app/WPibWyW63U4l5gcF/images/v4/planning/visit-detail.png?fit=max\&auto=format\&n=WPibWyW63U4l5gcF\&q=85\&s=15bfa74d564dd256071a844de2a6bb91)

* **Grouped Visit** (item 8): the group name. Visits with the same group are given to the same vehicle. Leave it empty if the visit has no group.
* **Priority** (item 9): the order inside the group, from 0 to 100, 0 by default. **A lower number is visited earlier.**

## In the result

In the [result](https://docsy3.mile.app/pages/planning/routing/result/visit-detail.md), the visit group appears as a badge next to the visit's tags.

## Notes

* A group can contain any number of visits, not only two.
* Priority sets the order inside a group, but the visits are not always back to back: other visits may be planned in between.
* To keep the group and priority on the task after you dispatch, map them in the flow's [route configuration](https://docsy3.mile.app/pages/workflow/flow/configuration.md). Values typed only on the Visit page are temporary: they are used by the optimization but not saved to the task.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.