|
Name
|
Required / Optional
|
Explanation
|
|
connectorType
|
Required
|
This is the type of Connector to be used, and must be set to a valid Connector type such as "connector-sms-twilio". Connector types can be found in the Connectors Section by selecting a Connector and referring to the text in the top-right corner.
|
|
connectorName
|
Required
|
This is the Connector Name of the specified Connector that you wish to use to send the message.
|
|
subject
|
Optional
|
This is the subject line of the generated message (availability of this capability is provider-specific).
|
|
recipients
|
Required
|
These are any recipients of the generated message, provided either as an array of strings, or as a comma- or semicolon-separated string.
|
|
from
|
Optional
|
This is the number the message will appear to be sent from (availability of this capability is provider-specific). If not provided, then the default specified in the Connector itself will be used.
|
|
body
|
Required
|
This is the body of the message.
|
|
defer
|
Optional
|
This is the time to defer sending of the message to, specified either as a JavaScript date object or a string in the format "YYYY-MM-DD hh:mm:ss". If not provided, then the message will be sent immediately.
|
|
callback
|
Optional
|
This allows the provision of a "callback" function which will be executed once the message scheduling attempt has returned, allowing you to react to either successful or failing message scheduling.
|
|
Script.Sms.Send(
"connector-sms-cirrus",
"Cirrus Example Connector",
undefined,
["+441234567890", "+10987654321"],
"+441234098765",
"Please remember that you have an appointment at " + [Time],
undefined,
function(response) { if(response.Error != "") { Script.Toast.Error("SMS Failure", response.Error); } }
);
|
|
Script.Sms.Send({
connectorType: "connector-sms-twilio",
connectorName: "Twilio SMS Example Connector",
recipients: "+10987654321",
from: "+441234098765",
body: "We've raised your issue with an engineer, and your Job ID is " + [var_csSessionID],
callback: function(response) { if(response.Error != "") { Script.Toast.Error("SMS Failure", response.Error); } }
});
|