Cisco Cisco Computer Telephony Integration Option 9.0 Reference Guide

Page of 120
   
A-1
CTI Driver for Siebel 7 Reference Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
A P P E N D I X
A
Business Service Script
This appendix displays a complete business services script that contains available functions. It also 
provides a sample DEF file that displays the broadcast statistics configuration.
Sample Script
The following script contains the functions implemented on this business service that is not exposed to 
a client, but can be used internally.
Example A-1
Business Service Script with Available Functions
function AddUserToBroadcast(strUserName, strMsgAbstract)
{
// AddUserToBroadcast:
//
// Associates the Employee having the given Siebel login name
// with the Broadcast Message used to send statistics for
// the given skill group or agent group.  The Abstract field
// of the Broadcast Message will determine whether it is
// used to show agent statistics or skill group statistics.
var strPositionId  = FindPositionId(strUserName);
if (strPositionId == "")
{
ShowStatusText("Can't find or create Position for login name " + strUserName, true);
return;
}
var boBroadcastMessage = null;
var bcBroadcastMessage = null;
GetBroadcastMsg(strMsgAbstract, boBroadcastMessage, bcBroadcastMessage);
if (bcBroadcastMessage == null)
{
ShowStatusText("Unable to find or create Broadcast Message " + strMsgAbstract, true);
return;
}
if (AssociateChildRecord(bcBroadcastMessage, "Position Id", "Id", strPositionId) == "")
{
ShowStatusText("Unable to associate Position with Broadcast Message", true);
}