Geolocate your customers close to you

Sous-titre

L'auteur

Profil ProSite personnel

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

I. Introduction

Image non disponible

Salesforce just announced during the Summer ‘16 release that is now possible to geolocate your customers close to you.

For example, you can geocode and know the distance between two points in the aim to see your customers which are less than 50 miles from you.

This is the perfect tool for your sales and marketing team to find prospects.

How it works? To enable this feature, you will have to use SOQL queries but all of this is a cinch with Automatic Geocodes for Address.

II. Requirements

To test this feature, you will need a developer environment.

If you don't have one of these yet, click on this link right now to sign up and join the adventure, it's free !

III. It is now easy to geolocate your customers close to you

There are two ways to use this new feature : a SOQL query or a custom field.

III-A. SOQL query

You can geolocate your customers thank to a SOQL query by using the method DISTANCE() and GEOLOCATION().

This is a query's example :

 
Sélectionnez
1.
2.
3.
SELECT Name, shippingCity, shippingState, shippingCountry, shippingLatitude, shippingLongitude
FROM Account
WHERE DISTANCE(shippingAddress, GEOLOCATION(37.79340, -122.39420), 'mi') < 50

III-B. Custom field

Moreover, you can create a custom field to use it in your reports and see customers who are close to you.

The custom field has to be a formula which return an integer and looks like that :

 
Sélectionnez
1.
DISTANCE(BillingAddress, GEOLOCATION($Organization.Latitude, $Organization.Longitude), 'mi')

The parameter ‘mi’ means ‘miles’ but you can use ‘km’ to calculate with kilometers.

IV. Summary

In this article, you have learnt how to geolocate quickly and easily your customers according two ways : a SOQL query or a custom field.

This is a great news for your sales and marketing team.

So, don’t waste your time, test it and develop an application !

V. Useful resources

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+   

  

Les sources présentées sur cette page sont libres de droits et vous pouvez les utiliser à votre convenance. Par contre, la page de présentation constitue une œuvre intellectuelle protégée par les droits d'auteur. Copyright © 2016 Aurélien Laval. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents, images, etc. sans l'autorisation expresse de l'auteur. Sinon vous encourez selon la loi jusqu'à trois ans de prison et jusqu'à 300 000 € de dommages et intérêts.