Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: abudwill on July 24, 2013, 05:26:25 PM

Title: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: abudwill on July 24, 2013, 05:26:25 PM
Hello,

In OCS 8.x I am not able to locate where GSW_RECORD_HANDLE's are stored once OCS retrieves calls.  I know that if an interactions is delivered to an agent it is included as attached data.

I am interested in using the PSDK in a manner that would require me to have the record handle for some records that are loaded, but have not been delivered to an agent yet.  Where are the handles stored?  I was unable to locate anything in the API documentation that would provide this to me.

Regards,
Andrew
Title: Re: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: cavagnaro on July 24, 2013, 06:16:29 PM
What do you mean, as you said it is as attached data once the calls arrives to the agent...there you can get it (READ)
Title: Re: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: abudwill on July 24, 2013, 06:48:07 PM
I am interested in utilizing some methods from com.genesyslab.platform.outbound.protocol.outbounddesktop not only for the call delivered to the agent, but for other calls that are potentially in the retrieved state that meet certain conditions.

To use any of the methods in com.genesyslab.platform.outbound.protocol.outbounddesktop I need to determine how I can get the GSW_RECORD_HANDLE's for other calls in the retrieved state.

Title: Re: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: cavagnaro on July 24, 2013, 07:20:52 PM
No, the RH is created when the call is at dialing mode, not while at OCS buffer. That is the RH used for.
If the call is not being dialed then no results can't do anything with it. Only option would be Cancel the call for which you don't need RH.
Title: Re: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: abudwill on July 24, 2013, 07:55:11 PM
This is great information, thank you.

Might you be able to provide some guidance in terms of how to send/process the requests in com.genesyslab.platform.outbound.protocol.outbounddesktop?  For example I am not sure what class to send the requests to, and how to read any events that come back.

With other protocols such as UniversalContactServerProtocol it has been simple to figure out (abbreviated code):

[code]Endpoint ucsEndpoint = new Endpoint("UCSSERVER", 7000);
UniversalContactServerProtocol ucsConnection = new UniversalContactServerProtocol(ucsEndpoint);
ucsConnection.setClientName("TheClient");

try {
SomeRequest someRequest = new SomeRequest();
someRequest.setItem(...);
Message response = ucsConnection.request(someRequest);
} catch (Exception ex) { }[/code]

Any guidance is appreciated (Java PSDK).

Regards,
Andrew

Title: Re: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: abudwill on July 24, 2013, 11:41:50 PM
After more searching and reading I think I answered my own question on how to send requests:

[code]
OutboundDesktopFactory factory = new OutboundDesktopFactory();
Endpoint tserverEndpoint = new Endpoint("Server", 3000);
TServerProtocol protocol = new TServerProtocol(tserverEndpoint);

protocol.setClientName("OCSTest");
protocol.open();

RequestRecordCancel requestRecordCancel = new RequestRecordCancel();

requestRecordCancel.setApplicationId(appId);
requestRecordCancel.setCallingList("callingList");
requestRecordCancel.setCampaignName("campaign");
requestRecordCancel.setPhone("5555555555");
CommonProperties userEvent = CommonProperties.create();
userEvent.setUserData(factory.marshal(requestRecordCancel));

RequestDistributeUserEvent request = RequestDistributeUserEvent.create();

request.setUserEvent(userEvent);
protocol.send(request);
Thread.sleep(2000);
protocol.close();
[/code]

If I wanted to cancel records in a utility I create (rather than from an agent desktop perspective), it sounds like the Communications DN API is a better fit for me.
Title: Re: Is it possible to retrieve GSW_RECORD_HANDLE for all retrieved calls?
Post by: cavagnaro on July 25, 2013, 12:47:07 AM
Yes, you got it. CommDN is the chosen one