- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 10:36 PM
How can we achieve automation for onboarding process or day-to-day activities in the PCCE and UCCE using AXL/API? i have used WSDL/AXL request for CUCM automation, so i am looking for something like that.
Solved! Go to Solution.
- Labels:
-
Other Contact Center Topics
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 01:29 AM
Hey
For the PCCE/UCCE you have to use the REST api
PCCE Overview - Packaged Contact Center Enterprise - Document - Cisco Developer
For adding new agents :
Agent Call API - Packaged Contact Center Enterprise - Document - Cisco Developer
Thanks, Thomas G. J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 06:28 AM
If you are updating then the method must be PUT. The URL for the PUT is the server destination plus the refURL for the agent in the GET response. An insert would a POST. It has been a couple years since I wrote my script, so it is a little murky. I do have a vague recollection of not being able to update certain things. Sorry that isn't more specific. My suggestion would be to only include the items you are changing in your update XML. You will decrease the footprint of what you have to troubleshoot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 01:29 AM
Hey
For the PCCE/UCCE you have to use the REST api
PCCE Overview - Packaged Contact Center Enterprise - Document - Cisco Developer
For adding new agents :
Agent Call API - Packaged Contact Center Enterprise - Document - Cisco Developer
Thanks, Thomas G. J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2023 11:05 AM
Thanks a lot Thomas, i will have a look into these and will post my status in few days. However i am sure that you have directed me the correct direction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 03:44 AM
hi Thomas, now i have completed the script which can pull user data or PCCE configurations, however i have query on two things here. 1) if i have to query the PCCE AW for a specific agent using his AgentID, is that possible ? because in PCCE unless we do SQL query we will not have the 4 digit reference ID for the agent. 2) If we have to do POST request how can we have the XML file ? or if we use json, how to identify the user here?
thanks again in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2023 07:44 AM
Hey
In the get statement for agent the url is
<server>/unifiedconfig/config/agent/<id>.
or you can make an search with
<server>/unifiedconfig/config/agent?agentId=<agentId>
for the post the xml is a part of your body in the request (not a file, but the xml itself)
Thanks, Thomas G. J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 09:33 AM
hi Thomas,
hope you are having a wonderful day
Yes i am able to do the get using the url you have mentioned above. however in generals we may not have the ID to use in <server>/unifiedconfig/config/agent/<id> handy and it is not easy in the script (at least what i felt). Yes i tried using agent?agentId=<agentId> , this pulls out all agents in the server.
In the script i have built using below codes :-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 11:54 AM
I have used this statement to make REST updates to agents in PCCE.
u = requests.put(pcce_durl, data=update_xmlbody, headers=post_headers, auth=pcce_dauth, verify=False).text
Keep in mind that any time you update something in CCE, you have to include "changeStamp" from the prior GET. This is how CCE handles concurrency. If something else (like the GUI) had made a change to that row, the changed would fail since you weren't updating from the most recent version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2023 08:31 PM
Thanks Elliot for the helping hand. Good info!!
if you don't mind can i have the contents of these two items : "update_xmlbody" and "post_headers" as a reference to build mine.
i am newbie to all these
thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 05:22 AM
There is only so far I think I can go since there is customer and company IP in there, but this is what I can share.
post_headers = {'Content-Type': 'application/xml'}
I use etree from the lxml libraries to build the information I am going to send, and then convert it to xml like this.
update_xmlbody = etree.tostring(Update_agent, xml_declaration=True, pretty_print=True)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 03:36 AM
hi Elliot,
As my 'GET' request is working fine with a output like below
pcce_api_url : "https://<Server Name>/unifiedconfig/config/agent/6617/"
Get Query : response = requests.get(pcce_api_url, auth=auth, verify=False,)
Output : (formatted to look good)
b'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<agent>
<refURL>/unifiedconfig/config/agent/6617</refURL>
<changeStamp>30</changeStamp>
<agentId>12345</agentId>
<agentStateTrace>false</agentStateTrace>
<agentTeam>
<refURL>/unifiedconfig/config/agentteam/5043</refURL>
<name>LondonSupport</name>
</agentTeam>
<datacenter>
<refURL>/unifiedconfig/config/datacenter/5191</refURL>
<name>EMEA</name>
</datacenter>
<person>
<firstName>ABCD</firstName>
<lastName>XYZ</lastName>
<loginEnabled>true</loginEnabled>
<ssoEnabled>false</ssoEnabled>
<userName>54321</userName>
</person>
<supervisor>false</supervisor>
<agentDeskSettings>
<refURL>/unifiedconfig/config/agentdesksetting/5011</refURL>
<name>Telecom</name>
</agentDeskSettings>
</agent>
b'<!doctype html><html lang="en"><head><title>HTTP Status 405 \xe2\x80\x93 Method Not Allowed</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 405 \xe2\x80\x93 Method Not Allowed</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Method Not Allowed</p><p><b>Description</b> The method received in the request-line is known by the origin server but not supported by the target resource.</p><hr class="line" /><h3>Apache Tomcat/7.0.108</h3></body></html>'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2023 06:28 AM
If you are updating then the method must be PUT. The URL for the PUT is the server destination plus the refURL for the agent in the GET response. An insert would a POST. It has been a couple years since I wrote my script, so it is a little murky. I do have a vague recollection of not being able to update certain things. Sorry that isn't more specific. My suggestion would be to only include the items you are changing in your update XML. You will decrease the footprint of what you have to troubleshoot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 09:14 AM
Thanks a lot Elliot
Finally now i have a working script which is updating agents details. to be frank i am short of words to explain my happiness and gratitude. thanks a lot you made my day for sure. i really don't know how really i can thank you beyond this. have a wonderful Week and wonderful yearend!!
Thanks Thomas, you initially gave me the confidence that i can start my baby steps. you too have a wonderful week and wonderful yearend!!
