Installation guide
Using custom database queries in Call Classifier rules 26-21
Chapter 26: Using the Call Classifier
Wave Global Administrator Guide
Creating a SQL stored procedure
This section describes how to create a stored procedure using Microsoft SQL Server for use in
a Call Classifier rule. For detailed information, see the Microsoft SQL Server documentation.
• Use a tool such as Microsoft SQL Query Analyzer to open your SQL database and add a
new stored procedure.
• Your stored procedure must have a single input parameter that corresponds to the DID,
Caller ID Name, Caller ID Number, Call Notes, Account Code, Custom Data, or Skill
being passed by the Call Classifier. The stored procedure must return a named recordset.
In the following example, the stored procedure is named “myStoredProcedure”, the input
parameter is called “@CallerID”, and the returned recordset field is called “Last Order”.
CREATE PROCEDURE myStoredProcedure
@CallerID as varchar(15)
AS
BEGIN
SELECT TableName.CompanyName + TableName.LastOrder as "Last
Order"
FROM TableName
WHERE TableName.PhoneNumber = @CallerID
END
Creating a Microsoft Access query
This section describes how to create a Microsoft Access query for use in a Call Classifier rule.
For detailed information, see the Microsoft Access documentation.
• When creating a query, you must add the table or tables that contain the field with the
data to which the information from the call (DID, Caller ID, and so forth) will be
compared, and the field with the results that you want to attach to the call.
• Similarly, you must add the field with the data to which the information from the call
(DID, Caller ID, and so forth) will be compared, and the field with the results that you
want to attach to the call.
Release 2.0
September 2010