Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: Naveen Kancharla on May 16, 2016, 07:40:44 AM
-
As per requirement i need to retrieve interaction history of particular user from ucs using SDK but without the use of sqlconnection???
-
And what is not clear for you on this requirement? PSDK offer methods for these purposes.
-
thanks!! for quick rply. I'm new to genesys environment can u let me know the step to implement.
-
Use the RequestSearch method which allow you to set query to the UCS database, where you can find all Genesys interactions by default. The RequestSearch accept the Lucene query as the parameter - so , there you can set the ownerID as the filter's parameter for example.
-
I'm using webApi developer guide 8.1, for retrieving Interaction from ucs. Under that "SimpleSamplesConstants" method is thier so where i have import it from???
-
I do not think so that the WebAPI provides API for UCS (maybe I am wrong). From my point of view, the app based on PSDK meets your needs and the development will take a very short time (it is a few row of code)
-
Can u able to provide me code for it.....
-
SimpleSamplesConstants ssc = null;
try
{
ServiceInfo si = LoadBalancer.GetServiceInfo
(CfgAppType.CFGContactServer, ssc.TenantName);
tbServerName.Text = si.Host;
tbPort.Text = si.Port.ToString();
}
catch (LoadBalancerException e1)
{
ResultData.Text = "Contact server is not available at this time.
Please try it later.";
}
above code is from genesys documentation, if possible guide me how SimpleSamplesConstants is retrieved in code.
-
This code is for WebAPI, do not understand why still mixing these two things together. As I wrote, the WebAPI is not a best way for your needs. Just use the PSDK, connect to the UCS server and send the request like below (for imagine):
[code]
string query = "OwnerId:xxx";
RequestSearch reqSearch = new RequestSearch();
reqSearch.MaxResults = 100;
reqSearch.IndexName = "interaction";
reqSearch.Query = _query;
EventSearch eventSearch = (EventSearch)ConnectionFactory.GetUCSConnection().Request(reqSearch);
if ((int)eventSearch.FoundDocuments != 0)
{
//Do something
}
[/code]
Of course you cannot copy&paste this code, but it is enough as the example, I guess.