ANNOUNCEMENT - The community will be down for maintenace this Thursday August 13 from 12:00 AM PT to 02:00 AM PT. As a precaution save your work.
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
493
Views
20
Helpful
14
Replies
Highlighted
Beginner

UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

New to UCCX scripting, but I wrote and entire medical eligibility UCCX IVR app and I'm stuck on this one thing only.What do you use in the script to execute this webcall. "http://192.168.5.5/logEnter.php?LOG_ID=2222"

This is a confirmation number add to the back end database. The PHP script will take the 2222 and write it to the  MySQL database. I have all the PHP done and tested. There will be no data return with this call from the UCCX script. I have all my data fetching working just fine using "Create URL Document", "Create XML Document" and "GET XML Document" UCCX will not just let me use "Create URL Document" by itself to execute this call. How do I just "send out" and http call with nothing in return?

5 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Are you ready for this?

Set http_resp = URL[http://192.168.5.5/logEnter.php?LOG_ID=2222]

Where http_resp is a String variable.

 

EDIT: Create URL Document doesn't actually make the HTTP call.  It just prepares the variable for you to use it later, in another step, which will make the HTTP call.  E.g., Create XML Document.

View solution in original post

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

On the Select Resource step their is a field called Selected Resource.  You will need to create a new User type variable to use in this field.

E.g., Call it selected_agent

From there, you can do your other magic, using the following to sub in the user's user ID where needed: selected_agent.getId()

E.g.,

Set http_resp = url["http://server/call?userid=" + selected_agent.getId()]

View solution in original post

Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Gosh Anthony, I really appreciate the help. I just finished putting that all what you told me together and tested it and it works great! Just what I needed. I have the WebEx teams as well here at my company. I will remember that for next time! 

View solution in original post

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Awesome! I'm glad to hear it. If you don't mind please kindly hit those helpful buttons on posts you think helped out. It helps me in return. Happy Friday!

View solution in original post

14 REPLIES 14
Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Are you ready for this?

Set http_resp = URL[http://192.168.5.5/logEnter.php?LOG_ID=2222]

Where http_resp is a String variable.

 

EDIT: Create URL Document doesn't actually make the HTTP call.  It just prepares the variable for you to use it later, in another step, which will make the HTTP call.  E.g., Create XML Document.

View solution in original post

Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Anthony, are you saying that by itself, with those box brackets, that statement will actually be an executable type set statement that will perform the http call by itself? I did manage to find in the forum here that the "Create URL Document" followed by the "Cache Document" actually makes the http call work. How was I ever to know, the word "Cache Document" gives no hint to executing a web call. Im still learning. Im interested in this though: Set http_resp = URL[http://192.168.5.5/logEnter.php?LOG_ID=2222] If it will work like this, then I can naturally make the 2222 part a variable, a concatenated one at that, with delimiters, so I can send date,time,confirmNumber, DOB, etc all in the one call?

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Yeah, the product is a little confusing, and the documentation could probably stand to be re-written fresh; I agree.

 

Either way, yes, what I gave you does exactly what you want it to do.  Here is an example:

 

My server-side code, in ASP, which echos back what you sent it:

uccx-url-asp-code.png

 

Me executing the URL in the browser, just so you can see how it works

uccx-url-ie-example.png

 

Me doing the same thing, but from a UCCX script, so you can see how it works:

uccx-url-script-example.png

 

EDIT: This action results in an HTTP GET.  In the following post I also show how to send an HTTP POST

 

https://community.cisco.com/t5/contact-center/sent-http-request-using-uccx-and-receive-a-json-response/td-p/3175409

Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

This is so SIMPLY SIMPLE. Worked perfect and I can use this in a lot of places in the medical claims app I am building now, thank you very much.

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Anthony, this is about the only way I know how to maybe get a hold of you. In my medical app scripts, I collect a bunch of already keyed in variables like SSN#, DOB, etc. If the caller who is in this medical app wants to then speak to a CSR girl, they opt out as usual and wait in que. Now before the agent picks up their waiting call, I need to know who that Finesse agent is (it doesn't matter what type of identifier it is, if its a constant I can tie that into an agent name). I know that the UCCX already knows who its going to send the call to while holding in que. We have this in house system that gives the CSR's a screen with pre-populated information on it, and they also enter in customer info when they pick up the que call. We dont use Finesse/Gadgets for this, unfortunately. So in the script I have it send all the collected data to my PHP which then does a JSON POST to the other system we have for that special screen. Where do I look in the UCCX to find out who the call is going to before she answers it, so I can immediately POST my information to the other system which will then present her the screen with all my info on it and then some. ? 

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

On the Select Resource step their is a field called Selected Resource.  You will need to create a new User type variable to use in this field.

E.g., Call it selected_agent

From there, you can do your other magic, using the following to sub in the user's user ID where needed: selected_agent.getId()

E.g.,

Set http_resp = url["http://server/call?userid=" + selected_agent.getId()]

View solution in original post

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

I now have a Webex Teams link in my signature, so you have a new way of getting a hold of me. :)
Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Gosh Anthony, I really appreciate the help. I just finished putting that all what you told me together and tested it and it works great! Just what I needed. I have the WebEx teams as well here at my company. I will remember that for next time! 

View solution in original post

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Awesome! I'm glad to hear it. If you don't mind please kindly hit those helpful buttons on posts you think helped out. It helps me in return. Happy Friday!

View solution in original post

Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

I have a question about knowing who the resource is before she answers the phone. All the logic works perfectly that you said to do Anthony. I placed my http POST to execute right at the selected resource 'selected' step, which is just before the connect to resource step. So what happens if the resource I expected to answer the call decides to paint her nails and the call goes to someone else but I already told the back end database who was SUPPOSED to answer the call. Is this the best I can do regarding positioning of my POST in the script, maybe how do I account for a last minute (or 5 seconds) change of resource?

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

Could you not just move the POST to the Connected branch, which means the call was answered?
Highlighted
Beginner

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

I can, sure. I am not well versed in the UCCX when acting as a call que/CSR thing, like it does 99.9% of the time, as I'm more into making it do database fetches and things like that. My co-worker, she takes care of the front end UCCX menus and queuing of calls for the CSR girls. So are you saying the 'connected' branch is only active when the CSR answers the phone, so if I put my POST there it would already know who the call is going to and if that should change would I then know the new person the call is going to because it hasn't technically 'connected' yet? If it works this way, that would be great so then it would be a race against time for the POST to get to the back end and for the back end to then push the data to the CSR screen. I think the POST and the back end pushing the data to the CSR screen would win because of how slow the CSR is in actually picking up the phone when ringing. Would you agree?

Highlighted
VIP Mentor

Re: UCCX 10.6 step needed to execute http webcall to PHP script to write one word into MySQL database

That all sounds good to me.