AFD Robot Web version makes using address management and bank validation with web sites easy. Both internal use and public website use are supported (although the exact use of your software will be limited by the terms of your license agreement with AFD). Automatic configuration and detection of fields is supported even when you have no control over the website layout or functions.
Include the AFD Robot script and token on the web pages that you wish to use Robot Web with, it will identify the relevant fields automatically. In most cases it’s as simple as that, depending on your product licence AFD Robot Web will recognise when you enter a postcode or bank details, and present the result to you.
For situations where you do not have access to the source code of the web page you want to use Robot with, we have browser plugin and proxy server solutions which may be suitable. Contact AFD Technical Support on 0333 433 0712 and ask for a Browser plug-in or Proxy Server integration.
To include the Robot Web Script on your website, carry out the following steps:
For example:
If possible you may prefer to host the Robot script on your own website, and in which case the apps.afd.co.uk can be removed or altered as appropriate.
If you are unable to host the afd.robot.token.js file on your own website then instead set these in the afdRobotOptions settings, see the Customising Robot section of this manual
Robot will now work automatically with address entry on that page. You can add additional configuration options to customise how Robot works; see the Customising Robot section of this manual.
To use Robot simply type the postcode, or property name/number followed by a postcode in a website and you will then be prompted to select the address to insert.
Simply select the address you wish to Insert and click the “Select This Address” button to insert it into the page.
Robot will detect your applications fields and insert the address. See Customising Robot if you wish to tweak how Robot inserts the address.
The “Find” box at the top also allows you to enter a different postcode or a fast-find search, for example “Commercial Street, Birmingham” if the address you were looking for was not found (for example you entered the wrong postcode). For more examples of what you can type in the “Find” box see the main product manual.
Robot also supports Bank Account Number and Card Number validation (subject to a separate licence fee). This enables client side validation of an account or card number entered. Using this functionality requires custom configuration of Robot to either enable it on pressing a specific “hot key” combination on the keyboard or by adding a button to a specific web-page to trigger it. When triggered, a message will be displayed to indicate if the number entered is valid or otherwise.
For details on how to configure this please see Customising Robot of this manual.
Robot also supports Email validation. This enables client side validation of an email address entered. Using this functionality requires custom configuration of Robot to either enable it on pressing a specific “hot key” combination on the keyboard or by adding a button to a specific web-page to trigger it. When triggered a message will be displayed to indicate if the email address entered is valid or not.
For details on how to configure this please see Customising Robot of this manual.
Robot also supports the use of Hot Keys. Pressing the Hot Key carries out a fast-find from your webpage allowing you to enter a fast-find string where the postcode is not known, e.g. “Commercial Street, Birmingham” press the Hot Key and have Robot look up the address for you.
For details on how to configure hot keys please see Customising Robot section of this manual.
By default Robot functions with all webpages if used as a plug-in or through a proxy. It also attempts to autodetect fields on a webpage. You can customise the way robot works to restrict it to a single page or site and, even when included on a single page, customise the fields it works with. Options are also provided to allow you to add a lookup field and button to pages you have control over.
To customise Robot you need to add a script block prior to the Robot JavaScript include in your webpage with the structure given below.
The options above are set to the defaults Robot uses and those that aren’t used by default are commented out to provide examples so this can be used as a starting point for your own configuration. Any settings you don’t wish to change from the default can be removed if you wish. The settings are described in the following sections:
The following settings alter how the Robot Dialog Appears:
Hot Keys can be enabled to allow reverse address searching from a key combination and/or bank, card and email validation.
To specify each Hot Key the following options are used:
It is vital that you specify at least one of the CTRL / ALT keys with a normal keyboard character otherwise the site will be unusable as the hot key will be triggered on normal keyboard input. It is also important to avoid keys used for normal web browser functions so please try the combination in all browsers you support prior to selection.
By default Robot auto-detects address fields on a form to insert. Postcodes will be picked up from any field; however others may need to be configured. If you need to tweak these settings, or wish to map back a nonaddress field then you can do so with these options. If using these you will wish to include the script on each web form in most cases as you may require different settings for different pages.
If you wish to add (or already have) a button on your form that you would like to trigger a fast-find address lookup or an account, card or email validation you can configure mappings from those buttons to Robot here. You can also specify the field on your form that will contain the value to lookup or validate.
In each of these settings the identifier can either be the hash symbol followed by your field name, e.g. “#fieldid”, or its name selected using “[name=’fieldname’]”. This is standard jQuery selector syntax.
Hosting Robot with no Internet access is described in the section: Local Installation of this manual. These settings are useful when using that mode:
The Robot Dialog uses the JQuery UI library to govern its look and feel. Robot will only load JQuery, JQuery UI and a JQueryUI style sheet if you are not already using one on your website. Therefore if you are using Robot with a specific webpage and are already using JQuery UI in your webpage the Robot dialog will already take on your desired look and feel.
If you are not using JQuery UI you can still change the one used by Robot by including one for this purpose (even if you use a differing JavaScript library these can co-exist for this purpose).
Add to the header of your webpage for the style sheet Robot uses by default:
However, you can also add any other theme as desired, refer to the JQuery UI docs regarding those available and how to produce custom versions if you so wish.
Add the following to the body of your webpage, at any point prior to the robot JavaScript:
The first two entries load JQuery itself and place it in noConflict mode so that it cannot conflict with any other JavaScript libraries you may be using (omit if you already use JQuery on your page). The second line loads JQuery UI.
If you are using a version of JQuery lower than 1.6 use version 1.8.24 of JQuery UI instead, i.e:
Robot uses these scripts from the widely used googleapis.com by default as these are the most likely to already be cached by the user. However you can use any other hosted versions or host them yourself if you prefer. If you load them, Robot won’t so you gain full control of those scripts. If you are using Robot through a proxy or for a number of sites and would to change the default style used you can set the jQueryUICSS property as given in the section: Local Installation of Robot (under Customising Robot).
In general Robot will be running on websites where web access is by its nature not a problem. However there are scenarios where you may wish to have Robot completely running on your own local server, for example if you have a highly restricted firewall in place, or are using a non-Internet connected network.
The steps to have this running locally are as follows:
You will need to download the robot script and its jQuery dependencies onto your own internally hosted system.
The required files are:
If you are already using jQuery and jQueryUI on your page there is no need to download those files, otherwise we recommend you download them from the following locations:
If you are already using jQuery and only require jQueryUI, if your version of jQuery is less than 1.6 please use
You will need your own Evolution Host setup with the addition of JSONP support – see separate Evolution Installation Guide.
You then need to inform Robot to use this URL rather than the default (which is AFD’s servers). You do this by setting the pceURL to the relevant path in the Robot Configuration as described in the section: Customising Robot. If you need to do this but don’t wish to change any other options the minimum to add is, prior to inclusion of the Robot JavaScript:
You will also need to reference these jQuery files in your page or ask Robot to do so. To inform Robot of the location of these files you can do this by setting the jQuery, jQueryUI and jQueryUICSS options to the ppropriate locations, i.e. as above but with these set for the root of myHost:
Note that the jQueryUI18 and jQueryUICSS18 variables are only necessary if you are using Robot which have, or may have, a version of jQuery lower than 1.6 in use.
Alternatively on your webpage when including the robot JavaScript you can also need to include the jQuery scripts and style sheet yourself if you have not already got those that are in-use on your page. Instructions for how to do this are in the section: Local Installation of Robot (under Customising Robot) of this manual (simply path to your server rather than Google’s).