cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4497
Views
20
Helpful
5
Replies

Convert Long to String in UCCX Scripting

Pragash22
Level 1
Level 1

Hi All.

 

I am trying to get the session id for the each call and trying to pass that to Cisco AQM as meta data.

 

The session ID has to be retrieved by data type Long, but when I pass this value to AQM its not accepting as its not string.

 

How can I convert this Long data type to String? Any one has java codes for that?

 

Kind regards

Pragash

 

5 Replies 5

You don't have to do anything that complex. You can use a "set" step and set a string variable to the value of the "long" variable.

Hi Elliot

 

Thank you for your reply, I tried that too it does not work as expected I have the attached error, please refer to the file name 3.

 

I have attached other screenshots too on my configurations.

I would think that it would be caused by the L at the end of the Long variable. I don’t think that you can have any letters in a string variable as it expects only digits. You could use the substring function in the expression language to strip that, likely you’d also need to get the length off the content of the long variable, anyway if it could vary in length. Do a search on Google and I’m sure you’ll be on your way in no time.

This is a good starting point for many things that can be done by the expression editor and modifications of strings https://www.google.se/amp/s/samiamsamdotcom.wordpress.com/2014/01/06/operating-on-strings-part-i/amp/



Response Signature


Pragash22
Level 1
Level 1

Thanks Rogger for your time and reply. I figured out this last night.
1. I set the variable to S_ConSessLong2String (String)

2. In the value under Java tab added this code Long.toString(L_SessionInfo) - L_SessionInfo - Long data type received from Get Session Info step. Refer 5 and 6 Image.

Great that you where able to find a workable solution and thank you for reporting your solution for the greater benefit of the community.



Response Signature