Carl_U | 2017-12-05 15:46:46 UTC | #1
Hi,
We have recently started using Purecloud and have successfully made our first screen pop for agents. Architect collects data from our database through a data dip connector and it seems to work fine, with one exception.
Many of the inbound calls we have is related to several topics on behalf of several of our clients (the customer who calls us often have a relationship to several of our customers) and it's essential for us to identify all the data for the agent, also to be able to report etc.
The IVR we have made collects the data to the popup script and display the relevant data.
We try to populate a list based on data from a JSON array [1,2,3 etc.]. But fail since it's not supported. We see that this is planned for release but we dont know when. We could of course display the data from a website we populate, but we need the data in Purecloud to be able to do some business logic with the input.
Have someone figured out a smart or alternative way to do this?
Jason_Mathison | 2017-12-05 18:42:12 UTC | #2
While architect can not handle an array of objects or an array of arrays, it should be able to handle an array of strings/numbers/booleans etc.
A potential solution to your issue would be to change the existing web service to be more "Flattening friendly" by having it return arrays of each field instead of an array of objects.
A similar solution would be to put in an intermediary web service between PureCloud and the data source to take care of that translation.
I can think of a few other ideas, but I would need to know more about the data. What vendor are you pulling this data from? If it isn't one of the vendors that we have included support for, could you give us an example of what the data looks like when you get multiple results?
Thomas_B | 2017-12-06 08:03:53 UTC | #3
Hi, I work with Carl and will try to shed some more light on the solution.
We currently have a webservice on the bridge server, we have full control over this and can do basically anything with the data. The data comes from a sql database which returns 1-many rows from a select.
In the case it returns more rows then we thought an array of objects would be smart, but i understand that architect does not support that.
We can format the json any way we want but, we would definitely like to avoid using numbers on the data like amount1, name1, amount2, name2, etc.
One thing we could do is return the first row of the select with an rownumber int, and numberofrows and do a loop in architect until rownumber equals numberofrows. However i'm not sure as to how we would add the data to the pop up script after that.
The last option (that i can see) is to add the whole of each row returned from the database as a string where we will end up with an array of strings. we could then maybe add some sort of identifiers inside the strings like "(amount)=1000.00(name)=bob" and then if some sort of regex is possible inside Scripts then it might be possible to loop the array and present the data as we want to.
Is there no best practices for this that we should know?
Any help is much appreciated. Thanks in advance.
Jason_Mathison | 2017-12-06 16:29:20 UTC | #4
Can you provide your output contract? You can sanitize names if you need to, but please don't alter any data types. We may well be able to suggest a couple of simple changes to get this to work reasonably well for you.
system | 2018-01-06 16:29:22 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 2190