Author Topic: WDE Synchronize contact's data with 3rd app  (Read 2074 times)

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
WDE Synchronize contact's data with 3rd app
« on: April 11, 2023, 12:38:16 PM »
Hi everyone,

I have a rather interesting task in which I need to perform the insert, update or deletion of telephone numbers and email addresses for a selected contact.

I retrieve the data via REST from an external application.

I need to perform the update in the WDE application. I came up with the idea to perform the update in the Contact Directory (ContactDirectoryView), which can be selected / appears in the main window or when the interaction comes in. There I select the contact from the list and this triggers an update of the data that is in the ContactInformationView.

Generally the above is just a very big shortcut, the amount of code I have generated is considerable but I don't want to inundate you with information.

At the same time, I have the feeling that maybe this is not the correct approach. I would like to advise you, has anyone had occasion to wrestle with such an issue?

Or is my approach wrong and can this be done in some more civilised way?

Thanks, Matt.
« Last Edit: April 12, 2023, 09:39:43 AM by MJaskowski »

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: WDE Synchronize contact's data with 3rd app
« Reply #1 on: April 12, 2023, 09:39:26 AM »
I make no secret of the fact that I would like to hear advice from the likes of @PeteHoyle, @cavagnaro, @Kubig.
Gentlemen, you have a lot of experience with WDE and your advice could be really useful. If it's not a problem then please speak up.

I would really appreciate any comments.

Thanks, Matt.

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: WDE Synchronize contact's data with 3rd app
« Reply #2 on: April 12, 2023, 12:27:36 PM »
Hi Matt,

Just my 2 cents - don't do this on WDE side unless you need agent's input to identify contact... Do it as part of routing logic - fetch data from external system and update UCS or develop a custom REST service to sync UCS with external system and call that service from routing strategy. It will make your architecture simpler and agent will get right information on call arrival without any delay that request to external REST system may cause.

R.



Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: WDE Synchronize contact's data with 3rd app
« Reply #3 on: April 12, 2023, 06:11:06 PM »
Hi René!

Thank you for your reply. REST service using the WDE API was the first suggestion from me to the client. Unfortunately it was rejected, I won't quote the arguments the client used because they are out of this world for me.

However, I was intrigued that you wrote that it can be done via routing. I am not proficient in this area, could you expand on the thought? A few words on how to bite it?


Matt
« Last Edit: April 12, 2023, 06:14:58 PM by MJaskowski »

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: WDE Synchronize contact's data with 3rd app
« Reply #4 on: April 12, 2023, 06:41:19 PM »
I know these kind of discussions very well. A few months/years later they (the customer) will complain why it is done this way...

Back to routing - you can call REST web service from routing strategy (IRD/Composer) using "Web Service" block to get information about customer and update UCS contact data then using "Update Contact" block.

Ping me if you need more details.

R.

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: WDE Synchronize contact's data with 3rd app
« Reply #5 on: April 12, 2023, 09:16:35 PM »
Thank you very much, I will take a closer look at the topic, I had no knowledge that something like this could be done from the routing level.

However, I am worried that I will not be able to use this solution after all.
To explain why, I will have to elaborate a bit.

It's because the previously mentioned external service (external application), which is supposed to provide the data (btw, which is supposed to take priority, if there are any differences between systems, the external data is more important, unless the user decides otherwise), also provides something like flags.

Flags is a whole mechanism that 'manages' contact data (attributes data like phone numbers and emails) based on 8 flags (bool). Flags determine (in the external system) whether an attribute can be deleted or edited (and many others but I am interested in CRUD). And now probably the biggest pain in the whole solution, the same flags mechanism I have to implement to WDE. That is, if I go into the Contact Directory, select a contact and the phone numbers and email of that contact are displayed, the ability to modify such a contact is to follow the rules of the previously mentioned flags. This is problematic as the Contact Directory is a native WDE control, I would like to keep its look and properties while extending it with the flags mechanism, unfortunately the standard solutions I know from the Developer's book don't make it easy for me.

An important note is also that from my perspective it's just boolean values, whereas from the end user's perspective it's values that need to be displayed to each attribute on an ongoing basis. Based on this data, the user knows how to treat the contact. That's it in a nutshell.

Therefore, routing will probably not be suitable for such a complex mechanism, or at least that's how it seems to me at the moment. I am probably doomed to appropriate manipulations in the WDE UI.

Unless you have a different perspective on this?


Matt

Offline MJaskowski

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
Re: WDE Synchronize contact's data with 3rd app
« Reply #6 on: April 14, 2023, 01:04:04 PM »
Do any of you have knowledge of how I can access the native controls in ContactInformationView? Like textboxes for phone numbers and emails.
My first thought is of course the reflection mechanism, however maybe there is a more simple way?

What I have to achieve is possibilty to enable / disable native controls in ContactInformationView based on condition.


Matt




Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: WDE Synchronize contact's data with 3rd app
« Reply #7 on: April 14, 2023, 01:28:02 PM »
Hi Matt,

I don't think it is possible to modify existing view. You can try to "hack it" but it will be painful process with a high risk and you might need to repeat it every time WDE is updated.

I would suggest you going with following solution:
- Hide default Contact tab (view)
- Develop a custom one that will be shown to agent. Code of that view should cover communication with REST backend as well as management (CRUD) of UCS contact.

R.