cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4830
Views
0
Helpful
5
Replies

UCCX write exceptions to a log file

angelstarr
Level 1
Level 1

I've configured the standard uccx callback script with the phantom queue. My customer wants to log all calls that resulted in busy, invalid or unsuccessful from the call redirect step to a http or sftp server. The idea is to later grab that file and load it to an outbound campaign that will try to initiate another attempt for a callback.

 

I was not able to find an example script that can write information from variables to an external sftp or http server.

 

Has anybody done that?

1 Accepted Solution

Accepted Solutions

I was able to get it working by using the following format for the body. See more details in the attached pics

 

 

"<campaignContacts>" +
System.getProperty("line.separator") +
"<campaign name="+ '\"'+"DevOutboundAgentPreview"+'\"'+">"+
System.getProperty("line.separator") +
"<refURL>"+ RestUrl+"</refURL>"+
System.getProperty("line.separator") +
"</campaign>"+
System.getProperty("line.separator") +
"<allowDuplicateContacts>true</allowDuplicateContacts>"+
"<csvdata>"+
System.getProperty("line.separator") +
"phone1"+
System.getProperty("line.separator") +
callbackNumber +
"</csvdata>"+
System.getProperty("line.separator") +
"</campaignContacts>"

View solution in original post

5 Replies 5

That can be done, but it would be easier to flag the calls so you can report on the later. Set one of the custom call variable to a particular value like "Callback-failed" and do a set enterprise data step to have CCX write that data into the callcontactdetail table. It might have to a custom report, but it makes the mechanics of the script much easier.

I'm already using custom call variables to tag the progress of the call and built custom call variables report. That will keep a log of what happened but I want to automate the process of loading contacts to the outbound campaign.

Thinking about setting up a node.js server to fetch the data from uccx via REST call step and write it to a txt file. Will setup a SFTP server to serve that txt file and config auto import of contacts from UCCX outbound campaign.

Hey angel.

 

I understand that you will automate it... Here is an example of the uccx script that I would build it

 

 

 

The url will call your node.js server with the phonenumber. Then you have to build your node.js server to get that and append that to you file. (Im not a node.js programmer so can't show anything about that - sorry. Im using c#)

 

Another way that is even more automated is that you call the uccx api directly from your script and insert the number (and a dialtime) in your campaign. 

Add Contacts to Campaign - Contact Center Express - Document - Cisco DevNet

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Thomas G. J.

I like the idea about using REST API call from within the ccx script. I got the api call to work from postman but I cant get the proper format inside ccx script Make REST call step. 

Attached are the call and the body details inside the script and the working ones inside Postman. The body inside the script is one line with each string surrounded by "". The server returns error 400 Bad Request. 

Any ideas how to properly format the api call inside the script?

 

 

I was able to get it working by using the following format for the body. See more details in the attached pics

 

 

"<campaignContacts>" +
System.getProperty("line.separator") +
"<campaign name="+ '\"'+"DevOutboundAgentPreview"+'\"'+">"+
System.getProperty("line.separator") +
"<refURL>"+ RestUrl+"</refURL>"+
System.getProperty("line.separator") +
"</campaign>"+
System.getProperty("line.separator") +
"<allowDuplicateContacts>true</allowDuplicateContacts>"+
"<csvdata>"+
System.getProperty("line.separator") +
"phone1"+
System.getProperty("line.separator") +
callbackNumber +
"</csvdata>"+
System.getProperty("line.separator") +
"</campaignContacts>"