Author Topic: retrieve interaction histroy of particular user from ucs using SDK.  (Read 4232 times)

Offline Naveen Kancharla

  • Newbie
  • *
  • Posts: 26
  • Karma: -1
As per requirement i need to retrieve interaction history of particular user from ucs using SDK but without the use of sqlconnection???

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
And what is not clear for you on this requirement? PSDK offer methods for these purposes.

Offline Naveen Kancharla

  • Newbie
  • *
  • Posts: 26
  • Karma: -1
thanks!! for quick rply. I'm new to genesys environment can u let me know the step to implement.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
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.

Offline Naveen Kancharla

  • Newbie
  • *
  • Posts: 26
  • Karma: -1
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???

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
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)

Offline Naveen Kancharla

  • Newbie
  • *
  • Posts: 26
  • Karma: -1
Can u able to provide me code for it.....

Offline Naveen Kancharla

  • Newbie
  • *
  • Posts: 26
  • Karma: -1
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.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
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.