Plan/Fact reports

Plan/Fact reports are used to analyze planning accuracy and get an overview of your actual performance indicators.

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

Note

Routes appear in the Plan/Fact reports only on the day after their completion.

Uploading a plan to Track & Trace

To perform a comparative analysis of planned and actual indicators, send the solution from Planning to Track & Trace. Otherwise, the report will only contain the actual indicators.

Reports don't take into account that the route may have been edited by a manager in the Routing workspace or by the courier in the Yandex Courier app.

The plan is uploaded to Track & Trace based on how the company interacts with the service.

In the Routing workspace

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.

Warning

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

Request

cURL

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

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
          }
        }
      }
    ]
  }
]

Result

A response with the status code 200 means that your plan has successfully been uploaded to the server.

Request

cURL

curl -H "Content-Type: application/json" -H "Authorization: OAuth <your-token>" -X POST -d [{"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}}}]}] -i https://courier.yandex.ru/api/v1/companies/<your-comlany-id>/route-plans

Result

A response with the status code 200 means that your plan has successfully been uploaded to the server.

Preparing a report

  1. Go to ReportsPlan/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 period from the list (Yesterday, 7 days, 30 days, Last month) or set your own period. The maximum period duration is 60 days.

    Note

    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. This means that the report is being prepared. You can continue working anywhere in the Routing workspace interface.

Downloading the report

When the report is ready, a notification will pop up with the report's name (the name is generated automatically and contains the start and end dates of the period).

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

To learn more about report fields, see Plan/Fact.

Note

The report is only available for download for one day. After that, the report must be created again.

Contact support