cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2567
Views
10
Helpful
6
Replies
Oliver Henning
Beginner

UCCX: How to assign a skill to an agent?

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

6 REPLIES 6

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.

Chris Deren
Hall of Fame Master

You might be better served posting your questions here:

https://communities.cisco.com/community/developer/express-configuration-api

 

Mark Grace
Beginner

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?

Richard Simmons
Participant

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

George Paxson
Beginner

I figure there has been a long time.  This has been answered?  I just coble together some Python.

George Paxson
Beginner

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()

 

 

Content for Community-Ad

Spotlight Awards 2021