Prerequisites
Before you configure Address Validation, you need to obtain the following for Spectrum OnDemand:
- Username and password
- Access token URL
- Validate Address URL
- Geocode Address URL
Procedure Overview
Configuring Address Validation for a repository consists of:
- Defining one set of address attributes in the repository's profile that will be validated as a set, as one address.
- For each repository that uses that profile, you can enable Address Validation for the set of address attributes specified in the profile.
Configuration Procedure
To configure Address Validation:
- Stop EnterWorks Services on All Servers
-
Edit shared configuration properties. The shared configuration
properties for Address Validation are the following:
####################################################################### # Spectrum OnDemand Authentication ####################################################################### # spectrum.on.demand.access=<access-token> spectrum.on.demand.accessTokenURL=<token-url> spectrum.on.demand.validateAddressURL=<validate-url> spectrum.on.demand.geocodeAddressURL=<geocode-address-url> ############################################################################### # Update the following Address Attribute Names as defined in your Data Model for given profile name # To use in multiple repositories, copy keys and rename with each profile where address validation is required # uncomment following and rename <ProfileName> with name of profile of the repository where address validation is required. # Profile names cannot contain spaces or special charcters ############################################################################### # #<name-of-first-repository> Repository <profile's-name>.address.line.attribute.name=<name-of-the-address-first-line-attribute><profile's-name>.address.line.2.attribute.name=<name-of-the-address-second-line-attribute><profile's-name>.city.attribute.name=<name-of-the-address-city-attribute><profile's-name>.state.attribute.name=<name-of-the-address-state-attribute><profile's-name>.zip.code.attribute.name=<name-of-the-address-zip-attribute><profile's-name>.country.attribute.name=<name-of-the-address-country-attribute> #Optional if using NoGeocode <profile's-name>.longitude.attribute.name=<name-of-the-address-longitude-attribute><profile's-name>.latitude.attribute.name=<name-of-the-address-latitude-attribute> #<name-of-second-repository> Repository <profile's-name>.address.line.attribute.name=<name-of-the-address-first-line-attribute><profile's-name>.address.line.2.attribute.name=<name-of-the-address-second-line-attribute><profile's-name>.city.attribute.name=<name-of-the-address-city-attribute><profile's-name>.state.attribute.name=<name-of-the-address-state-attribute><profile's-name>.zip.code.attribute.name=<name-of-the-address-postal-code-attribute><profile's-name>.country.attribute.name=<name-of-the-address-country-attribute>
spectrum.on.demand.access
=<encoded-username-and-password>
Use any base64 encoder to encode the Spectrum OnDemand username and password in base64, in this format:
UserName:Password
. For example, if your user name isMyUsername
and your password isPassword1
you would encode this string in base64:MyUsername:Password1
- Set each of the URL keys to the appropriate service URL.
spectrum.on.demand.accessTokenURL= spectrum.on.demand.validateAddressURL=
- If you are using Spectrum OnDemand's Geocoding capabilities, also set:
spectrum.on.demand.geocodeAddressURL=
- For each profile you want to configure, edit the following settings. If
they do not already exist for the profile, add them. Profile names
cannot contain special characters or spaces.
#<name-of-repository> Repository <profile's-name>.address.line.attribute.name=<name-of-the-address-first-line-attribute><profile's-name>.address.line.2.attribute.name=<name-of-the-address-first-line-attribute><profile's-name>.city.attribute.name=<name-of-the-address-city-attribute><profile's-name>.state.attribute.name=<name-of-the-address-state-attribute><profile's-name>.zip.code.attribute.name=<name-of-the-address-zip-attribute><profile's-name>.country.attribute.name=<name-of-the-address-country-attribute>
- Spectrum OnDemand's Geocode feature validates the longitude and latitude
of the address. If you are using the Geocode feature, add or edit the
following attributes. If you are not using Gecode, leave the settings
empty.
#Optional if using NoGeocode <profile's-name>.longitude.attribute.name=<name-of-the-address-longitude-attribute><profile's-name>.latitude.attribute.name=<name-of-the-address-latitude-attribute>
- Here is an example of the completed Address Validation shared
configuration properties, except for the token value:
####################################################################### # Spectrum OnDemand Authentication ####################################################################### # spectrum.on.demand.access=<put-token-here> spectrum.on.demand.accessTokenURL=https://token-amer-staging.spectrum.precisely.com/security/jwt?mins=10 spectrum.on.demand.validateAddressURL=https://token-amer-staging.spectrum.precisely.com/rest/ValidateMailingAddressRecommendUSCAN/results.json spectrum.on.demand.geocodeAddressURL=https://token-amer-staging.spectrum.precisely.com/rest/GeocodeUSAddress/results.json ############################################################################### # Update the following Address Attribute Names as defined in your Data Model for given profile name # To use in multiple repositories, copy keys and rename with each profile where address validation is required # uncomment following and rename <ProfileName> with name of profile of the repository where address validation is required. # Profile names cannot contain spaces or special charcters ############################################################################### # #Location Repository Location-profile.address.line.attribute.name=Address Line 1 Location-profile.address.line.2.attribute.name=Address Line 2 Location-profile.city.attribute.name=City Location-profile.state.attribute.name=State Location-profile.zip.code.attribute.name=Zip Code Location-profile.country.attribute.name=Country #Optional if using NoGeocode Location-profile.longitude.attribute.name=Longitude Location-profile.latitude.attribute.name=Latitude #Customer Repository Customer-profile.address.line.attribute.name=Street Address 1 Customer-profile.address.line.2.attribute.name=Street Address 2 Customer-profile.city.attribute.name=City Customer-profile.state.attribute.name=State Customer-profile.zip.code.attribute.name=Postal Code Customer-profile.country.attribute.name=Country
- After you have finished editing the shared configuration properties, Start EnterWorks Services on All Servers.
- Log into the EnterWorks Classic UI.
- Edit the attribute properties for each repository you want to configure for
Address Validation:
- Open the Feature bar, right-click the repository name, right-click Edit, and select Attribute Properties. The repository's attribute properties will be displayed.
- Edit the attribute you selected for the profile's
<profile's-name>.address.line.attribute.name
setting (the first line of the address):- Calculation Label:
Validate and Geocode Address
- Click the value for Calculation URL to open the Attribute
calculation URL Setup editor.
- Calculation Ind: Open as Dialog
- Calculation URL:
addressValidator.jsp
- Click OK.
- Calculation Label:
- When you are finished editing the attribute, click Save.
- After you have finished editing the attribute properties for all the repositories you are configuring, Clear the Cache.
- Verify that Address Validation has been correctly configured by opening a repository you have configured for address validation, opening a record, and editing a configured address attribute value.