Cisco Cisco Computer Telephony Integration Option 9.0 Reference Guide

Page of 120
   
4-8
CTI Driver for Siebel 7 Reference Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Chapter 4      Broadcast Statistics
Invoking Service Methods
Invoking Service Methods
This section describes each service method that will be invoked using a DEF file.
AddUserToBroadcast Function addUserToBroadcast(strUserName, 
strMsgAbstract
)
This service method must be used in the Login command to associate the employee having the given 
Siebel login name with the broadcast message used to send statistics for the given agent group or skill 
group.
function AddUserToBroadcast(strUserName, strMsgAbstract)
{
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 null;
}
if (AssociateChildRecord(bcBroadcastMessage, "Position Id", "Id", strPositionId) == "")
{
ShowStatusText("Unable to associate Position with Broadcast Message", true);
}
  
bcBroadcastMessage = null;
boBroadcastMessage = null;
}
Example 4-1
Sample DEF File for Invoking AddUserToBroadcast Service Method
[Command:LoginToPBX]
   SubCommand_1 = "LoginToPBXDevice"
   SubCommand_2 = "InsertAgentStatBroadcast"
   Profile      = ""
   FilterSpec   = "[$GetCommandStatus(LoginToPBXDevice)]='Enabled'"
   MenuPosition = "20.1"
   Comments     = ""
   Title        = "Log In (Phone)"
   ExecuteAll   = "TRUE"
   CmdData      = ""
 [Command:InsertAgentStatBroadcast]
   Profile       = ""
   Comments      = "Add a Broadcast Message record for this agent/position"
   CmdData       = "InsertAgentStatBroadcast"
   ServiceMethod = "Cisco Broadcast Stats.AddUserToBroadcast"
   Hidden        = "TRUE"