Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Bronze

UCCX Select Resource – Resource script question

Hi all,

Using UCCX 8.5, I’m looking to route an inbound call to a specific agent. We already query the customers CRM database and pull info about the inbound call where we can match the phone number.

I gather the 'Select Resource' step can be used to route to a ‘Resource’ rather than a CSQ, it appears to allow the resource target to be a variable when the type is set to ‘User’ but I don’t appear to be able to populate the variable from a ‘set’ step?

Thanks in advance.

Matty

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Set my_string_variable =

Set my_string_variable = "avholloway"
Set target_agent = USER[my_string_variable]
Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
10 REPLIES

Hi,can you please tell us

Hi,

can you please tell us more about that Set step. It might return a value of which type is not acceptable by the Select Resource step.

Remember, it's all Java, so it's rather conservative on types.

G.

Bronze

OK, so I just found:User

OK, so I just found:

User Variable

Java Class Name: com.cisco.user.User

A User variable contains information that is useful for user authentication.

You cannot manually enter a User variable as a value. User variables can be returned only from the Name To User step of the Media palette.

You can pass a User variable as a parameter to a subflow.

If the above is the case, and the only variable type accepted by the ‘Select Resource’ step is ‘User’, any other ideas about how I can route to specific agents?

Thanks

Matty

Hi,assuming either the agent

Hi,

assuming either the agent's username or extension is available in the script prior reaching the Select Resource step, you can use the Get User Step which sort of creates a reference to a User by the agent username or extension number.

Pretend, you have a variable named targetResource of type User.

Somewhere in your script, an information source returns the target resource's username, and it's stored in a variable named userName, of type String.

Then the only thing needed is to drop in the Get User Step, where the User ID field will be set to userName, and the Output User field to targetResource.

Finally, you use targetResource in the Select Resource step.

G.

Does your Set step look like

Does your Set step look like this?

Set target_agent = USER[avholloway]

Where, avholloway is the agent ID?

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Bronze

Thanks Anthony,This worked!

Thanks Anthony,

This worked! However, I need to be able to populate it from a String variable? Is this possible?

Matty

Set my_string_variable =

Set my_string_variable = "avholloway"
Set target_agent = USER[my_string_variable]
Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Bronze

Thanks Anthony! Easy when you

Thanks Anthony! Easy when you know how wink

One issue I have found is if the username does not exist or is incorrect then the script throws up an Exception:

"unable to create user: user.name; nested exception is:

com.cisco.user.UserNotFoundException: User id: user.name"

As I'm getting the username from the customer's CRM database I would not expect it to send an invalid username but is there a way I could handle the exception and move on with the script? Currently it just drops out?

 

Thanks as always!

Matty

Can you write it like this

Along the same lines as originally set up..

 

Bronze

Perfect! Many thanks!

Perfect! Many thanks!

Bronze

Thanks Anthony! Easy when you

Thanks Anthony! Easy when you know how wink

One issue I have found is if the username does not exist or is incorrect then the script throws up an Exception:

"unable to create user: user.name; nested exception is:

com.cisco.user.UserNotFoundException: User id: user.name"

As I'm getting the username from the customer's CRM database I would not expect it to send an invalid username but is there a way I could handle the exception and move on with the script? Currently it just drops out?

 

Thanks as always!

Matty

773
Views
5
Helpful
10
Replies
CreatePlease login to create content