Passing Variable to Make REST Call URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2017 12:36 PM - edited 03-14-2019 05:37 PM
I am making customer script that calls on a different API to query their Data Base and return some Client information.
So far I have that working but the problem is it only works if I hard code the phone number in the URL (client lookup is done by phone number). I have created a Get Call Contact Info to collect the incoming number and I'm storing that in a String Variable. My question is how do I pass that variable to the URL?
This is what the URL looks like right now and as you can see I'm manually putting in the number.
"https://ppjs.legalserver.org/matter/api/caller_id_search/?number=904123456&output_format=xml"
- Labels:
-
Other Contact Center
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2017 04:12 AM
Try
"https://ppjs.legalserver.org/matter/api/caller_id_search/?number="+ clid +"&output_format=xml" in URL where clid is the string variable holds calling number.
or pass it as a parameter
where
URL = "https://ppjs.legalserver.org/matter/api/caller_id_search/"
and parameters are
"number"=clid
"output_format"="XML"
do some normal debugging and see if you are getting the request in correct format, i am not sure if "?" is what goes into URL or not but try with having it and not having it.
