Simulated tracking enables you to generate dummy tracking events for your registered shipments to help with testing or demonstrations. This page explains how to use simulated tracking in Track.
How does simulated tracking work?
Ordinarily, Track shipments are updated by external communication from carriers. When the system receives a carrier tracking event that includes changes to one of your registered shipments, Track creates a shipment event and updates the shipment details as necessary.
However, it may sometimes be necessary for Track to generate its own tracking events. For example, you may be in the process of integrating with Track's Get Shipment Events or Get Tracking Events endpoints, and need some non-live test data to work with.
Simulated tracking is a means of generating dummy tracking events as part of a Register Shipment API call. When you register a dummy shipment (that is, a shipment that does not correspond with a real-life delivery) that has a
simulated_tracking property, Track creates its own standardised tracking and shipment events in the same way that it would if it had received "real" carrier tracking events for the shipment. You can then use these simulated tracking events for testing or demonstration purposes.
How to set up simulated tracking
Before you can receive tracking events from a particular simulated carrier, you will first need a connector for that simulated carrier. Track can simulate tracking events from the following carriers:
- DPD UK
- DPD Local
For more information on setting up carrier connectors, see the Setting Up Carrier Connectors section of the Settings page.
In order to set up a simulated connector, you will need to enter login details for the relevant Track simulated carrier. These details are generated by Sorted. Please contact support if you require simulated login details.
Once you have set up a connector for the carrier whose tracking events you want to simulate, you can use simulated tracking by registering a shipment with a
Simulated tracking should be used for testing and demonstration purposes only. Registering a
simulated_tracking property for a live shipment could result in incorrect tracking data.
simulated_tracking property has two sub-properties:
simulation_typeis the tracking scenario you want to simulate. At present, this property can either take a value of
delivered, in which Track generates tracking events simulating an issue-free delivery, or
random, in which Track generates a random tracking scenario.
carrier_referenceis the name of the carrier you want to simulate tracking events for:
Once you have registered a shipment with a
simulated_tracking property, Track generates dummy carrier tracking events for that shipment in line with the tracking scenario specified. The length of time taken to generate these simulated events varies based on the
simulation_type selected. The
delivered scenario generates events within 20 minutes, whereas the
random scenario generates events over the course of the next few days.
The system treats these tracking events in the same way as it would a "regular" tracking event, creating corresponding shipment events and updating the shipment's properties accordingly.
For more information on how Track processes incoming tracking events, see the How Track Works section of the Overview page.
Example simulated tracking call
The example below shows a simple shipment registered with a
Learn more about integrating with Track: