Using Alteryx to Map Sales Territories

Have you ever needed to create sales regions? I am going to show you in this blog how easy it is to create sales regions using Alteryx.  Typically a team will do a pencil exercise and allocate stores and then hand it off to a GIS team to map the regions to ensure they make sense. In my fictitious scenario I am mapping the sales regions of Giuseppe Stores so that area managers know the territories they cover.

My dataset is a list of stores with a centroid point and the regions that have been allocated via a pencil exercise, from the list of stores I will create sales regions utilising the tools in Alteryx.

Giuseppe Stores Data Input

To turn these points into the polygons of the sales regions we wish to generate, is quite simple and can be done using a trade area tool. The key is to generate non overlapping trade areas or voronoi polygons.

Non Overlapping Trade Area/Voronoi Polygons

In the trade area tool configuration window you just need to tick Eliminate Overlap and specify the radius to a high enough value. This will generate non overlapping trade areas as seen above however as you can see they don’t quite yet look like sales regions yet.

Trade Area Tool Configuration

The key is to use the summarise tool which is part of the Transform Category in Alteryx designer but has the ability to perform a number of spatial functions. In this instance we need to use the spatial function of combine and grouping by the regions field. This will combine all the spatial objects by all the groups of the regions.

Combined Regions (Summarize Tool)

The numerous trades areas have now all be combined however as you can see they extend into the sea plus into other countries. The next step will be to clip the regions to the extent of the UK, to remove the excess areas of the sales regions that I am generating.

I simply downloaded a shapefile of the UK and brought this into my Alteryx workflow. I then appended the shapefile to my regions. Using the Spatial Process tool I then selected create an intersection object, this will create a polygon field of the areas of the UK where both polygons overlap. Therefore cutting all the areas that extend to the sea and other countries outside of the UK.

Clipped Sales Regions

As you can see now the regions are clipped to the UK extent and look sensible and can now be turned in a thematic map in order to be presented.

Due to the odd shape of the UK I had to perform some manual inputs to stop regions crossing rivers, or the sea between Northern Ireland and Scotland. I did this by using the Map Input tool and digitised some fake stores to push the boundaries of the regions, when I generated the non-overlapping areas.

Digitsing Map Input Tool

For speed when making this blog I digitised lines and named them similar to the region names then I used Poly-Split tool to break the line into a series of points and then used a union tool for my input of stores and my digitised points together before I generated the voronoi polygons. 

Poly-Split Line to Points

While I would recommend an approach of drawing lines for the manual interventions, when going through multiple iterations of generating sales regions. When building the final sales regions and especially if the output regions is being outputted into SQL which requires the geographies not to be broken, then I would digitise using points and check you don’t have any multi-split or broken polygons in the regions you are producing.

Sales Regions for Giuseppe Stores

By putting the regions into Tableau and creating a thematic map you can see that I have successfully generated sales regions from an input of points that can be presented back to the area managers to show them what territories they cover.

Hope you find this blog helpful and seen how easy mapping regions are in Alteryx. Please leave a comment or reach out to me on Twitter @JosephSerpis or on the Alteryx Community and Linkedin.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s