One of the parameters you may use for territory planning is proximity of your account managers to their accounts. Having account managers close to their accounts allows you the luxury of high touch service to your customers while limiting the travel costs associated with it. The proximity helps the account managers build a more personal and stronger relationship with the customer.
A few considerations you may have while doing territory planning and account allocations:
In this article we explain how to use Geocodes to calculate distance between accounts and identify the nearest account. You can extend it to find accounts within a certain radius and other use cases.
Setting up distance calculation
Calculating distance using the Account address requires some steps:
Go to setup > “Data Integration Rules”.
These are rules that update address longitudes and latitudes using geocode service. You will need to activate data integration rules for shipping/billing address of accounts.The rule names are “Geocodes for Account Billing Address” and “Geocodes for Account Shipping Address”. Here is more information on activating a data integration service for a data service.
Once the rules are activated, the service updates the longitude and latitude fields on the Account record with appropriate values once the address fields are updated. The external service updates the record asynchronously. This means, when you insert or update an account address, the longitude/latitude fields on the Account object in that transaction are either null or old values before update. The new longitude/latitude values get updated in a separate transaction asynchronously. By default, your trigger will not see the updated fields and the shortest distance calculation will not work.
To make it work, you have to take care of a few things mentioned below:
Geocodes allow you to use address information to codify any distance based logic in your system. Geocode rules are available for Account billing/shipping address, Contact mailing address and Lead address. For more information, you can refer to this article.