Geocoding Workflow Plugin for Dynamics 365

Overview of Geocoding in Dynamics 365 with Bing Maps or Azure Maps

Geocoding is the process of determining latitude and longitude for a location based on an address. Having latitude and longitude set on a record in an entity such as Leads or Accounts is a requirement for territory management or Advanced Find mapping for EasyTerritory.

The Geocoding plugin for Dynamics 365 (D365) is a workflow activity for workflows. The plugin reads address values from a record and returns latitude and longitude values which can be used to update the record in a subsequent step. Typically, you would configure such a workflow to trigger on newly created records or when a record’s address information changes.

EasyTerritory leverages either Microsoft Bing Maps or Azure Maps for geocoding.  Both Bing Maps and Azure Maps are world-class basemaps that produce highly accurate geocode results.

Setup Steps

  1. Install the EasyTerritory managed solution into D365.  You can get the EasyTerritory managed solution from Microsoft AppSource.
  2. Once the EasyTerritory managed solution is installed, create a new workflow.
  3. Next, configure the properties on the Geocode Step.
    EasyTerritory URL: This is the URL to your EasyTerritory instance.  Example: https://apps.easyterritory.com/{INSTANCE GUID}/{INSTANCE TYPE DEV,TEST, or APP}
    Bing Key: This can be a Bing Maps or Azure Maps key.  For more details on getting a key, click here.
    Street Address: Use the Form Assistant to set the address field. Example: address1_street1
    City: Use the Form Assistant to set the address field. Example: address1_city
    State: Use the Form Assistant to set the address field. Example: address1_stateprovince
    Zip: Use the Form Assistant to set the address field. Example: address1_postalcode
    Country:  Defaults to ‘US’ or use the Form Assistant to set the address field. Example: address1_country
    Encrypted Username: Deprecated along with the Lookup properties.
    Encrypted Password: Deprecated along with the Lookup properties
    LookupMap: Deprecated use either the Location Lookup or the Postal Code Lookup plugin
    LookupLayer: Deprecated use either the Location Lookup or the Postal Code Lookup plugin
    LookupLayerNameField: Deprecated use either the Location Lookup or the Postal Code Lookup plugin
  4. Next, create an update record step. Note the name of the Previous step “Geocode Account”
    Next, find the Process ‘Local Value’ in the Form AssistantNext, set the Latitude and Longitude fields.
    Latitude & Longitude: Used for Latitude and Longitude fields that are either ‘Floating Point’ or ‘Decimal Number ‘ data type.
    LatString & LongString: Used for Latitude and Longitude fields that are ‘Single Line of Text’ data type.

    Finally, there are a number of other fields returned.

    Quality: How accurate the geocode is. This should be a ‘Single Line of Text’ field. The Bing Geocoding service returns the following values: High, Medium and Low. The EZT service returns Best, Good, Fair, and Poor. Bing “High” confidence values map to “Best” or “Good” based on secondary information, “Medium” maps to “Fair”, and “Low” to “Poor”.

    Match Address, Match City, Match County, Match State, Match Country, Match Full Address, Match Postal Code (Zip 5 and Zip +4), Match Zip 5 (Zip 5 Only), Match Zip 4 (Zip +4 Only): These should all be ‘Single Line of Text’ fields. These fields are the standardized (cleaned-up) values.

  5. After activating your geocoding process, you’ll need a way geocode all existing records.
    – If you have a low number of records, you can simply do an ‘Advanced Find’ and run the workflow ‘on demand’.
    – If you have thousands of records to geocode, use our Bulk Operation Utility.
  6. After your data is geocoded, create an ‘Advanced Find’ to map records.  Follow these steps to build your ‘Advanced Find’ view.