05-04-2020 03:04 PM
Dears I hope you all doing good,
We have CCX with Finesse, we have a simple script that loop though a xml file for VIP users to get them to the first free agent (test phase), now we want to update this file with a large xml file (350 mobile/extension).
We tried to use this xml file but we always get the "we're currently experiencing system problems" instead of looping through the file, I think this is because a limitation on how many steps in total should be on a script.
What is the best way to identify VIP users?
Thanks and best regards
Emad
Solved! Go to Solution.
05-05-2020 12:55 PM
Here is an example of a small xml document and an xpath which can pull the status of a caller based on phone number, and it does not use looping.
If this were inside of UCCX, it would look like this:
As for the call subflow with the array, that might look like this:
The subflow script which contains the array list:
The main script which calls it to query the existence of the calling number in the vip list:
The parts you cannot see here are the input and output tabs of the Call Subflow step, which are below:
I hope these examples help you, and none of them require increasing your max steps.
05-04-2020 08:52 PM
Do you have a database you can dip into to check the calling number? The database check could reduce the steps to only a handful. The only other option that I'm aware would be to increase the number of allowed steps. Not sure that would be your best long term solution however.
Thanks,
Glenn
05-05-2020 01:09 AM
05-05-2020 11:38 AM
First, you shouldn't need to loop an XML file. Using Xpath and a known unique identifier, like a calling number, you should be able to access the element in the XML document precisely.
Second, if you don't need the overhead of managing an external document, you could just have a separate script which holds the information in it, and call it via subflow from any script. Is there something special about XML that you need?
One such example could use an Array if all you are needing to check is for the existence of a phone number in a list.
Another could be a HashMap if you would also like to store some additional information along side the number, like a name.
05-05-2020 12:16 PM
@Anthony Holloway wrote:First, you shouldn't need to loop an XML file. Using Xpath and a known unique identifier, like a calling number, you should be able to access the element in the XML document precisely.
First, Thanks a lot for your reply. I'm currently new to the programming world, I just started to learn about scripting on CCX, can you please give an example or a link on how to do this? the only way I know is to create a variable "i" and an "if" statement that looks into the ".xml" file, increment "i".
Second, if you don't need the overhead of managing an external document, you could just have a separate script which holds the information in it, and call it via subflow from any script. Is there something special about XML that you need?
This is brilliant, also I need an example "sorry for that"
One such example could use an Array if all you are needing to check is for the existence of a phone number in a list.
I think creating an array is the best approach for me, I did some search on how to create it on CCX with no luck, can you please explain it to me
Thanks for your support and time I really appreciate it.
05-05-2020 12:55 PM
Here is an example of a small xml document and an xpath which can pull the status of a caller based on phone number, and it does not use looping.
If this were inside of UCCX, it would look like this:
As for the call subflow with the array, that might look like this:
The subflow script which contains the array list:
The main script which calls it to query the existence of the calling number in the vip list:
The parts you cannot see here are the input and output tabs of the Call Subflow step, which are below:
I hope these examples help you, and none of them require increasing your max steps.
05-06-2020 07:20 AM
05-06-2020 07:24 AM
Java method names are case sensitive, so asList() and aslist() are not interchangeable. I think if you try that small adjustment, you might find that it does work.
05-06-2020 07:42 AM - edited 05-06-2020 07:44 AM
Yes I know that, I tried to do it as your example "asList" and I got the error. once I open my work PC I will also try "aslist" and check. But I think it's how I structure the Array inside my Variable, I didn't know how to do it properly.
05-06-2020 11:22 AM
05-06-2020 11:26 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide