Checks to see if a telephone number match can be made for this record. If it can then it returns a DirectoryLookupResult which contains details of the record within BT OSIS.
By default the matching will be performed at Surname level (i.e. a match will be allowed if the surname matches regardless of the title or forename passed in). This can be overriden by specifying the option GeneralScorer.MatchLevel.
Language:
<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="http://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">
</script>
<script type="text/javascript">
function loadIntegr8() {
// Load the TeleAppend Integr8 service
data8.load('TeleAppend');
}
function FindTelephoneNumber(record) {
/// <param name="record">data8.inputrecord. Set up the Name, Address properties before calling this method.</param>
var teleappend = new data8.teleappend();
teleappend.findtelephonenumber(
record,
null,
showFindTelephoneNumberResult
);
}
function showFindTelephoneNumberResult(result) {
// Check that the call succeeded, and show the error message if there was a problem.
if (!result.Status.Success) {
alert('Error: ' + result.Status.ErrorMessage);
}
else {
// TODO: Process method results here.
// Results can be extracted from the following fields:
// result.Result
// Contains the details found for the requested person on the telephone directory.
// The telephone number can be extracted from the TelephoneNumber field, and the
// name and address can be found from the Name and Address fields respectively.
}
}
loadIntegr8();
</script>
// NOTE: A reference to the web service must be added in Visual Studio with the URL
// http://webservices.data-8.co.uk/TeleAppend.asmx
private void FindTelephoneNumber(InputRecord record)
{
// Invoke the web service method.
TeleAppend proxy = new TeleAppend();
TeleAppendOutput results = proxy.FindTelephoneNumber("username", "password", record, null);
// Check that the call succeeded, and show the error message if there was a problem.
if ((results.Status.Success == false))
{
MessageBox.Show(("Error: " + results.Status.ErrorMessage));
}
else
{
// TODO: Process method results here.
// Results can be extracted from the following fields:
// result.Result
// Contains the details found for the requested person on the telephone directory.
// The telephone number can be extracted from the TelephoneNumber field, and the
// name and address can be found from the Name and Address fields respectively.
}
}
'NOTE: A reference to the web service must be added in Visual Studio with the URL
'http://webservices.data-8.co.uk/TeleAppend.asmx
Private Sub FindTelephoneNumber(ByVal record As InputRecord)
'Invoke the web service method.
Dim proxy As TeleAppend = New TeleAppend
Dim results As TeleAppendOutput = proxy.FindTelephoneNumber("username", "password", record, Nothing)
'Check that the call succeeded, and show the error message if there was a problem.
If (results.Status.Success Is false) Then
MessageBox.Show(("Error: " + results.Status.ErrorMessage))
Else
'TODO: Process method results here.
'Results can be extracted from the following fields:
'result.Result
' Contains the details found for the requested person on the telephone directory.
' The telephone number can be extracted from the TelephoneNumber field, and the
' name and address can be found from the Name and Address fields respectively.
End If
End Sub
Public Sub FindTelephoneNumber(surname As String, address As String)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "http://webservices.data-8.co.uk/recordset.ashx?service=TeleAppend&method=FindTelephoneNumberSimple" &
"&username=your-username" &
"&password=your-password" &
"&surname=" & surname &
"&address=" & address
If rs.MoveFirst Then
If rs.Fields(0).Name = "Success" And rs.Fields(0).Value = false Then
MsgBox "Error: " & rs.Fields(1)
Else
'TODO: Process method results here.
'All the results are available in the first row in the recordset.
'Results can be extracted from the following fields:
'Result
' Contains the details found for the requested person on the telephone directory.
' The telephone number can be extracted from the TelephoneNumber field, and the
' name and address can be found from the Name and Address fields respectively.
End If
End If
End Sub
// NOTE: The php_soap.dll extension must be enabled in the php.ini file.
function FindTelephoneNumber($record)
{
$params = array(
"username" => "your-username",
"password" => "your-password",
"record" => $record,
"options" => $options
);
$client = new SoapClient("http://webservices.data-8.co.uk/TeleAppend.asmx?WSDL");
$result = $client->FindTelephoneNumber($params);
if ($result->FindTelephoneNumberResult->Status->Success == 0)
{
echo "Error: " . $result->FindTelephoneNumberResult->Status->ErrorMessage;
}
else
{
// TODO: Process method results here.
// Results can be extracted from the following fields:
// $result->FindTelephoneNumberResult->Result
// Contains the details found for the requested person on the telephone directory.
// The telephone number can be extracted from the TelephoneNumber field, and the
// name and address can be found from the Name and Address fields respectively.
}
}