03-01-2018 09:04 AM - edited 03-14-2019 06:00 PM
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.
03-14-2018 02:26 PM
03-29-2018 08:08 AM
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?
03-28-2018 09:41 AM
03-29-2018 04:56 PM
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?
03-30-2018 10:32 AM
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?
03-30-2018 10:55 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide