Once we confirmed the geographic bounds of the Districts using Google My Maps, we moved on to developing the system that would allocate individuals to each district.
We needed to ensure the points on the map were converted to a dataset that we could easily work with in Apex code and stored against each District record in Salesforce.
The Apex Batch runs each night for Contacts and Accounts that were modified in the last 24 hours or have an Address, but no District.
Each Contact and Account has a Lookup field to the District record, along with a related list of District Allocations so we can keep track of changes over time.
We also group several districts into a Region and you can see that each Contact and Account inherits the Primary Region from the District record.
This system has proved to be very effective at helping SU Australia’s donors feel more connected to the mission that is happening locally to them. We use it to segment communications and marketing, invite people to local events and connect people with their local District Manager.
- Drawing up the geographic bounds in Google My Maps.
- Converting the map data into a dataset that Salesforce can work with.
- Building out the system in Salesforce so that every Contact and Account with a mailing address is correctly allocated to a district.
- Ensuring that there is a history of allocations to see how people migrate over time.