Can any guide me to send SMS for multiple numbers at a time?

Divya K1
Tera Guru

Hi All,

 

am trying to notify sms to user contact phone number and also for alternate phone number but sms is triggering only for one number not for alternate contact number.. Please guide me to send sms to both phone numbers at a time????

1 ACCEPTED SOLUTION

Hi ,

 

I have used below code, it is triggering for two fields,

var conatctPhone = current.u_contact_phone;
                var altContactPhone = current.u_alt_contact_phone;
                var mynumbers = [conatctPhone, altContactPhone];
                for (var i = 0; i <= mynumbers.length; i++) {
SNC.Notify.sendSMS('+twilionumber', ' ' + mynumbers[i], ''
 + current.u_contact_phone , + " " + gs.getMessageLang("test austria SMS Message", 'de'), current);

View solution in original post

3 REPLIES 3

Kieran Anson
Kilo Patron

How are you currently generating these SMS's (business rule, flow, etc). Also, to confirm, are you using the Notify plugin for this

Hi Kieran,

 

Yes, we have installed notify plugin. I am generating sms through business rule. Here is the syntax below :

 

SNC.Notify.sendSMS('+twilionumber', '' + current.u_contact_phone , + " " + gs.getMessageLang("test austria SMS Message", 'de'), current);
 
the above syntax is working fine, sms is triggering for one contact phone.
 
now i need to send for both contact number and also for alternate contact number.. how to do that?
 
we are using contact number and alternate contact number fields are from our custom table?

Hi ,

 

I have used below code, it is triggering for two fields,

var conatctPhone = current.u_contact_phone;
                var altContactPhone = current.u_alt_contact_phone;
                var mynumbers = [conatctPhone, altContactPhone];
                for (var i = 0; i <= mynumbers.length; i++) {
SNC.Notify.sendSMS('+twilionumber', ' ' + mynumbers[i], ''
 + current.u_contact_phone , + " " + gs.getMessageLang("test austria SMS Message", 'de'), current);