10-26-2012 11:40 AM - edited 03-14-2019 10:45 AM
In a UCCX script, how can I access the ECC Vars within custom Java?
I know how to pull them in the UCCX script using the "Get Enterprise Call Info" step. I want to grab all of the ECC key value pairs without knowing how many there are or their names.
I'm new at this so any help would be wonderful thank you.
Solved! Go to Solution.
10-29-2012 08:43 AM
Hi,
I am afraid, there is no way to directly access ECC variables without knowing their names. As far as I can see, there's no easy way to "iterate through" the objects of UCCX, either - they might not be arrays or instances of Iterable.
I know it seems a bit painful not having direct access to the internals of UCCX but the abstraction level of the scripts is sufficient for most of the users.
Take a look at recipe 8: https://supportforums.cisco.com/docs/DOC-24150#detectentvars
G.
10-29-2012 05:52 AM
Is there any UCCX object that I can iterate through?
10-29-2012 08:43 AM
Hi,
I am afraid, there is no way to directly access ECC variables without knowing their names. As far as I can see, there's no easy way to "iterate through" the objects of UCCX, either - they might not be arrays or instances of Iterable.
I know it seems a bit painful not having direct access to the internals of UCCX but the abstraction level of the scripts is sufficient for most of the users.
Take a look at recipe 8: https://supportforums.cisco.com/docs/DOC-24150#detectentvars
G.
10-29-2012 08:56 AM
Gergely Szabo wrote:
...I am afraid, there is no way to directly access ECC variables...
And there you have it.
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
10-31-2012 05:32 AM
Thank you for you answer. Its not the answer I wanted, but it will save me time from looking for something that doesn't exist, like bigfoot or the underpants gnomes. I will now focus my time on the workaround.
Again, Thank you for your time,
Lauren Beal
11-02-2012 06:01 AM
Yes!!!
That worked.
Thank you so much Gergely Szabo. You are a very gifted developer.
-Lauren Beal
10-29-2012 08:20 AM
Lauren Beal wrote:
I'm new at this so any help would be wonderful thank you.
I can assure you that your being new to this is not relevant in regards to what you are asking for. I have been doing this a long time, and would bet there is maybe one person on this forum that can answer your question.
Until he answers, I will offer you this:
Instead of trying to access the ECC directly from within the Custom Java, how about storing the data for ECC into a two-dimensional array. Now, you can write your ECC values by accessing the array indices, as well as pass your array into the a method of your custom class. It's a workaround for what you really asked for, but I'm not knowledgeable enough to know that it's even possible.
E.g.,
String[][] my_ecc_data = new String[] {new String {"first_ecc", "value1"}, new String[] {"second_ecc", "value2"}}
Good luck and happy scripting!
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
11-01-2012 01:26 PM
Ladies and Gentlemen,
I think I broke it (and I am 99 percent sure about it).
Lauren,
could you please confirm this is a UCCE environment, with IP IVR, so it's actually an ICM script triggering a UCCX script and you send some custom ECC vars or maybe PeripheralVariables and you want to get their names and values without knowing their names? Am I correct? This is what you would like, isn't it?
I found a way to convert basic information + peripheral variables 1..10 into a String[].
I also found a way to convert ECC variables (simple ones, no arrays, so far) into a HashMap, which is iterable.
It's been a rough day for me, it's already sleep/party time here in Europe, so I will post the detailed explanation tomorrow.
G.
11-02-2012 02:05 AM
Hi,
it's explained here:
https://supportforums.cisco.com/docs/DOC-24150#detectentvars
Does this answer your question?
G.
11-02-2012 07:46 AM
Great piece of work Gergely (+5). Would give you much more if possible :)
Sent from Cisco Technical Support iPhone App
11-02-2012 08:37 AM
Thanks. Always glad to help.
G.
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