cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4625
Views
35
Helpful
20
Replies

Make REST Call??? CCX 10.6,1

Mark Verwey
Level 1
Level 1

Working on a new project that will require pulling information from a database via an API.  The way this "should"work is that when a call comes in, the script grabs the ANI/CLID information and then makes the initial call to the API to see if the callers number is in the database, and if that is true then pull additional information about them like account number, zip code, and name.  Depending on the option they choose it will need them to verify this additional information by entering it through their telephone keypad.  If they are able to verify at least 2 additional items, then allow them to hear their account balance or change/set the pin associated with their account.  I have attempted to setup the "Make Rest Call" in the editor.  I have the URL, and  but not sure what I'm doing and other than the URL, I haven't got a lot of time to get this working.  If anyone can point me in the correction it would be most appreciated.

20 Replies 20

You need square braces and not parenthesis!

E.g.,

Not this: Validation(0), but this: Validation[0]

I had a bad URL yesterday while testing, Now I have a working URL and put it in the String array.  When I debug now, it fails at the same step; Make REST Call.  Here is the error that pops up

 

"Exception:  Illegal character in query at index 61:  http://servername123/api/ivr/useraccounttstatus?=phoneNumber=<phoneNumber>?AccountStatus="

 

The count is the variable phoneNumber that I collected when the call came in as ANI.  In the step just before the Rest call step I set the phoneNumber to = the ANI, which I see in the variables field is set correctly.  

 

Any idea why its not putting the phone number in the variable spot?

Finished the script with the editor and passed the validation, saved it to the CCX server and started a reactive debug session.  When it came to the first Make REST Call step it fails, here is a screen shot of the error I'm getting.  Not sure where to look?

 

 

It's pretty obvious there. Character 43 is a <. Looks like your var placeholder should have been replaced with a real value. Can you tell why it failed from the logs?

I guess thats part of my problem here, I dont know which logs to look at.  I'm guessing you are talking about pulling logs via RTMT from the CCX server.  WHich ones should i be looking at to see whats going on with the script?

Sorry, I don't have much practical experience wit CCX or version 10.6 to tell you where to look. Whichever code is setting your phoneNumber parameter.

If I thought the problem was in the CallStudio script then I'd look under .\AUDIUM_HOME\applications\[your app name]\logs

 

Be warned though, that taking a second look at your screenshot URL, you have 2 question marks '?' in there. That's invalid syntax. You'd have to choose either phoneNumber or EnrolmentStatus, or separate with an ampersand instead. Reference question - https://stackoverflow.com/questions/5998425/url-format-with-get-parameters