1. Analytics
  2. Model

Analytics

Model

All analytics data is returned in a record. The key to the format is the day, in the format of YYYY_MM_DD. The value will be an object fo the resources the analytics are about.

For example:

        const analytics = {
  "2023_01_01": {
    deliveries: {}, //Deliveries analytics
    shipments: {}, //Shipments analytics
    fulfillments: {}, //Fulfillments analytics
    ///...etc
  },
};

      

Deliveries analytics

These are analytics for deliveries on the platform. You can see on each day, how many deliveries were in which status and what the average hold time was.

Deliveries would be access with analytics[day].deliveries.


hold_time object
The total counts of how long deliveries were attributed to a location and the total number of deliveries that were attributed to a location. This can be used to calculate the average hold time.

Show Statuses
hold_time.mins Integer
The total number of minutes deliveries spent attributed to a location within your organization.
hold_time.count Integer The total number of deliveries attributed to a location within your organization.

statuses object
These are the current counts on this day for each of the delivery statuses

Show Statuses
statuses.created Integer
statuses.provider_at_pickup Integer
statuses.package_accepted Integer
statuses.out_for_delivery Integer
statuses.provider_at_dropoff Integer
statuses.delivered Integer
statuses.address_issue Integer
statuses.contact_provider Integer
statuses.delayed Integer
statuses.delivery_attempted Integer
statuses.delivery_rescheduled Integer
statuses.delivery_scheduled Integer
statuses.driver_dispatched Integer
statuses.package_at_waypoint Integer
statuses.in_transit Integer
statuses.pickup_available Integer
statuses.package_damaged Integer
statuses.picked_up Integer
statuses.recipient_at_pickup Integer
statuses.return_to_sender Integer
statuses.package_undeliverable Integer
statuses.package_lost Integer
statuses.canceled Integer
statuses.added_to_container Integer
statuses.removed_from_container Integer
statuses.added_to_vehicle Integer
statuses.removed_from_vehicle Integer