> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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://docs.mile.app/pages/planning/routing/visit.md#editing-a-visit) page. Two fields set the group:

![Grouped Visit and Priority](https://mintcdn.com/mileapp-e5b5ea5a/6neOmkf-6x94PX_y/images/v4/planning/visit-detail.png?fit=max\&auto=format\&n=6neOmkf-6x94PX_y\&q=85\&s=c62a8695e8591c42a6fcd4b794e4d9f4)

* **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://docs.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://docs.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.