Introduction
The truemetrics SDK supports logging of not only sensor data but also metadata from your mobile application. This allows you to enrich truemetrics data with specific courier events and data to get most of truemetrics data.When to send metadata and what to use as trigger
When is the right time to send metadata? The truemetrics algorithm matches the metadata closest in time to the stop event. Most customers choose an interaction that occurs close to the actual service, such as scanning the parcel or the courier swiping to confirm arrival at the delivery location. Try to avoid triggers that the driver might often forget, such as marking the delivery as closed or starting navigation to the next stop, as this can lead to mismatches between the metadata and the stop data in truemetrics. If you’re unsure, either discuss this with truemetrics or use multiple triggers to send metadata. Just make sure to include the type of trigger so that the data is not interpreted as multiple deliveries.How to send metadata
Use theStandardMetadata class to log structured event metadata:
The map-based
logMetadata(Map<String, String>) overload is deprecated. Use logMetadata(StandardMetadata) instead.Required Metadata Fields
TheStandardMetadata class contains the following fields. All fields are strings.