Skip to main content

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. image AFD Countries.xlsx

  1. You can set default country for your search component. You can find those country codes in Country List as above. image

  2. Need to setup AFD Serial and Password for component. You can also set address field type, valid values are International or Standard. image

  3. need to set the values to display on screen. You can set these in AFD Field to map for Output Line 1 to 10. image

  4. If user need to combined street outputvalues please make sure you set true in following properties image

  5. If user want to make how many columns display on screen please set in following property: image

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.

  1. You can also set Labels for input fields on screen as below: image

  2. Then you can set selected address values to use in Flow for CRUD. You can set as below: image

  3. 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. image

All API Calls will be stored in object name called AFD API Logs: image

 

Flow Component for Email Validation with ADF Api

image image

  1. For required field = Is required? True/False
  2. For display label for input field = Label
  3. For help text icon with help info = Help text
  4. Allow user to override input value from validation = Allow override (True/False)
  5. 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.
  6. Custom Error Message for User = if value is in there this value will display as error message if email is not valid.
  7. Email Value = to assign to output variable to use in Flow.
  8. Error Code = this will return error code and you can assign to variable to use in flow.
  9. Error Message = this will return error message and you can assign to variable to use in flow.
  10. AFD Serial = this is required field and need to supply Serial number given by AFD.
  11. 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: image

 

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

image image

  1. For required field = Is required? True/False
  2. For display label for input field = Label
  3. For help text icon with help info = Help text
  4. Allow user to override input value from validation = Allow override (True/False)
  5. 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.
  6. Custom Error Message for User = if value is in there this value will display as error message if email is not valid.
  7. Phone Value = to assign to output variable to use in Flow.
  8. Error Code from AFD API= this will return error code and you can assign to variable to use in flow.
  9. Error Message from AFD API= this will return error message and you can assign to variable to use in flow.
  10. You can set default country for your search component. You can find those country codes in Country List as above.
  11. AFD Serial = this is required field and need to supply Serial number given by AFD.
  12. 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/