For Daily events, Terra sends updated totals throughout the day, every time the user moves. Each new payload is simply “the latest snapshot so far.” That’s why the recommended pattern is:
→ When you receive a Daily payload, overwrite the data for that date using the newest one.
To do this correctly, use metadata.start_time as the unique identifier (per user). Just take the date part, ignore the time - since the metric represents that entire day’s running total.
About cases where you get:
-
a valid payload (e.g., 3,500 steps), and
-
milliseconds later, a payload with 0 steps but the same distance
--> This isn’t something documented as expected behavior. It usually points to one of the following:
- Provider quirks (some devices briefly send partial or incomplete snapshots)
- Sync timing issues (data arriving mid-refresh from the vendor)
- Multi-device conflicts (two connected devices reporting different states within seconds)
In all cases, the overwrite rule protects you: the “latest correct snapshot” will naturally replace any glitchy intermediate values.
If this pattern persists for a specific vendor or user, we can escalate to investigate whether it's a provider-specific edge case.