SQL Example

The following shows an example of how you would log a call into your database using a stored procedure. The example assumes you have an existing table in your database called tblCallLog.

The Call Log table has the following fields:

  • callLogId (auto increment)
  • agentUsername
  • callDateTime
  • leadId
  • phoneNo
  • disposition
CREATE PROCEDURE `logCall`(agentUsername varchar(50)
, callDateTime DateTime
, leadId integer
, phoneNo varchar(20)
, disposition varchar(20))
BEGIN
    
 insert into tblCallLog (agentUsername, callDateTime, leadId, phoneNo, disposition)
 values(agentUsername, callDateTime, leadId, phoneNo, disposition);
 END

To call the stored procedure you would create a disposition action;

Select the 'JDBC Disposition' action and enter the following in the Arguments:

{call logCall(${njAgent}, ${njCallDate}, ${njLeadId}, ${njDialedNumber}, ${njDisposition})}

In the above example each field wrapped in ${} braces is either a field from your campaign or one of the built in Noojee Campaigner fields. Most of the built in Noojee fields are prefixed with 'nj'. You can see a list of available 05.1 Arguments.