Author Topic: Platform SDK (8.x - Java) RequestIdentifyContact problems  (Read 4697 times)

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Platform SDK (8.x - Java) RequestIdentifyContact problems
« on: July 09, 2013, 07:00:48 AM »
Hello,

I am using the PSDK with Java to perform some functions against UCS.

When I attempt to search UCS based on ContactSearchCriteriaConstants.LAST_NAME I am returned results.  However if I attempt to search UCS based on ContactId's (ContactSearchCriteria.CONTACT_ID) I receive the following error noting I am not passing any searchable attributes:

com.genesyslab.platform.contacts.protocol.contactserver.events.EventError:
EventError:
FaultString = 06:47:39.192 Server: PROD_UCS Msg: No Searchable Attribute
FaultCode = NoSearchableAttribute
ReferenceId = 1

A short code snippet is:

[code]ucsConnection.open();

RequestIdentifyContact request = new RequestIdentifyContact();
request.setTenantId(101);
request.setMediaType("any");
request.setCreateContact(false);

KeyValueCollection myList = new KeyValueCollection();
myList.addObject(ContactSearchCriteriaConstants.CONTACT_ID, "0000Ga8W4NBC0013");

request.setOtherFields(myList);

Message myEvent = ucsConnection.request(request);

System.out.println(myEvent.toString());

ucsConnection.close();[/code]

The PSDK API has several ContactSearchCriteriaConstants defined including CONTACT_ID.  The ID certainly exists within UCS (I verified in the Contacts table).  Does anyone know why I might be receiving this message or if I am not using the API correctly?

Regards,
Andrew
« Last Edit: July 09, 2013, 08:26:43 AM by abudwill »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: Platform SDK (8.x - Java) RequestIdentifyContact problems
« Reply #1 on: July 09, 2013, 04:47:22 PM »
Is the contact ID defined as searchable on the UCS configuration? You have to define which fields are searchable and do some config on Genesys.
UCS guide is your friend or talk to the Genesys admin so he can enable that field

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: Platform SDK (8.x - Java) RequestIdentifyContact problems
« Reply #2 on: July 09, 2013, 07:30:18 PM »
I really should have known to check this, especially since I checked it for other attributes.  I will check and follow up to let everyone know.

Offline abudwill

  • Full Member
  • ***
  • Posts: 157
  • Karma: 4
Re: Platform SDK (8.x - Java) RequestIdentifyContact problems
« Reply #3 on: July 09, 2013, 07:53:34 PM »
Hi Cavagnaro,

I made the contact attribute searchable as defined in the UCS guide.  The error has disappeared but no contact is being returned even when I am supplying what I believe is a valid ContactId.  For testing purposes I am spying an ID from the UCS Contact table (specifically the Id column).  Since I know the value I am passing exists and I am not receiving results, I suspect this is not the ContactId that ContactSearchCriteriaConstants.CONTACT_ID refers to, can you comment on this at all?

In other news, I set a user defined attribute as searchable and was able to search based on that successfully, so thank you!

For anyone else who finds this thread, as Cavagnaro described the UCS guide notes fields must be searchable.  In 8.x to make them searchable you open CME, browser to Resources -> Business Attributes -> Contact Attributes -> Attribute Values.  Open the item you are interested in making searchable.  Create a new section named settings.  In settings create 2 new KVPs is-searchable -> true, and is-sortable -> true.

Regards,
Andrew

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Platform SDK (8.x - Java) RequestIdentifyContact problems
« Reply #4 on: July 09, 2013, 08:23:31 PM »
Hi Andrew,

RequestIdentifyContact method was intended to be used IMHO when you need to identify contact based on some contact's attributes like first/last name, email address etc. If you already know Contact ID then I would recommend you using RequestGetAttributes method.

R.