The sendSms sends an SMS message to a Contact selected in the Rule.
This rule does not have extra elements as you can see in the following XML.
<sendSms id="sendSms_1" label="sendSms_1" from="$_partnerName" destinationPhoneNumber="?" destinationContactId="?" destinationContactName="?" message="Text" />
The attributes in this rule are:
The Origin the Message is being sent from. We only allow to set this attribute as $_partnerName.
The text we want to send in the message
This is the destination phone number to which the message should be sent. This phone number must belong to a contact, if not the message will not be sent so this field need to be in combination of destinationContactId or destinationContactName
This is the unique ID of the Contact.
This is the Contact's Display Name. You can have multiple contacts with the same Name so if you decide to use this attribute in combination with destinationPhoneNumber then the first Contact which mataches this name will be taken if there are multiple
|smsAlertDestinationType||Allows sending of SMS email alerts to the PRIMARY or SECONDARY email address of a Contact. Possible values are PRIMARY, SECONDARY, BOTH. Defaults to PRIMARY.||NO|
|smsAlertDestinationBehaviour||When a Contact has multiple email addresses of a certain type, this attribute allows deciding on whether only the FIRST one receives the SMS email alert, or ALL will receive the missed call alerts. Possible values are FIRST, ALL. Defaults to FIRST.||NO|
Should an SMS email alert be sent? Possible values are NONE, FAILED_SMS, ALL_SMS.
|smsAlertEmailTemplateName||The email template which will be used when sending SMS email alerts.||NO|
|smsAlertFrom||The from email address which will be used to send the SMS email alerts.||NO|
|smsAlertFromName||The from name which will be used to send the SMS email alerts.||NO|
|callbackUrl||URL we will send the delivery receipts to.||NO|
|callbackUrlHeaders||Additional headers we will be sending with the delivery receipt call back. If multiple headers need to be included, please separate them by ",".||NO|
Send an SMS with a fixed Contact by name and phone number.¶
We are selecting a Contact by destinationPhoneNumber and destinationContactName so if you have duplicated contact names then the first Contact for that combination will be taken (we advise to use destinationContactId). In the example, every time a caller reach this rule, Bob will received a message saying "This is a message is from IOVOX!!".
<sendSms label="sendSms_1" from="$_partnerName" id="sendConfirmationSms" destinationPhoneNumber="447400000000" destinationContactName="Bob" message="This is a message from IOVOX!!" />
Send an SMS with a fixed Contact by id and phone number.¶
Same as above but this time using the destinationContactId to refer to the Contact
<sendSms label="sendSms_1" from="$_partnerName" id="sendConfirmationSms" destinationPhoneNumber="447400000000" destinationContactId="1" message="This is a message from IOVOX!!" />
Send an SMS with a variable Value¶
If you want to apply the same rule to different Contacts across multiple Links then we will need to set the rule with variable values.
<sendSms label="sendSms_1" from="$_partnerName" id="sendConfirmationSms" destinationPhoneNumber="?" destinationContactName="?" message="This is a message from IOVOX!!" />
Send an SMS with Delivery Receipt callback¶
If you want to receive delivery receipts for the SMS's which are sent from within a Call Flow, then the callbackUrl needs to be added. You can send additional headers in this callback by adding the callbackUrlHeaders attribute.
<sendSms label="sendSms_1" from="$_partnerName" id="sendConfirmationSms" destinationPhoneNumber="447400000000" destinationContactName="1" message="This is a message from IOVOX!!" callbackUrl="https://my.dlr.callback.iovox.com/dlr" callbackUrlHeaders="Content-Type: application/json,X-Custom-Header: iovox" />
You don't have access to this feature: sendSms
Contact to your Account Manager about this issue.
|400||Rule ID Empty||Set the value of the id attribute|
|400||Rule Label Empty||Set the value of the label attribute|
|400||Message Empty||Set a value for the message attribute|
|400||Sender Empty||Set a value for the from attribute|
|400||Sender Invalid||Set the sender to $_partnerName|
|400||You need to select a Contact||The contact is not been set in the Send SMS Rule|
|400||Contact cannot have Variable and Fix details at the same time||The contact details cannot have variables values and fixed values at the same time. Please correct the attributes related to the Contact|
|400||Phone Number Invalid||The destinationPhoneNumber attribute contains an Invalid value|
|400||Destination Contact does not exist||The Contact does not exist in your account.|
|400||Sender is not internationalised||The from attribute needs to contain an internationalised number for example: 44741111111|