FlowsBook a callSign inCreate free accountSign up
Roads and traffic

Commute route incident alerts: closures and roadworks on your way in, before you leave

Check the junctions, bridges and ramps on a daily route for closures and roadworks before the drive starts, and get a message only when something is in the way.

Part of the guide Location intelligence automation

By the xMap team · · 5 min read

Commute route incident alerts work best when they look at the handful of spots on the route that can actually stop you, such as a bridge, a ring road junction or a motorway ramp, about 30 to 45 minutes before you set off, and stay silent when the way is clear. A message that arrives only on bad days gets read; one that arrives every morning with "nothing to report" is ignored by the second week.

This guide is for anyone who drives the same road every working day and for the people who run a fixed drive for others: an office manager with a staff shuttle, a clinic courier with a set morning round, a site supervisor whose crew meets at the same yard. It covers how to describe a route so it can be checked, when to check, a made-up example from Nairobi, the common mistakes, and how to set it up as an AI employee.

Describe the route as spots, not as a line

A route is a long line, but what makes a morning go wrong is nearly always a few places along it where there is no easy way round. Write those down first. For most commutes that is five to ten spots: the river crossing, the one junction where three roads meet, the ramp onto the expressway, the street outside the gate at the far end. Give each one a name and its latitude and longitude in a small table.

There are two ways to check them:

  • Around each spot. Traffic incidents looks within a radius of every row in your table, say 400 m, and adds incidents_nearby and nearest_incident (its kind and how far) to each spot. This is the precise option, and the message can say "Road closure 220 m from the Galana Road bridge".
  • A drawn corridor. Draw the route as a narrow shape in the Area of interest. Every closure, roadworks site and incident inside it comes back with its street and district. A long drawn area is searched in up to 8 parts, centre first. This catches surprises between your spots, at the cost of more noise from side streets.

Incidents come back as Road closure, Roadworks or Incident, with a position accurate to about 150 m. Accidents usually show up as closures.

When to check

Check once early enough to change plans and once again close to departure. A first look at 06:15 for a 07:00 start lets someone leave earlier or take the long way; a second at 06:45 catches what appeared in between. For the drive home, one check 30 minutes before the usual leaving time is enough for most people. Weekdays only, unless the route also runs on Saturdays.

If you would rather be told the moment something appears, the When something changes trigger can watch for a road closure near up to 5 places and check every 15 minutes, every hour, every 6 hours or once a day. It runs the flow only when a new closure shows up, so it suits a short commute with a few critical points.

A made-up example: a staff shuttle in Nairobi

Say a company runs a 14-seat shuttle from the city centre to an office park on the edge of Nairobi, leaving at 06:50. Twice last month it sat in a queue behind roadworks the driver only saw when he reached them.

  1. The office manager lists seven spots: the two pick-up points, three junctions, a bridge and the park gate.
  2. A flow reads that table at 06:10 and 06:35 on weekdays and checks for incidents within 400 m of each spot.
  3. A Filter keeps only spots with incidents_nearby above 0.
  4. When anything is left, the driver and the office manager get one short message naming the spot, the kind of incident and how far it is.

On most mornings nothing is sent. On a morning with roadworks at the bridge, the 06:10 message gives the driver time to take the bypass and the manager time to text passengers that pick-up will be five minutes early. The times and distances are invented; set your own after a week of watching.

Add the speed of the road, not just the closures

A closure is clear-cut, but a slow junction with no incident is just as late. Adding Traffic Flow after the incidents check gives each spot its current speed, its free-flow speed and a jam factor from 0 to 10. A rule such as "tell me when any spot is above 7, or has a closure" covers both kinds of bad morning. Speeds are measured at the moment the flow runs; they are not counts of cars and they do not predict the next hour.

Mistakes that make alerts useless

  • Sending every day. Filter out clear mornings. Silence is the message that says go.
  • Too wide a radius. At 2 km around a city junction there is almost always roadworks somewhere. Start at 300 to 500 m and widen only where the alternatives are far away.
  • Checking too late. A warning five minutes before leaving changes nothing. Leave enough time to choose another road.
  • Forgetting the far end. The street outside the office car park or the factory gate is where many bad mornings end. Put it in the list.
  • One person on the list. If the driver is ill, the replacement needs the same message. Send it to a shared channel or to the person who runs the route as well.

Building it as an AI employee

In xMap Flows the whole thing is a short chain of blocks, and once deployed it runs on its own every working morning:

  1. Schedule: weekdays at your two check times, in your time zone.
  2. My data: the table of spots along the route.
  3. Traffic incidents: Around each incoming place, with your radius.
  4. Filter: incidents_nearby greater than 0.
  5. Email, or Slack or WhatsApp through their apps: one message listing each affected spot.

Ready-made versions exist: incidents near my drivers' zones and road closures on cash-in-transit routes, every morning both follow this pattern and can be pointed at your own route. For more on employees that look after people and vehicles on the road, see AI employees for field operations.

Questions

Can it check my route without a list of points?

Yes. Draw the route as a narrow area in the Area of interest and every incident inside it comes back. A list of spots is more precise and gives shorter messages.

Will it tell me about accidents?

Accidents usually appear as road closures in the data, so they are caught. The incident's kind, street and position come with it.

Can it suggest a different road?

No. It tells you what is on the spots you listed and how slow the roads there are. Choosing the way round is up to the driver.

How often can it check?

A schedule can run as often as every 5 minutes, and the When something changes trigger can check every 15 minutes. Two well-timed checks a morning are usually enough.

Templates that do this

Read next

More on roads and traffic · Every article · Templates

Put it to work

An AI employee in xMap Flows does this on live data, on its own timetable. Start from a template or describe it in plain words.