Intervals.icu
Advanced
The content of this article is aimed at users who are familiar with our platform and have some technical knowledge.
Intervals.icu is a training analysis app that gathers the activities from several devices and apps in one place. Riders who already keep them there can connect their account to sincrona, so their rides come in without them doing anything.
It works like Strava: we import the rider's bikes, rides arrive as soon as the rider uploads them to Intervals.icu, and a periodic check picks up any that slipped through.
Authorization Flow
When a workshop registers a rider, it enters Intervals.icu as their sports app and the rider receives an invitation. By following it they sign in to Intervals.icu and authorize us to read their activities and bikes.
A workshop registers a rider
The workshop creates the rider and enters their preferred sports app, in this case Intervals.icu. A link is generated through which the rider authorizes us.
The rider authorizes the application
The rider signs in to Intervals.icu and accepts the two permissions we ask for: reading their activities and reading their settings, where Intervals.icu keeps their bikes. If they don't accept them, the connection isn't created.
If the rider doesn't authorize, or ignores the notification, after a reasonable time we delete any trace of their registration.
Access to information
As with Strava, all information from Intervals.icu is managed by sincrona. The workshop only sees the rider's bikes and rides once the rider has authorized access, and if they leave the workshop their data stays on the platform: only the rider-workshop relationship changes.
Which rides come through
We only import the cycling activities whose data Intervals.icu shares with us. If an activity arrives empty, we don't import it, neither when connecting nor afterwards. Rides the rider uploads from other apps, like Strava, arrive like any other.
Synchronization Process
What we keep from each ride
From each cycling activity we keep its date, distance, moving time, sport and elevation gain, and whether it was a commute or on an indoor trainer (a virtual ride always counts as indoor). We use them to work out each bike's wear and your workshop's analytics.
We only keep cycling activities, including mountain, gravel, road, e-bike and indoor rides. Other activities are ignored.
Initial synchronization
This only happens when the rider accepts the authorization for the first time. Here:
- We map the bikes defined in Intervals.icu. Activities with no bike go to the rider's default bike.
- We collect the rides of the last year, each with the bike Intervals.icu says it was recorded on.
- All rides that took place before a safety period are assumed confirmed and registered.
- We update the components' wear values based on the registered rides.
Real-time synchronization
When a rider uploads a new cycling activity, Intervals.icu tells us, and then:
- We get the ride's details and the bike used.
- We save a provisional version of the ride without affecting wear values.
- After a safety period (2 to 3 days):
- We check for changes to the ride (bike changes).
- We update the components' wear values.
- We mark the ride as confirmed.
Periodic synchronization
Periodically we ask Intervals.icu for the rides since the last synchronization, whether or not we received them in real time. This makes sure no ride is missed if Intervals.icu didn't tell us, or if we couldn't process it at the time because of a temporary failure. A ride we already have isn't saved twice.
Changes and deletions
- Deletion. When a rider deletes an activity, Intervals.icu tells us and we delete the ride on our platform. If it was already confirmed, we subtract its distance and time from the bike's wear.
- Bike change. We only check the bike once, at the end of the safety period. If the rider changes it during those days, the ride moves to the right bike when it's confirmed. Once confirmed, we no longer check for changes.
- Other changes. If the rider edits a ride we already have, such as its distance, we don't update it. To correct it, they have to delete the activity in Intervals.icu and upload it again.
When access stops working
Intervals.icu doesn't renew permissions: the one the rider gives us lasts until they remove it or authorize the application again, which replaces the earlier one. We mark the connection as broken when Intervals.icu rejects our requests, or when it tells us the rider removed the permission to read their activities. If it doesn't tell us, we find out at the next periodic synchronization.
While the connection is broken:
- We don't import new rides, and the periodic synchronization skips that connection.
- Provisional rides aren't confirmed: they wait, without affecting wear values.
Each time a connection breaks we send the rider a notification on the channel they chose (email or WhatsApp), and the workshop isn't notified.
The rider repairs it from their profile by authorizing the application again with the same Intervals.icu account (see check and repair your connection). Then we collect, in the background, the rides recorded since the last synchronization, just as in the initial synchronization.
If a rider leaves sincrona, we ask Intervals.icu to revoke our access to their account.