cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
305
Views
0
Helpful
2
Replies

Uccx rest api script

Nithin Eluvathingal
VIP Mentor VIP Mentor
VIP Mentor

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

david.macias
VIP Advocate VIP Advocate
VIP Advocate

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'}"

david

Thomas G. Johannesen
Contributor
Contributor

Hey

 

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 all useful posts and mark as answer if it solves your issue
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: