In one of our previous posts we showed you the consumer experience for a task that is tracked with HyperTrack. Accurate status events are an important piece for a good user experience. In this post we take a deeper look into the data model that powers these events and how you can use them in your application.

status-events-2

The ETA model

The basic unit in our API is a task which is defined as going from A to B to perform an action. For example a task can be a package pickup or delivery. Every task has an internal data model for its estimated time of arrival or the ETA. Predicting the ETA involves solving two interesting subproblems.

  1. The travel time problem or how much time is required to travel from point A to B. While this is a major component of the task duration it is deterministic to a high degree.
  2. The first and last mile problem or how much time is required at point A in preparing for the task and similarly at point B in completing the task. These answers can be variable.

The two subproblems are captured in the five states of our ETA model: not started check out transit check in and completed. When the task is being prepared at point A it is in the check out state. The task then moves to transit when the driver is traveling from A to B. On reaching B the task goes into the check in state. Transitions between these states trigger events.

eta-model