---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.kz/routing/doc/en/delivery/functions/visit-detection.md
  - https://yandex.kz/routing/doc/kk/delivery/functions/visit-detection.md
  - https://yandex.kz/routing/doc/ru/delivery/functions/visit-detection.md
  - href: en/delivery/functions/visit-detection.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
title: RouteQ — functions — detection of route point visits
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.kz/routing/doc/en/llms.txt


# Detecting route point visits

Visits to route points (orders and depots) are detected automatically. This helps to log violations of the delivery sequence (if the [Delivery by order statuses](https://yandex.kz/routing/doc/en/delivery/configurable-options/delivery-by-order-status.md) option is off) and to [automatically detect deliveries](https://yandex.kz/routing/doc/en/delivery/functions/delivery-detection.md).

{% note info %}

Depot visits are detected only if you set up depot export to Track & Trace or if depots are added to routes as separate locations via the API (for such locations, `type` = `depot`). For more information, see [Courier visits to depots](https://yandex.kz/routing/doc/en/delivery/functions/visiting-depot.md).

{% endnote %}

## Detection parameter settings {#detection-parameters}

**Detection radius, m**

: The detection radius for delivering the order can be adjusted:

    - For the entire company. The parameter applies to all company orders if there are no individual parameters set for them. The default is 500 m. To specify a different value in the [company settings](../interface/company.md), enable the [automatic delivery detection](delivery-detection.md) feature or contact support (if you don't want to enable automatic delivery detection). The maximum detection radius is 2000 m.

    - For a depot. The parameter applies to all orders on the route that starts at this depot. To set the detection radius for a depot, use the `mark_delivered_radius` parameter in the API method when [creating](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsADepot) a depot or editing [one](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsDepot) or [multiple](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsMultipleDepots) depots. The priority of this radius supercedes the company-level radius.

    - For an order. To set it, use the `mark_delivered_radius` parameter in the API method when [creating](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsAnOrder) an order or editing [one](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsOrder) or [multiple](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsMultipleOrders) orders. This radius takes priority over the company-level and depot-level radiuses.

  You can set the depot visit detection radius (different from the company-level setting) via the interface in the [depot settings](https://yandex.kz/routing/doc/en/delivery/interface/depots.md) or using the API method when creating [one](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsADepot) or [multiple](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsMultipleDepots) depots in the parameter `mark_route_started_radius`.

**Detection coefficient**

: The default value is 0.5. You can specify a different value in the [company settings](https://yandex.kz/routing/doc/en/delivery/interface/company.md) yourself (only if [automatic delivery detection](https://yandex.kz/routing/doc/en/delivery/functions/delivery-detection.md) is enabled) or by contacting support (if you don't want to enable automatic delivery detection).

**Time to spend in the radius for detection, s**

: A visit is detected after the period of $N$, during which the courier must remain within the detection radius (in the delivery area).

    {% note info %}

    If you don't specify the time parameters, the visit will be detected when the courier enters the radius.

    {% endnote %}


    For the order, the time when the courier is in the delivery area is calculated using the formula:

    $N = coef_{detection} * \times(t_{order} + t_{address})$, where

    - $coef_{detection}$ is a detection coefficient.
    - $t_{order}$ is the handling time per order `service_duration_s`.
    - $t_{address}$ is the handling time per address `shared_service_duration_s`.

    The calculation for the depot uses the `service_duration_s` loading/unloading time. You can also set this value using the API method for creating [one](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/addsADepot) or [multiple](https://yandex.ru/routing/doc/en/delivery/redoc/index.html#operation/editsMultipleDepots) depots. You have to set this parameter if you use [depot detection](visiting-depot.md).

**ETA calculation influence**

: The moment when visit detection is triggered depends on the [ETA calculation method](https://yandex.kz/routing/doc/en/extras/sms-setting.md#notification-eta):

    - For `arrival_time`: $N$ seconds after the courier enters the delivery area.
    - For `delivery_time`: $N$ seconds from the start of delivery, but not earlier than the delivery window.
  

**Detect the next point in sequence** {#setup-point-next}

: You can enable the option **Detection is only allowed for the next point in sequence** in the [company settings](https://yandex.kz/routing/doc/en/delivery/interface/company.md#auto-delivery). Use this option if you need to adhere to the [order delivery sequence](https://yandex.kz/routing/doc/en/vrp/properties-of-orders.md#sequence-order) on the route.

  If the option is enabled:

  - Detection is allowed only for the point that's next in the sequence.
  - Detection doesn't trigger when the courier enters the radius of another point.
  
  There's an exception: you can fictitiously mark the visit of the starting depot along with the detection of the order that comes first in sequence after the depot.

  If the option is disabled:

  - The algorithm marks the completion of orders one by one.
  - Only the orders that follow one another and multi-orders can be marked as completed simultaneously at one location.
  - The algorithm takes into account the order handling time and matches it with the time spent within the radius.
  
**Example 1**

A courier delivers medical supplies with different temperature requirements. To do this, you set the order delivery sequence: order 1 → order 2 → order 3 → order 4 → order 5 → order 6 → order 7. The option **Detection is only allowed for the next point in sequence** is enabled.

Orders 1 and 3 are located at the same address but should be delivered in a different sequence. As a result, the detection of order 3 won't be triggered when completing order 1, even if the courier spends enough time in the delivery zone.

**Example 2**

The courier's route includes 5 orders. The option **Detection is only allowed for the next point in sequence** is enabled. A logistics coordinator manually marks order 1 as completed.

As a result, the courier proceeds directly to order 2 where detection is triggered because all the preceding orders have been completed.

**Example 3**

The conditions are the same as in example 2. A logistics coordinator manually marks orders 1 and 4 as completed. As a result, a courier delivers:

1. Order 2 — detection is triggered because all the preceding orders have been completed.
1. Order 5 — detection isn't triggered because not all the preceding orders have been completed. Order 3 hasn't been delivered although order 4 has been marked completed manually.

## How visit time is recorded {#setup-details}

The point visit is detected using the time on the courier's device.

For example, the courier visited the order at 17:00, but the internet connection on their device was lost and only restored at 17:10. At 17:05, the Routing Workspace dashboard won't show that the order has been visited. The manager will receive information about the order visit only at 17:10 after the courier's internet connection was restored and the device sent data to the Track & Trace server. In this case, the order visit time will be recorded as 17:00.

<!-- source: en/delivery/_includes/feedback.md -->
<a href="../feedback">
  <span class="button">Contact support</span>
</a>



[//]: # (Version without HTML\: \[Contact support\]\(../../../feedback.md\))
<!-- endsource: en/delivery/_includes/feedback.md -->
