Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For the geocoding feature to work, you have to create an account with TomTom (https://developer.tomtom.com/user/register) and get a consumer API key for the Search app. Please check the TomTom documentation regarding the number of free API calls per day and the information about purchasing additional credit for the TomTom service.

2. Enable Geocoding (For Enterprise Users)

If you are an Enterprise user, you should enable geocoding according to the following instructions, but if you are a Cloud user, please, contact us at support@flex.bi and we will do it for you.

Geocoding is used to link customer addresses to longitude and latitude values. 

  • Add the following code to your config/eazybi.toml file:

    Anchor
    step2
    step2

    Code Block
    [[regular_jobs]]
    job = "Geocoding.perform"
    every = "24h"

    Specify a new regular job Geocoding.perform and the frequency for the execution of this job. In the code example below, a frequency of 24h is set. You can specify a value that corresponds to your needs.

  • Add the following code to the [general] section of your config/eazybi.toml file:

    Code Block
    tomtom_api_key = "<your_tomtom_api_key>"
    tomtom_base_URL = "api.tomtom.com"
    tomtom_version_number = "2"


    In the code block above, you have to replace <your_tomtom_api_key> with your actual TomTom API key. Also, you have to check if the defined version is the current version of the API.

  • Define the following plan parameters in the Update Account section's Plan parameters box of your flex.bi account:

    Code Block
    enable_geocoding = true
    min_address_precision = 8
    min_address_similarity = 0.85

    You can also use the following plan parameter, to enable debugging mode and log geocoding errors:

    Code Block
    debug_geocoding = "error"


  • min_address_precision is the minimum geocoding result precision that is required to save the latitude and longitude values. The default value recommended value is 8, but you can increase it, to make the rules for result acceptance more strict, or decrease it, to make the rules less strict. The precision is a value returned by the TomTom service together with the geocoding results, which specifies how precise are the returned results based on the TomTom algorithm.

  • min_address_similarity is the minimum similarity between the original address and the address returned from the geocoding service. The default value recommended value is 0.85, but you can increase it, to make the similarity rules more strict, or decrease it, to make the rules less strict. The similarity is a value calculated by comparing the address saved in flex.bi and the results returned from the TomTom geocoding service.

...

  • No geocoding data is stored for this customer/supplier in properties Customer latitude and Customer longitude (or Supplier latitude and Supplier longitude);
  • The customer/supplier it is marked using Geocoding needed property value -1;
    • value -1 means that there was an issue with the particular customer/supplier and you have to do something about it;
    • value 1 means that this customer/supplier is scheduled for geocoding;
    • value 0 means that geocoding for this customer/supplier was successful and latitude and longitude data is stored in the system. 
  • For troubleshooting purposes, the resulting address is stored in the Geocoding address property;
  • For troubleshooting purposes, the resulting address precision is stored in the Address precession property;
  • For troubleshooting purposes, the resulting address similarity is stored in the Address similarity property.

...