This document contains all the combinations of match key fields for data entry and lookup.
The <matchkeys> node contains the definitions of the keys to match data on depending upon which fields are inputted. Looking at the example below
<input field1="Company" field2="Contact" minmatchscore="0">
<key key1="mkOrgName1" key2="mkName1" />
<key key1="mkOrgName1" key2="mkOrgName2" />
<key key1="mkName1" key2="mkName2" />
</input>
If the fields that had been used as input were Company and Contact, then these are the keys that would be used to match the data, i.e. the 3 sets of keys contained within the <input> node. Also note here that, if a combination of inputs is used for which there is no definition in the match keys settings file, then the closest possible combination is picked. Using the example above, if the input fields used were Company, Contact and Telephone, but there was no combination in the settings file that matched this, then the above definition using just Company and Contact would be used, as it is the closest fit.
As well as being dependent on the input data, the choice that the web service makes on which keys to use also takes into account what fields have been mapped in the data source being queried. For example, if Company and Contact were submitted to the web service to query a data source that only had a company mapping, with no name data, then the above definition would not be used – there is no point as there is no ‘Contact’ data to query. Instead, it would treat the query as if only the Company data had been submitted, and select a set of match keys to use accordingly.
Currently, the fieldX attributes (where X is an integer) can have the following values –
FirstNames
LastName
Contact
Company
Address1
Town
Region
Postcode
Country
Email
Telephone
CustomField1-9
An important point to note here is that, whilst the fields Company through to CustomField1-9 in the list above have a one to one correspondence between data submitted to the service vs. input fields looked for in the match key settings file, there is a special case with the first 3 name related fields if submitting the ‘FullName’ data element to the web service, which is explained below.
If a single word is submitted as a ‘FullName’, the web service will always parse this as a ‘LastName’, and so will use ‘LastName’ to look for keys to use in the match keys settings file. If however multiple words are submitted as a ‘FullName’, these will be parsed into their first and last name components, and so the ‘Contact’ input term will be used to determine the keys to use. In order to make use of the FirstNames input, first name data has to be specifically submitted to the web service using the ‘FirstNames’ attribute. Note that calls to the web service are described in detail further on in this document.
To help with determining what set of match keys were used with a query, the input fields that were parsed and used to select the keys from the match keys settings file are returned in the result of a query to the web service for each data source. For more information on the format of this, please refer to the findIT S2 Web Service section of this document, specifically the FindRecords and FindMultiRecords references.
You will also notice that each <input> node contains a minmatchscore attribute which specifies the minimum score required by a match to be returned as a result when begin searched on using the input in question. This attribute MUST be specified for each key, and as a default is set to zero, which means all results will be returned.