When it comes to online forms, user-data entry can lead to some critical errors if the data is not cleaned and verified before it is allowed to reach the next step. Whether that next step is mailing a package or creating a map, the results rely heavily on the accuracy of the address provided by the user. Confirming the accuracy of this crucial piece of data is not only essential for seamless business operations, but also for enhancing customer satisfaction and trust in your services.
Our DOTS Global Address Complete service is a real-time address autocomplete tool that combines the power of address suggestion with validation, ensuring that no errors make it past your customer forms. In this blog, we will take a closer look at how you can customize your response to meet your business needs.
Javascript options
To help you integrate the service, you can get started with A Quick Guide to Global Address Complete. As part of the final steps, you will need to define custom options in your JavaScript code. This will look like:
var Options = {option1: value1, option2: value2, …}
Let’s look at the possible options and how to leverage them to get the response that serves your business best.
Option | Default | Values | Description |
key | No default | string | The Custom Key provided to you. This license key is domain-restricted, so it will only work at the domain(s) you specify to us. This makes it so that no one can copy this key for personal use using browser inspection tools. |
isTrial | true | true/false | Determines if executing Global Address Complete against our trial or live environment. This is important to note because your Custom Key will only work at the environment it is configured to. Your trial key will only work at the trial endpoint, and the production key will only work at the live endpoint. |
setBiasToIP | false | true/false | Sets the starting location from which results should be return from to the IP location of the user. For example, if the user is in Santa Barbara, CA, USA, as the address is typed, the suggested addresses returned are first from there. |
setCountryByIP | false | true/false | Limits the results returned to only be in the country of the user. |
countries | No default | list of strings | Limits the suggestions to only specific countries. For example, to restrict suggestions to Canada, Russia and Sweden:
countries: {codesList: “CAN, RUS, SWE”} |
Validate | true | true/false | Sets the selected United States addresses to be returned validated against our DOTS Address Validation US – 3 service. If you have the need to validate international addresses coming back from the suggestions, we advise pairing the Global Address Complete call with a secondary call to DOTS Address Validation – International. |
languagePreference | en | Various | Two letter ISO codes for the language preferred. |
prompt | false | true/false | Turn on additional prompts based on conditions of the suggestions, such as: “No Results Found” or “Keep Typing…” |
maxItems | 7 | Integer | The maximum number of items to return in the dropdown. |
Tailoring your business outcomes
By understanding these options, you can customize your results to match what your business needs. Whether it involves:
- refining responses by country to exclude irrelevant locations
- prioritizing results based on the user’s IP address for familiarity and ease of selection
- capping the number of displayed items in a dropdown to match your website’s design and accessibility standards
- ensuring results are presented in the preferred language for you and your customers
- or employing all of these choices
As you see – you have the flexibility to optimize your outcomes.
We are here to help
We are here to help ensure that your user data is accurate and reliable every step of the way. If you encounter any difficulties, please don’t hesitate to contact us.