Plan / Fact reports
Plan / Fact reports are used to analyze planning accuracy and get summary information about the actual planning 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.
Upload 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 the logists coordinator 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.
- Routing workspace interface
-
The plan is saved when the route is exported to Track & Trace:
- Plan the route using the Planning service.
- Click Export.
- In the Export solution window, select Track & Trace.
- 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 clipboardFile
[ { "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
- A response with the status code
200
means that your plan has successfully been uploaded to the server.
- Query
-
cURL
curl -H "Content-Type: application/json" -H "Authorization: Auth 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-company-id>/route-plans
Copied to clipboard - Result
- A response with the status code
200
means that your plan has successfully been uploaded to the server.
Prepare a report
- Go to.
Click
.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. The maximum length 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.- Click Prepare.
After you select the period, the icon appears in the upper-right corner. This means the report is being prepared. You can continue working anywhere in the routing workspace interface.
Download the report
A notification appears when the report is ready with the report 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.