Hack Day Mashup : Salesforce + Google Maps
19 Mar 2007I know it’s been done multiple times previously but I decided to play around with Google Maps a bit more.
My initial goal was to interface with our companies data in Salesforce and plot it accordingly using the Google Maps API. We have all sorts of conditions and variables attached to our data so it would (and did) make an interesting map.
*Problem: *It quickly became apparent that our salesforce account didn’t support API access. Evidently it cost more money. That being said, Salesforce does have a great API and developer community but without access to it, you’re pretty much S.O.L.
*Solution: *Even without programmatic access, I discoved that you can still create reports and export results to CSV. Nothing exciting but it did prove to be the easiest and most efficient way to get data out.
Once I had report data, I wrote a massager in python that took a CSV file, stripped out the useless information, and used Yahoo’s public geocoding service to translate addresses into appropriate latitude and longitude values.
The original plan was to build a django-based front end around it but that was scrapped in the interest of time. Instead I used a bit of php thrown together from various sources.
In the end it turned out to be a fairly straightforward (but interesting nonetheless) hack. I used a couple hours at the end of day to implement basic filtering capabilities. The data being displayed concerned sales territories, current and potential accounts as well as probability that any given account would convert. Different aspects were colour-coded and labeled.
At the end of the day I was quite happy with what I managed to produce. The Google Maps API is quite trivial to work with, the challenging part was finding worthwhile data to chart.
I’ll take some screenshots and post shortly.