[quote author=René link=topic=5098.msg22587#msg22587 date=1264106317]
Hi JTL,
Have you tried to update the current record using AIL method? You cannot just send some data to OCS. It's necessary to use correct method (UpdateCallCompletionStats).
R.
[/quote]
Rene,
I am struggling to see why Genesys provide a built in "Disposition Code" function which DOESN'T do this, and whick hitting "Mark Done" doesn't simply do by default.
I'm now working with some customisation instead. There are 2 parts, a "disposition-codes-view.jsp" which simply displays a custom tab, like the built-in one does.
Then there is this "apply-codes.jsp" which takes the code and attaches it to the call.
If I were to change this code, perhaps that would be all I would need to do in order to get this working. The problem is, I'm not a java developer, and I don't know anyone who is who knows enough about Genesys to help me!
Can anyone suggest how I can change this JSP so the Disposition Code is properly stored in the Calling List? I simply thought it was necessary to attach it DURING THE CALL (e.g. whilst on ACW) then the UpdateCallCompletionStats / RecordProcessed would be done - therefore all my custom code would need to do would be to perform the attach.
This is how I understood the GAD and OCS documentation, anyway!
The thing is, as I said above, this method works fine for editing Custom Fields in the right-hand pane! There must be something underpinning the "Update Record" button which does something different to "Mark Done" on its own.
Anyway, here is the code:
<%@ page language="java" buffer="none" %>
<%@ page import="com.genesyslab.ail.AilLoader" %>
<%@ page import="com.genesyslab.ail.AilFactory" %>
<%@ page import="com.genesyslab.ail.Interaction" %>
<%@ page import="com.genesyslab.ail.exception.RequestFailedException" %>
<%
/* Get data from request
*/
String idInteraction = (String)request.getParameter( "idInteraction" );
String[] codeIds = (String[])request.getParameterValues( "codeId" );
String[] codeChecked = (String[])request.getParameterValues( "codeChecked" );
/* Initialize AIL related data
*/
AilFactory factory = AilLoader.getAilFactory();
Interaction interaction = factory.getInteraction( idInteraction );
/* Apply disposition code in interaction
Here set attached data
This part can be changed to store the disposition on another container
as a file, a database...
*/
try {
interaction.removeAttachedData("DispositionCode");
for (int i=0;i<codeIds.length;i++) {
if ("true".equals(codeChecked[i])) {
interaction.setAttachedData("DispositionCode",codeIds[i]);
break;
}
}
interaction.saveAttachedData();
} catch( RequestFailedException requestFailedException ) {
System.out.println("Attached data update failed: "+requestFailedException);
}
response.setStatus( HttpServletResponse.SC_NO_CONTENT );
%>