cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
875
Views
25
Helpful
8
Replies

Convert USER to String in Select Resource Step

I had a script where I was grabbing the user name to use for a database write in the selected resource step in UCCX 11.6. Connect set to No and Resource Selected = agentID. Doing a reactive debug after I pass the Select Resource step I look in the Variable Values and agentID  is "USER[jsmith]". Convert it to a string and it becomes "User[type=Call Manager User,id=jsmith,authenticated=false]" I strip "jsmith" out and use it to write to a database, continue to agent and the world is a safe place. Fast forward to UCCX 12.5 upgrade. Do reactive debug and the Variable Value for agentID is "USER[jsmith]". Except now the string conversion shows "User[type=Call Manager User,id=***,authenticated=false]" Anyone know why 12.5 now puts asterisks in place of the agent ID name and how to get the ID back? I have googled and found nothing on this. So I am hoping someone here knows. Thanks in advance.

8 Replies 8

Anthony Holloway
Cisco Employee
Cisco Employee
I don't know why it changed, but I think there is a method on the object like .getUserId() which would return just the jsmith part. Give that a shot.

Anthony,
I tried this... Didn't work for me. I tried looking for a method and didn't find one that works--yet.
-Sean

I was recalling from memory, but now that you replied, I actually opened the editor.

 

uccx-get-userid.png

Thanks, Anthony!

...wonder if there are any other useful "methods" not in/under the User tab in the editor that are in the underlying Java....(?)

 

Here's a sample script I played with to test both methods:

 2020-0701-sampleScriptWithSelectResourceACD.png2020-0701-sampleScriptWithSelectResourceACD-vars.png

 

...good practice.

 

-Sean

Yes, quite a few actually.  You just need to use the Java tab instead.

 

1. Select the Java Tab

2. Type the Class name

3. Use the drop down to view/select

 

This works for Constructors, Methods and Properties.

 

uccx-java-tab.png

...this is worth way more than 5 Helpful votes!
New Revelation. :-)
Sincerely,
Sean

Cool stuff!

Sean Lynch
Level 7
Level 7

Another quick way to obtain the UserID, from the User object--is to use the "Get User Info" step/palette item, and create a variable of type String:

2020-0630-GetUserInfoStep-Identifier.png

 

Lots of other useful info in there as well:

2020-0630-GetUserInfoStep-Identifier-vars.png

 

The Get User Info Identifier is the same as the USER ID.

 

Hope this helps you...

 

-Sean 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: