Showing results for 
Search instead for 
Did you mean: 

Uccx rest api script

Hello community 
I’m working on a uccx script which use rest api post. We are trying to send an sms to customer based the option selected .
My message body has to be

"UserID": "userid",
"Password": "pass",
," س شسي" :"Message"
"Language": "64",
"ScheddateTime": "01/22/2017 00:00:00", "MobileNo" : ["9689980XXXX","968994521XX"], "RecipientType": "1"

In this body mobileNo must be callers  mobile number  and scheduledatetime must be the called time.
Can some one guide me how to make this happen

Response Signature

2 Replies 2

What do you have so far? So here are the steps you'll need to take:

1. Format your JSON string, you can use concat or a replace function to fill the dynamic data. Start with hard coded data to make sure things works.

2. Create the Make REST Call step.

3. Validate results, error checking etc.

For step one here's something to get you started:

myJSON = 

"{'UserID': 'userid','Password': 'pass','س شسي': 'Message','Language': '64','ScheddateTime': '01/22/2017 00:00:00','MobileNo':'9689980XXXX','RecipientType':'1'}"




Make a variable type string. Set it to be:

D[now].month.toString() +"/"+D[now].date.toString() +"-"+D[now].year.toString()+" "+ T[now].hour.toString()+":"+T[now].min.toString()+":"+T[now].sec.toString()

Then you get the current dateTime in you format.

Make a variable string. Set it to be the calling number from the Get Call Contact Info 

Make your body to the restStep:


"{'UserID': 'userid','Password': 'pass','Message':'س شسي','Language': '64','ScheddateTime': '"+ [datetimeVariable]+"','MobileNo':'"+ [callingNumberVariable]+"','RecipientType':'1'}"


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