cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2184
Views
0
Helpful
13
Replies

Programatically Changing Skills in UCCX

rrauscher1
Level 1
Level 1

Hi.  We use skills to determine which CSQ our agents are assigned to. We regularly add and remove skills depending upon our particular needs for different times of the week.  For example, during the week, we have dedicated people on our billing line but on the weekends, some people need to pull double-duty and answer both billing and technical support. 

At the moment, the supervisor needs to manually add and remove skills (to add and remove agents from different CSQs).  I would like to automate this process.  We have a schedule that I can make machine-actionable but I can't seem to find a way to programmatically add/remove skills.  I know what tables the skills mappings are stored in but a) I'm not sure it's cool just to mess with those tables and b) the user I use -- uccxhruser -- doesn't have write privs to those tables.

Does anyone have any thoughts on this?

Thanks

2 Accepted Solutions

Accepted Solutions

Chris Deren
Hall of Fame
Hall of Fame

Depending on your version you can use built in REST API to make these changes. Check out Cisco dev links:

https://developer.cisco.com/site/uccxapi/overview/

View solution in original post

Indeed, I believe the REST API was opened on CCX 9.0, but I don't recall exactly. If you are on anything older this will not be an option, but might be a reason for an upgrade :-)

View solution in original post

13 Replies 13

Chris Deren
Hall of Fame
Hall of Fame

Depending on your version you can use built in REST API to make these changes. Check out Cisco dev links:

https://developer.cisco.com/site/uccxapi/overview/

Thank you.  I'll track down that lead.  I've been doing everything with just database queries so far.  This opens up possibilities.

Indeed, I believe the REST API was opened on CCX 9.0, but I don't recall exactly. If you are on anything older this will not be an option, but might be a reason for an upgrade :-)

We're on 10.x so this should be a good place to start.

As it turns out, there does not appear to be a way to add skills to resource mappings in the 10.6 API. It's strange because you can do a lot of other things (e.g. add a skill in general).  My next step is to look at the Finesse APIs.

Unless I'm missing something, it seems like you can't even determine who is ready and not --stuff that you can easily do with the database queries.

So, I ultimately got this working which was particularly pleasing after Cisco support told me it was impossible (yes, I know that the TAC doesn't support developer questions).

Anyway, the answer was to pull down the JSON structure associated with an individual "resource", e.g.

https://UCCXHOST/adminapi/resource/USER

Alter the JSON to what you want (adding and removing skills) and sending it back as a PUT.

BUT, beware, there appears to be a bug with their JSON parser in that the order of the data elements matters. I've called that in.  According to the JSON RFC, order shouldn't matter.

Would you be able to elaborate on which order this needs to be in? I am currently having this same issue - I can find that I can PUT this into a REST web browser plugin fine - with my JSON with a PUT; But as soon as I introduce this to my python script - it errors out with...

 

name [null] is not a valid","errorMessage":"Not a valid link uri","errorType":"InvalidInput"}]}

 

sflanagan
Level 1
Level 1

I also have been tasked with getting this done. Being this is a rather old thread wonder if I can give it a bump! 

 

I developed a way to bulk update skills. It has some caveats but I created it to suit my needs. I took a very backward approach that worked to format the JSON for the upload, and used pandas and an csv to hold the data.

I figured this out as well using Python and XML. don't care to much for Java script. 

Let me know if you would like to see the code. 

 

 

sflanagan,

I would like to see the code please. I have been working on a few similar things.

I PM'd you a question. the short answer is sure. Its not finished yet. but if you have a GitHub account. PM me the account. 

 

Thanks,

Stephen 

 

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: