AFD Address Validation Components
Flow Component for Address Validator with ADF Api
First make sure you have setup credentials for AFD API. You can do that by going to Setup -> Custom Settings -> Click manage next to Address Config. Then click New default organization level. Then you will need to add Serial, Password and maximum response. Maximum response is how many results you want to show when you searching for address.
After you have setup credentials, you need to make sure that you have updated/imported country list into AFD Countries Object. AFD Countries.xlsx
-
You can set default country for your search component. You can find those country codes in Country List as above.
-
Need to setup AFD Serial and Password for component. You can also set address field type, valid values are International or Standard.
-
need to set the values to display on screen. You can set these in AFD Field to map for Output Line 1 to 10.
-
If user need to combined street outputvalues please make sure you set true in following properties
-
If user want to make how many columns display on screen please set in following property:
Sample result and fields from AFD Response for International Field Type "@value": "1", "Postcode": "11219-5395", "PostcodeFrom": "", "Key": "004814709462150", "List": "11219-5395 Manhatten Incense Works, 6215 14th Ave, Brooklyn, NY", "CountryISO": "USA", "Address1": "Manhatten Incense Works", "Address2": "6215 14th Ave", "Address3": "Brooklyn NY 11219-5395", "Address4": "", "Address5": "", "Address6": "", "Address7": "", "OrganisationName": "Manhatten Incense Works", "Department": "", "SubBuilding": "", "Building": "", "Number": "6215", "DependentThoroughfare": "", "Thoroughfare": "14th Ave", "Locality": "", "Town": "Brooklyn", "Principality": "", "Region": "NY", "Cedex": "", "Product": "AFD ZipAddress", "Country": "United States of America"
So example of data you want to display and store in your system. AFD Field to map for Output Line 1 = OrganisationName AFD Field to map for Output Line 2 = Address1 AFD Field to map for Output Line 3 = Address2 AFD Field to map for Output Line 4 = Town AFD Field to map for Output Line 5 = Region AFD Field to map for Output Line 6 = Postcode
You can map as much as up to 10 fields.
-
You can also set Labels for input fields on screen as below:
-
Then you can set selected address values to use in Flow for CRUD. You can set as below:
-
If you want to return crown dependant countries like Isle of Man, Jersey and Guernsey to not return the United Kingdom as the country but instead the Island. Please select true for Crown Country Enabled.
All API Calls will be stored in object name called AFD API Logs:
Flow Component for Email Validation with ADF Api
- For required field = Is required? True/False
- For display label for input field = Label
- For help text icon with help info = Help text
- Allow user to override input value from validation = Allow override (True/False)
- Display Validate button = if this is true validate button will appear and validation will only do when user click on button. If this is false validation will happen on blur event.
- Custom Error Message for User = if value is in there this value will display as error message if email is not valid.
- Email Value = to assign to output variable to use in Flow.
- Error Code = this will return error code and you can assign to variable to use in flow.
- Error Message = this will return error message and you can assign to variable to use in flow.
- AFD Serial = this is required field and need to supply Serial number given by AFD.
- AFD Password = this is required field and need to supply Password given by AFD for Serial.
All API Calls will be stored in object name called AFD API Logs:
Flow Component for Phone Validator with ADF Api
First you need to make sure that you have updated/imported country list into AFD Countries Object. AFD Countries.xlsx
- For required field = Is required? True/False
- For display label for input field = Label
- For help text icon with help info = Help text
- Allow user to override input value from validation = Allow override (True/False)
- Display Validate button = if this is true validate button will appear and validation will only do when user click on button. If this is false validation will happen on blur event.
- Custom Error Message for User = if value is in there this value will display as error message if email is not valid.
- Phone Value = to assign to output variable to use in Flow.
- Error Code from AFD API= this will return error code and you can assign to variable to use in flow.
- Error Message from AFD API= this will return error message and you can assign to variable to use in flow.
- You can set default country for your search component. You can find those country codes in Country List as above.
- AFD Serial = this is required field and need to supply Serial number given by AFD.
- AFD Password = this is required field and need to supply Password given by AFD for Serial.
Configuration and CSP
Add CSP Trusted Sites: https://apps.afd.co.uk
Add CORS https://apps.afd.co.uk
Reference
https://www.afd.co.uk/developers/
https://www.afd.co.uk/developers/jquery-manual/