
Integrating Salesforce addresses with Google Maps on your mobile phone
Have you ever futzed around trying to copy addresses from within Salesforce to Google Maps to figure out where you need to be next? It can be incredibly frustrating.
One of the great things about the Salesforce platform is that there are an infinite number of little features that can make life easier for users. Take for example, a little feature called the Compound Address data type and let’s see how you can use it to make life simpler and easier for your road warriors.
Compound fields group together multiple elements of individual data types, such as numbers or strings, to represent complex data types such as a location or an address. Compound fields are an abstraction that can simplify application code that handles the values, leading to more concise and understandable code. Compound fields are accessible as a single, structured field, or as individual component fields. The values contained within the compound field and the values in the individual fields map to the same underlying data in Salesforce.
Standard addresses – addresses built into standard Salesforce objects – are accessible in SOAP and REST APIs as an Address, a structured compound field that combines several address fields. Using API 30.0 and later, you can directly access the Address data type using both SOAP and REST APIs. Geolocation fields are also accessible as Location. Location is another compound field that combines latitude and longitude. You can only access these compound fields using the SOAP or REST APIs. Also, they are read-only. If you want to edit the field values, use the individual field components.
Any record with an address in Salesforce can be displayed on Google Maps. So in terms of Standard objects, that’s Leads, Accounts, Contacts and Users.
Access the Address data type on a mobile app using SOAP or REST APIs.
Integrate that Address with Google Maps and voila! Suddenly your mobile users can use that address to open up directly in Google Maps from inside the mobile app that they are using. No need for copying and pasting addresses from Salesforce to Google Maps. Your road warriors more productive now. And much safer, without having to juggle between multiple applications on their mobile phones!
That’s exactly what we’ve done in the TimeTracker mobile app. Field Service technicians can view the address of their next assignment within the Time Tracker app on their mobiles. Clicking on the red location icon, opens up the address on Google Maps or on Apple Maps. It’s really that simple!