" /> how to update user defined field in calling list after applying the selection o - Genesys CTI User Forum

Author Topic: how to update user defined field in calling list after applying the selection o  (Read 13951 times)

Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
Advertisement
I made some progress,  I got the outboundrecord instance, and be able to get pre defined calling list filed value, but when I tried to setCustomField("WrapUpCode",a); there is an outboundserviceexception.

"Record already processed?"


OutboundServiceException (OutboundService: On) of type Record already processed
com.genesyslab.ail.core.outbound.OutboundServiceImpl.executeAgentRequest(OutboundServiceImpl.java:911)
com.genesyslab.ail.core.outbound.OutboundRecordImpl.update(OutboundRecordImpl.java:191)
com.genesyslab.ail.core.outbound.OutboundRecordImpl.setCustomField(OutboundRecordImpl.java:440)
com.genesyslab.ail.core.outbound.OutboundRecordImpl.setCustomField(OutboundRecordImpl.java:401)
org.apache.jsp.custom.disposition_002dcodes_002dview_jsp._jspService(disposition_002dcodes_002dview_jsp.java:86)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.genesyslab.uadthin.filter.CachePreventFilter.doFilter(CachePreventFilter.java:30)
com.genesyslab.uadthin.filter.UTF8Filter.doFilter(UTF8Filter.java:127)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
That means that your agent closed the RecordHandle by:
1. Sending RecordProcessed event
2. Putting himself in Ready

Or because you didn't configure OCS Record_Process option

Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
Now I have a new problem.
When I use preview dialing mode, I can an OutboundChain Instance, everthing works well,
but when I use predictive dialing mode, there is always a nullpointexception, that means I can't get an outboundchain instance.

does this have anything to do with the option "record_processed" parameter?

The following is from outbound contact 7.2 deployment guide about 'Record_processed' option:


This option is used only in Predictive and progressive dialing modes.
In the preview dialing mode, outbound contact server updates a record only after receiving a recordProcessed event from a desktop, regardless of whether the record_processed option is set to true or false.

Actually, I am not very clear about this.


Kevin

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
You have to use the Record Process event in order to update the fields.

Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
I use the following codes to update custom fields.

29:    OutboundChain myOutboundChain = myOutboundService.getChain(interaction);
30:    OutboundRecord myOutboundRecord = myOutboundChain.getActiveRecord();
31:    myOutboundRecord.setCustomField("WrapUpCode",wrapUpCode);

but when I use predictive dialing mode, I can't get the instance of OutboundChain, then there is always a nullpointerexception on 31.
these codes work for preview dialing mode.


Kevin

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Kevin,

Is the call really outbound call generated by OCS?

R.

Offline kevinwang

  • Full Member
  • ***
  • Posts: 159
  • Karma: 0
yes, it's outbound call generated by OCS.
Now, it seems working properly. I made some stupid mistake. Anyway, it's fixed.
thank you very much ,rene,    and Cavagnaro.

Offline amarceau

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
[quote author=kevinwang link=topic=5472.msg23924#msg23924 date=1271870059]
I use the following codes to update custom fields.

29:    OutboundChain myOutboundChain = myOutboundService.getChain(interaction);
30:    OutboundRecord myOutboundRecord = myOutboundChain.getActiveRecord();
31:    myOutboundRecord.setCustomField("WrapUpCode",wrapUpCode);

but when I use predictive dialing mode, I can't get the instance of OutboundChain, then there is always a nullpointerexception on 31.
these codes work for preview dialing mode.


Kevin
[/quote]

I know this post is a few months old... But I'm trying to do this exact same thing and I can't seem to get it working.  Can you tell me where you put these lines of code?  Is it in the GAD custom.xml code?

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Hi,

This is Java code that must be placed either in Java class or JSP page.

R.

Offline pavelpg

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
[quote author=kevinwang link=topic=5472.msg23905#msg23905 date=1271793732]
I made some progress,  I got the outboundrecord instance, and be able to get pre defined calling list filed value, but when I tried to setCustomField("WrapUpCode",a); there is an outboundserviceexception.

...
[/quote]

How did you get OutboundRecord instance? through InteractionVoiceOutbound.getActiveRecord() deprecated way?