Genesys CTI User Forum > Genesys-related Development
Mark Done, Agent Scripting, WDE and Outbound.
abudwill:
This next part demonstrates the jsp code needed to send EventUserEvents to the agents DNs.
You will need to define an API Interface in the Agent Scripting editor. Define some inputs (in this case myValue, myValue2). Assign them values before calling this custom API Interface.
basic JSP code is:
[code]
com.genesyslab.ail.AilFactory factory = com.genesyslab.ail.AilLoader.getAilFactory();
if (factory != null)
{
com.genesyslab.ail.Place ailPlace = factory.getPlace(placeId);
java.util.Collection dns = ailPlace.getDns();
if (dns != null)
{
java.util.Hashtable map = new java.util.Hashtable();
map.put("MyKey", myValue);
map.put("MyKey2", myValue2);
java.util.Iterator it = dns.iterator();
it = dns.iterator();
while (it.hasNext())
{
com.genesyslab.ail.Dn dn = (com.genesyslab.ail.Dn) it.next();
try
{
dn.sendUserEvent(map);
}
catch(com.genesyslab.ail.exception.RequestFailedException e)
{
}
}
}
}
[/code]
You probably want to include some sort of unique identifier in there like IWS Case UID, Outbound record handle, conn id, whatever you choose...
Hope this helps.
daniel_san:
Thank you so much abudwill! :D
I was struggling to do the second part (send event from jsp) and for sure this will help me.
I will try to do on this days and post the results.
Thank you again :)
Navigation
[0] Message Index
[*] Previous page
Go to full version