Author Topic: How can I modify a contact's e-mail address in UCS?  (Read 2746 times)

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
How can I modify a contact's e-mail address in UCS?
« on: May 04, 2016, 02:32:43 PM »
I am writing a WDE extension and I need, at some point in the execution (within the lifetime of a chat interaction) to modify the customer's e-mail address in UCS (and, if possible, also in the interaction itself).

Does anyone know how I can do that? Thank you in advance.

[b]Note:[/b] I need to do this programmatically in my WDE extension, so please do not suggest modifying strategies, using Genesys Administrator or anything other than using Platform/Enterprise SDK.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
Re: How can I modify a contact's e-mail address in UCS?
« Reply #1 on: May 05, 2016, 09:29:04 AM »
Did you try to use the request "RequestUpdateAttributes" from com.genesyslab.platform.contacts.protocol.contactserver.requests namespace

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: How can I modify a contact's e-mail address in UCS?
« Reply #2 on: May 05, 2016, 12:04:54 PM »
I would love to, but I'm afraid I don't know how to access the contacts protocol to send that request in WDE. I searched the web and explored the DLLs, but I couldn't find the way. Could you please show me how?

Edit: never mind, I found a way to obtain the protocol.

[code]IChannelService channelService = container.Resolve<IAgent>().EntrepriseService.Resolve<IChannelService>("channelService");
            IClientChannel[] clientChannelArray = channelService.ListChannels();

            foreach (IClientChannel clientChannel in clientChannelArray)
            {
                if (clientChannel.Protocol is UniversalContactServerProtocol)
                {
                    UniversalContactServerProtocol universalContactServerProtocol = clientChannel.Protocol as UniversalContactServerProtocol;
                    break;
                }
            }[/code]

Thanks. I will try that and post the results.
« Last Edit: May 05, 2016, 02:08:27 PM by Gabi »

Offline Gabi

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 0
Re: How can I modify a contact's e-mail address in UCS?
« Reply #3 on: May 10, 2016, 02:29:24 PM »
Update: it... sort of worked, but then it did not.

We were able to make the request to UCS, and the response was successful, but then when the chat which was open at the time was closed, and a new one came in, the contact details were back to what they used to be.

Does WDE overwrite the contact details when an interaction is closed (or something similar)?