Genesys CTI User Forum > Genesys-related Development

retrieve interaction histroy of particular user from ucs using SDK.

<< < (2/2)

Kubig:
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)

Naveen Kancharla:
Can u able to provide me code for it.....

Naveen Kancharla:
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.

Kubig:
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.

Navigation

[0] Message Index

[*] Previous page

Go to full version