Route Optimization, Address Validation


Custom Software



May 2020 - Mar 2021


Sotargruppen (Sotar Group) is a Swedish company that specializes in chimney sweeping services. The term "sotare" translates to "chimney sweep" in English, a profession that is both historic and crucial in Sweden due to the prevalence of wood stove heating systems. Traditional Swedish masonry stoves, known as "kakelugn," remain popular not only for their aesthetic appeal which adds unique character to homes, but also for their efficiency in heat distribution.

Swedes love burning wood - lots of it. They've used it to heat their homes for generations. Wood stoves are notorious for being a source of particulate matter and local emissions. Yet paradoxically, on a global scale Sweden, and its neighbour Finland, are among the lowest for mean population exposure to PM2.5 emissions. So how can a country with more woodburning have fewer emissions?

The answer lies in government regulation. Most people get their chimneys swept at least once a year and every three or six years, depending on the installation, sweeps will undertake a mandatory inspection. Any faults will be reported to the owner who must act upon them. A clean chimney not only ensures safer operation but also burns fuel more efficiently, leading to reduced emissions.

Companies such as Sotargruppen are part of this regulatory framework, and carry out mandatory chimney sweeps and fire inspections for over 500,000 households.


In Sweden, sweeps are formally trained and certified and the whole system is overseen by the government. Districts are allocated to Master Sweeps who train and employ junior sweeps to service that area. In the summer, a sweep can do around 10-15 sweeps per day.

For Sotargruppen, their business challenges threefold:

Territory mapping: Sotargruppen needed a systematic way to to organize their chimney sweep operations. In the past, the company would assign a Master Sweep to look after all the customers in a certain set of zip codes, but as cities grew and demographics changed, this static allocation of sweeps to fixed zip codes stopped working. Some zip codes had too many addresses for a sweep to manage while others had too few.

Address validation: The addresses of Sotargruppen's 500,000 customers were stored in many different spreadsheets across several computer systems. Even if there was a way to consolidate those addresses into a single spreadsheet, many of them were outdated or incorrect, so there was no way to easily view these addresses on a digital map or get driving directions to them. This was because many of the sweeps used Google Maps or similar tools to check the location of their next appointment, and without accurate addresses, they risked wasting time by going to incorrect locations or missing their appointments entirely.

Route planning: Once a sweep was assigned a territory, it was up to him to plan his routes for the week. Even if all the addresses in his territory were valid, there was no easy way for him to determine the optimal sequence of customer visits for any given day without the aid of a route optimization tool.


Working together with Sotargruppen's operations and customer service teams, Afi Labs built a territory mapping and address validation tool to help Sotargruppen plan and schedule chimney sweeping appointments, correct bad addresses and partition a service area into distinct zones that can be served by a master sweep and his team. Here's how it works.

The tool allows users to upload batches of customer addresses, which are then converted into geographic coordinates through the Mapbox geocoding API. For example, the address "Rosetten 3, 314 94 Landeryd, Sweden" is translated into the coordinates "13.269699, 57.080981". However, if an address is matched with multiple locations, it is marked with a question mark icon. Users can click this icon to open an address validation window, where they can view all possible locations on a map interface and select the correct coordinates for the address.

After validating all the addresses, Sotargruppen can utilize the territory mapping tool to outline a polygonal boundary around clusters of addresses, thereby designating them as a territory. Each territory is assigned a unique color and the number of addresses within each territory is clearly displayed next to its name, enabling users to easily determine the number of sweeps needed to service it.

After Sotargruppen finishes mapping out territories for a particular region, customer addresses for each territory are exported to Nordic Routing, a third party route planning app.


With the territory mapping and address validation tool, Sotargruppen can now locate their customer addresses on map and with this information, divide their customer base into distinct territories to be served by different groups of chimney sweeps. More importantly, the company finally had a way to fix bad addresses, which completely eliminated the chances of a chimney sweep visiting the wrong house or a non existing address. This saves time and helps their chimney sweeps stay happy and productive on the job.