Plan / Fact reports

Plan / Fact reports are used to analyze the accuracy of planning and getting summary information about the actual planning indicators.

The analysis involves all planning and routes for all company depots that are loaded into Track & Trace. In the reports, planned indicators are compared with actual data on already completed routes.

  1. Upload the plan to Track & Trace
  2. Prepare a report
  3. Download the report

Upload the plan to Track & Trace

To do a comparative analysis of the planned and actual indicators, send the solution received in Planning to Track & Trace. If you don't do this, the report will only contain the actual indicators.

The reports don't take into account that the route may be edited by the manager in the routing workspace or by the courier in the Yandex Courier app.

How the plan is loaded to Track & Trace depends on the way the company prefers to interact with the service.

In the routing workspace interface

The plan is saved when the route is exported to Track & Trace:

  1. Plan the route using the Planning service.
  2. Click Export.
  3. In the Export solution window, select Track & Trace.
In the API

Send a request to the route-plans resource. Provide information about the route and orders in the request.

Attention. The route with the number specified in the request must already exist in the company.
Query

cURL

curl -H "Content-Type: application/json" -H "Authorization: Auth your-token" -X POST -d @<File_path_in_UTF-8_encoding> -i https://courier.yandex.ru/api/v1/companies/<your-company-id>/route-plans
Copied to clipboard

File

[
  {
    "number":"101-2_2017-10-23",
    "nodes":[
      {
        "type":"depot",
        "arrival_time_s":25200,
        "transit_distance_m":0,
        "value":{
          "number":"0",
          "point":{
            "lat":55.799087,
            "lon":37.729377
          },
          "service_duration_s":200
        }
      },
      {
        "type":"order",
        "arrival_time_s":57526,
        "departure_time_s":57526,
        "transit_distance_m":8723,
        "used_time_window":"10:00-12:00",
        "value":{
          "number":"126",
          "point":{
            "lat":55.826326,
            "lon":37.637686
          },
          "service_duration_s":0
        }
      },
      {
        "type":"order",
        "arrival_time_s":57546,
        "departure_time_s":57546,
        "transit_distance_m":87423,
        "used_time_window":"10:00-12:00",
        "value":{
          "number":"2345",
          "address":"Address",
          "point":{
            "lat":55.826426,
            "lon":37.647686
          },
          "service_duration_s":0,
          "shared_service_duration_s":0,
          "multi_order":false,
          "customer_name":"Name",
          "shipment_size":{
            "volume_cbm":1.2,
            "weight_kg":5.1,
            "amount":4.5
          }
        }
      }
    ]
  }
]
Copied to clipboard
Result
The status code 200 in the response means that your plan is successfully uploaded to the server.

Prepare a report

  1. Go to Reports → Plan / Fact.
  2. Click Large report in Excel.

  3. Click Select date range to set a time frame for planned and completed routes to be analyzed.

    You can select a preset period (Yesterday, 7 days, 30 days, Last month) or set your own one, but it can't exceed 60 days.

    Note. Bear in mind that the current day can't be included in the report, even if the routes that you're interested in have already been completed.
  4. Click Prepare.

After you select the period, the icon appears in the upper-right corner, meaning that the report preparation is in progress. Meanwhile, you can continue working anywhere in the routing workspace interface.

Download the report

When the report is ready, you receive a notification with the report name (the name is generated automatically and contains the start and end dates of the comparison period).

Click Download to view the report. If you close the notification, you can return to the list of available reports later. To do this, click the icon in the upper-right corner.

Note. You have a day to download the report. After that, the report must be created again.

Contact support