10-01-2022 11:13 AM
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
10-01-2022 06:59 PM
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
10-03-2022 01:52 AM
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'}"
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