FlowsBook a callSign inCreate free accountSign up
Roads and traffic

Congestion alerts for drivers: a message when a stop's roads jam

Pick a jam factor line for each delivery stop, measure the roads around it on a timetable, and message the driver only when the line is passed.

Part of the guide Location intelligence automation

By the xMap team · · 6 min read

Useful congestion alerts for drivers come from three choices: the stops you care about, a line on the jam factor (0 is free, 10 is standstill), and the minutes of the day when a jam would change the plan. Measure the roads around each stop on a timetable, compare the reading with the line, and send a short message only for the stops that pass it. Everything else stays quiet, which is what keeps drivers reading the alerts that do arrive.

This is written for dispatchers and fleet leads at couriers, grocery and parcel delivery, food delivery, home services and anyone whose vans visit the same addresses every week. It covers how to set the line, how often to look, a made-up example from Johannesburg, the mistakes that turn alerts into noise, and how an AI employee does the watching. For the wider picture of field work handed to AI, see the guide to AI employees for field operations.

What a jam factor line means at a stop

The Traffic Flow block reads the roads around a place at the moment it runs. For each stop it returns the current speed and the free-flow speed in km/h, the jam factor from 0 to 10, how much slower than free flow the roads are as a percentage, a level in words (Free flowing, Light, Moderate, Heavy, Standstill), how many road stretches were measured, how many are closed, and the busiest road.

A line is simply the jam factor at which a driver should act. Different stops deserve different lines. A loading bay on a quiet side street is in trouble at 4, because one parked lorry blocks it. A drop-off on a six-lane ring road copes with 6 before arrival times slip. Write the line next to each stop in your table, so the flow can compare each stop with its own number rather than one figure for the whole city.

  • Jam factor 0 to 2: roads moving close to free flow. Nothing to say.
  • 3 to 5: slower, but most routes still work. Worth a note only for tight time windows.
  • 6 to 8: heavy. Arrival times will slip; a driver may want another order of stops.
  • 9 to 10: standstill or closed. The approach to the stop is effectively blocked.

How often to look, and when

Traffic Flow is live, so a reading is only as useful as its timing. A reading at 05:00 says nothing about the 08:30 school run. Match the timetable to the delivery windows: the Schedule block can run every 5, 15 or 30 minutes and limit the runs to certain hours and days, for example every 15 minutes from 07:00 to 10:00 on weekdays.

There is a balance. Looking every 5 minutes gives early warning but sends the same news again if a stop stays jammed. Looking every 30 minutes is calmer but can miss a short, sharp queue. For most delivery teams every 15 minutes inside the busy window works, with nothing outside it.

A made-up example: twenty drops in Johannesburg

The figures here are invented to show the working. A pharmacy wholesaler in Johannesburg sends one van each morning to twenty clinics and pharmacies. Three stops matter most: two clinics with narrow loading lanes in Braamfontein and a hospital pharmacy off a busy arterial road.

StopIts lineReading at 08:15Alert?
Clinic A, loading lane4Jam factor 5.2, ModerateYes
Clinic B, loading lane4Jam factor 2.1, LightNo
Hospital pharmacy6Jam factor 5.8, ModerateNo
Other 17 stops7All under 4No

A made-up morning: one message out of twenty stops.

The driver gets one line: "Clinic A: roads around the loading lane are moderate (jam factor 5.2), busiest road Jorissen Street. Consider dropping there after Clinic B." Nothing about the nineteen stops that are fine. If the hospital pharmacy had crossed 6, it would have joined the same message.

Mistakes that turn alerts into noise

  • One line for every stop. A city-wide threshold either fires all morning on busy roads or never fires on the fragile lanes.
  • Alerting at any change. A jam factor that moves from 1.8 to 2.4 is not news. Only a crossed line is.
  • Forgetting repeats. The flow does not remember what it sent at the last run. A stop that stays jammed for an hour on a 15-minute timetable is reported four times. Say "still jammed" in the message, or run less often.
  • Reading at the wrong hour. A check at 06:00 for a 09:00 window is a guess dressed up as data.
  • Ignoring confidence. Each reading has a confidence from 0 to 1. On a road with few vehicles the figure is thin; treat a low-confidence jam with care.
  • Expecting car counts. Traffic Flow measures speed, not how many vehicles pass. An empty road and a busy road moving at the limit read the same.

Set it up as an AI employee

An AI employee in xMap Flows can watch the stops for you and write the message. The blocks, in order:

  1. Schedule: every 15 minutes, 07:00 to 10:00, Monday to Friday, in your own time zone.
  2. My data: your table of stops, each with its address or position and a column for its line.
  3. Traffic Flow: the roads next to each stop, or within 500 m for depots.
  4. Calculated field: over_line = jam_factor >= line, so each stop is compared with its own number.
  5. Filter: keep only the stops where over_line is yes.
  6. xMap LLM (optional): one short sentence per stop, naming the busiest road and a suggestion.
  7. A message: Slack to the drivers' channel, WhatsApp, or the Email block to the dispatcher.

What lands each morning is a handful of lines, or nothing at all on a clear day. If the stops change daily, start from today's route in Google Sheets instead of a fixed table. The template Incidents near my drivers' zones does the same job for closures, and Road closures in my delivery zones runs hourly across zones; both sit well beside a congestion flow. More ideas for delivery teams are on the logistics and food delivery pages.

If you would rather talk the set-up through with someone, book a call.

Questions

What jam factor should trigger an alert?

There is no single right number. Start at 6 for stops on main roads and 4 for stops on narrow streets or loading lanes, then adjust after two weeks of readings.

Can drivers get the alert on WhatsApp?

Yes. The flow can end with a WhatsApp message, a Slack post or an email, so each team uses the channel it already reads.

Will the same jam be reported several times?

If the stop stays over its line across several runs, yes, because each run is a fresh reading. Choose a calmer timetable or word the message so a repeat is clearly an update.

Does it know how many cars are on the road?

No. It measures how fast traffic moves compared with free flow. Car counts by hour exist only for roads in the United Arab Emirates, through Regional data.

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.