08-27-2015 12:48 PM - edited 03-14-2019 03:09 PM
Hi there,
in the UCCX_API Developer Guide I did not find a method how to assign a skill to an agent. How is this done?
Sincerely,
Oliver Henning
08-27-2015 12:55 PM
in UCCX skills are assigned in multiple ways using skill and de skill tool or in management portal where you create queues and skills you can add agents. You may want to search adding skills to agents or adding agents to a skill.
Good luck.
Baseer.
08-27-2015 01:24 PM
You might be better served posting your questions here:
https://communities.cisco.com/community/developer/express-configuration-api
08-27-2015 06:11 PM
Agent skilling was added for CCX 9.0(2), along with other Agent configuration, CSQs, Teams, & Applications (10.0 added Trigger support).
What version of CCX are you running and which version of the doc are you viewing?
01-08-2016 01:57 AM
Hi Oliver,
I'm looking into this myself at the moment and can add skills to individual users at a time, still trying to work out how to do it in bulk.
I did the following from the Advanced REST API plugin from Chrome.
Get a list of resources;
http://UCCXSERVER/adminapi/resource - (you will need to log in with the App Admin Account)
copy the text and put into a text editor
Get a list of skills;
http://UCCXSERVER/adminapi/skills
copy the text and put into a text editor
Find the user you want to add the skill too e.g.
<resource>
<self>http://UCCXSERVER/adminapi/resource/rsimmons</self>
<userID>rsimmons</userID>
<firstName>Simmons</firstName>
<lastName>Richard</lastName>
<extension>+44000001000</extension>
<skillMap />
<autoAvailable>true</autoAvailable>
<type>1</type>
<team name="Support Team">
<refURL>http://UCCXSERVER/adminapi/team/1</refURL>
</team>
<primarySupervisorOf />
<secondarySupervisorOf />
</resource>
Find the skill you want to add to them e.g.
<skill>
<self>http://CCXSERVER/adminapi/skill/1</self>
<skillId>1</skillId>
<skillName>Support</skillName>
</skill>
Now you need to add this to the resource - note the additional of the alias and the information under skillMap
<resource>
<self>http://UCCXSERVER/adminapi/resource/rsimmons</self>
<userID>rsimmons</userID>
<firstName>Simmons</firstName>
<lastName>Richard</lastName>
<extension>+44000001000</extension>
<alias />
<skillMap>
<skillCompetency>
<competencelevel>7</competencelevel>
<skillNameUriPair name="Support">
<refURL>http://UCCXSERVER/adminapi/skill/1</refURL>
</skillNameUriPair>
</skillCompetency>
</skillMap>
<autoAvailable>true</autoAvailable>
<type>1</type>
<team name="Support Team">
<refURL>http://UCCXSERVER/adminapi/team/1</refURL>
</team>
<primarySupervisorOf />
<secondarySupervisorOf />
</resource>
Change the address within the REST API plugin to the user
http://UCCXSERVER/adminapi/resource/rsimmons
Set the method to PUT
Paste in the above with the xml file info into the payload
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource>
<self>http://UCCXSERVER/adminapi/resource/rsimmons</self>
<userID>rsimmons</userID>
<firstName>Simmons</firstName>
<lastName>Richard</lastName>
<extension>+44000001000</extension>
<alias />
<skillMap>
<skillCompetency>
<competencelevel>7</competencelevel>
<skillNameUriPair name="Support">
<refURL>http://UCCXSERVER/adminapi/skill/1</refURL>
</skillNameUriPair>
</skillCompetency>
</skillMap>
<autoAvailable>true</autoAvailable>
<type>1</type>
<team name="Support Team">
<refURL>http://UCCXSERVER/adminapi/team/1</refURL>
</team>
<primarySupervisorOf />
<secondarySupervisorOf />
</resource>
Change the content type to application/xml and press send.
I am able to add skills to individual users this way but am now looking at how to do this for multiple users.
Hope this helps,
Richard
10-26-2020 01:29 PM
I figure there has been a long time. This has been answered? I just coble together some Python.
10-26-2020 02:07 PM
import StringIO
import requests
from optparse import OptionParser
ip,user,pwd = 'someserver','admin','cisco'
def update_user(var1, var2, var3, var4, var5):
xmlTemplate1 = """<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource>
<self>https://someserver/adminapi/resource/%(my_userid)s</self>
<userID>%(my_userid)s</userID>
<firstName>%(my_firstname)s</firstName>
<lastName>%(my_lastname)s</lastName>
<extension>%(my_extension)s</extension>
<alias/>
<skillMap>
<skillCompetency>
<competencelevel>%(my_skill_level)s</competencelevel>
<skillNameUriPair name="Service Desk">
<refURL>https://someserver/adminapi/skill/17</refURL>
</skillNameUriPair>
</skillCompetency>
</skillMap>
<autoAvailable>true</autoAvailable>
<type>2</type>
<team name="The A Team">
<refURL>https://someserver/adminapi/team/6</refURL>
</team>
<primarySupervisorOf/>
<secondarySupervisorOf>
<supervisorOfTeamName name="The A Team">
<refURL>https://someserver/adminapi/team/6</refURL>
</supervisorOfTeamName>
</secondarySupervisorOf>
</resource>"""
data = {'my_userid':var1, 'my_firstname':var2, 'my_lastname':var3, 'my_extension':var4, 'my_skill_level':var5}
xml = xmlTemplate1%data
axl_call(xml, var1)
def axl_call(data, userid):
header ={'content-type': 'application/xml'}
url = 'https://someserver/adminapi/resource/' + userid
r = requests.put(url,headers=header,data=data,verify=False,auth=(user,pwd))
if (r.status_code == requests.codes.ok):
print str(r.status_code) + ' OK'
else:
print '****************************'
print 'YOU MADE A MISTAKE SOMEWHERE'
print r
return
my_dict = {
'john.doe':['John', 'Doe', '80013437', '7'],
'jane.doe':['Jane', 'Doe', '80015608', '7'],
}
def main():
for item in my_dict:
print(item)
update_user(item, my_dict[item][0], my_dict[item][1], my_dict[item][2], my_dict[item][3])
if __name__ == '__main__':
main()
02-21-2024 09:03 PM - edited 02-21-2024 09:04 PM
Guys here's an updated one in python 3.12 working on UCCX 12.5 , the original was done on python 2, this can be improved further, but for most quick and dirty bulking of Skills in UCCX it will do the trick. Thank you to @George Paxson for doing the original one, it was helpful to me
02-21-2024 09:18 PM
Guys here is an updated version for python 3.12, it is working on UCCX 12.5 admin API. Thank you to @George Paxson for providing the originial one for python 2, this was incredibly useful to me!
02-22-2024 04:42 AM
Glad it has been helpful. Thanks for the update. My call center is not so large and most agents are technical in the mechanical services and engineering field. Agents have the permissions to update themselves as they know their schedule and availability needs. I have used the SOAP AXL interface much more frequently with CUCM in system migrations, consolidations. I recommend looking into jinja templates to simplify the xml to post and loading agent information from a yaml file. Boiler plate stuff for any SOAP AXL script.
02-22-2024 10:02 AM
02-28-2024 07:20 PM
Thank you @George Paxson !
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