Setup a consultation
Recent Posts
Geolocation is a very handy field type in Salesforce that can be leveraged to specify the location of any objects such as Accounts, Contacts, Leads and any custom objects that represent physical locations such as Warehouses, Factories, stores and more.
Geolocation in principle is a compound field that comprises ‘Latitude’, ‘Longitude’ and counts towards Org limits as three fields where one is used for internal use.
Geolocation Fields are generally available in both Salesforce Classic and Lightning Experience and are available in all editions including Salesforce1.
Admins can use the Geolocation custom field type to create location fields on any objects in Salesforce.
With Summer 16 release, auto-populating geocodes for addresses on Accounts, Contacts and Leads are made possible in Salesforce through geocode clean rules.
Latitude and Longitude data can also be populated in Salesforce through data import tools such as wizards and Data Loader.
Developers can also leverage SOQL, APIs, Workbench or any Geo-Coding service to auto-populate Latitude and Longitude information on records based on their address information.
o Calculating the Distance to the customer or prospect location from the Company Warehouse to decide on the transport costs
o Plotting the customer or prospect locations on maps in order to decide the travel route of the Field Techs
o Tracking the travel path of Sales Reps or Service staff real time (implemented in App-exchange apps such as Tablet-20)
o Defining case resolution time or SLAs based on Client location and availability of workforce in the locality.
Being a compound field, Geolocation field cannot be used directly in the below mentioned areas. We need to use the individual field components instead.
o Data updates, import and export
o Search
o Apex
o Bulk Queries
o Salesforce can automatically populate or update Geolocation information on Accounts, Contacts, Leads and Work orders only (through geocode clean rules). For all the other objects we have to use a geocoding service or APIs or SOQL.
o They are not available in Schema Builder, Dashboards and they are not supported in custom settings
o They can’t be used in Workflow Updates and Approvals if they are filter based. They can be used in formula based Workflow updates and Approvals though.
o Geolocation fields and Latitude and Longitude of the Standard Addresses are not supported in Salesforce to Salesforce
o While using the Geolocation function in SOQL queries, the Geolocation field should always precede latitude and longitude coordinates. For example, DISTANCE (store_location__c, GEOLOCATION (22.345,-98.624), 'km') is correct while DISTANCE (GEOLOCATION (22.345,- 98.624), store_location__c, 'km') isn’t.