Author Topic: PSDK query/search for Interaction Queues  (Read 3337 times)

Offline gstkein

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 4
PSDK query/search for Interaction Queues
« on: January 15, 2016, 12:37:17 PM »
IWS allows users to search for Agents/Queues/Contacts in order to transfer an interaction.
It finds matches even if the user writes a partial name, like "Tre" will find "Trevor"

in order to find contacts, the query is something like

Type=Request
  Service=Index
  Method=Search
  Parameters=
    [
      Query="TenantId:1 AND (LastName:Tre* OR FirstName:Tre* OR PhoneNumber:Tre* OR EmailAddress:Tre* )"
      MaxResults=50
      tkv.multibytes="false"
      IndexName="contact"
    ]
  UserData=
    [
    ].


For agents it may use wildcards so

CfgPersonQuery query = new CfgPersonQuery();
query.setUserName("Tre*");
Object responseObject = confprotocol.requestMultiple(CfgPerson.class,query);


The question would be how does it find "Interaction Queue" objects?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: PSDK query/search for Interaction Queues
« Reply #1 on: January 15, 2016, 12:49:29 PM »
Interaction Queue is type of "script", so you should use CfgScriptQuery I guess.

Offline gstkein

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 4
Re: PSDK query/search for Interaction Queues
« Reply #2 on: January 15, 2016, 01:36:23 PM »
CfgScriptQuery Worked perfectly! Thanks Kubig!!!

Offline gstkein

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 4
Re: PSDK query/search for Interaction Queues
« Reply #3 on: January 15, 2016, 01:56:57 PM »
Would you know if there´s a way to make the query case insensitive?

Offline gstkein

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 4
Re: PSDK query/search for Interaction Queues
« Reply #4 on: January 15, 2016, 03:10:27 PM »
IWS seems to find the queues in a case insensitive way, and ConfigurationManager has a case insensitive checkbox in the search feature.

I could not find a way though, the API does not have that option apparenlty.

Anyway you´ve helped me a lot, so thank you.

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: PSDK query/search for Interaction Queues
« Reply #5 on: January 16, 2016, 12:27:00 AM »
With some Cfg Server queries you can include filters that have KVPs.  There is a KVP of key: cmp_insensitive, value: 1 which will cause queries to be case insensitive.

I have used this in PSDK/.NET to do CfgPersonQuery's in a case insensitive manner.

Some details on a Genesys wiki around this (part of a javadoc): http://www.genesyslab.info/repository/PSDK/8.0-Java_API_Reference/com/genesyslab/platform/configuration/protocol/doc-files/Configuration%20Objects/config-objects-intro.html

Regards,
Andrew



Offline gstkein

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 4
Re: PSDK query/search for Interaction Queues
« Reply #6 on: January 18, 2016, 02:48:58 PM »
That´s great, thank you abudwill!

Offline gstkein

  • Jr. Member
  • **
  • Posts: 56
  • Karma: 4
Re: PSDK query/search for Interaction Queues
« Reply #7 on: January 18, 2016, 03:06:07 PM »
So the final code would be:

                Set<CfgScript> queues = new HashSet<CfgScript>();
CfgScriptQuery  query = new CfgScriptQuery();
query.setName(prefix);
query.setScriptType(CfgScriptType.CFGInteractionQueue);
query.setProperty("cmp_insensitive", 1); // This sets the filter
Object responseObject = protocol.requestMultiple(CfgScript.class,query);