Feedback

  • Contents
 

Custom Stored Procedures

By default, any time data is written to either the CallHistory Table or the AgentStats Table, Dialer runs a stored procedure (SPROC): CallHistoryInsert_1 or spid_exec_tran_batch respectively. If you, as a DBA/Developer, would like to run custom SQL code when Dialer inserts data into the CallHistory Table or the AgentStats Table, you can do so by creating and enabling Custom SPROCs.   

Creating Custom SPROCs

Dialer provides you with two custom stored procedures called Custom_CallHistoryInsert_1 and Custom_AgentStatsInsert.  By default, these two SPROCs are just blank shells into which you can add any SQL code that you wish.

Using these custom stored procedures has two main benefits: 1) Once Custom SPROCs are enabled, they will be run automatically from Dialer's default SPROCs. 2) When you perform an upgrade, they will remain intact-they will not be overwritten during the upgrade procedure.

Note: Keep in mind that while you can indeed add custom SQL code directly to Dialer's default SPROCs, it is not recommended. During an upgrade, Dialer's default SPROCs will be overwritten and you will have to recreate your custom code.

Enabling Custom SPROCs

In order for the custom SPROCs to run when data is written to the CallHistory Table or the AgentStats Table, you must enable them via a special server parameter called  Dialer Call Custom Sprocs. To enable your custom SPROCs, set the parameter value to true. For more information, see Server Parameters.