Sms
Definition
The Sms
verb sends an SMS message to a phone number during a phone call. Use the attributes to define the receiving and sending parties. If an action
attribute is added to the Sms
verb, all verbs remaining in the current FlexML instructions are ignored. If no action
is provided, the call flow will move to the next verb in the current FlexML instructions.
SMS messages up to 670 characters are supported. If the length of the text message exceeds the standard length of 160 characters, it will be split into several segments.
Supported Attributes
These attributes can be used to modify the Sms
verb. They are inserted as name-value pairs in the start-tag.
Attribute | Data Type | Description |
---|---|---|
action | string | The link to the set of FlexML instructions that will be requested after the Sms verb has been executed. |
from | string | The phone number that will send the message. The phone number must be in the E.164 format. If no from value is added, this value will default to the phone number that the call is from. |
method | string | The type of request made to the action URL. Values accepted in this field are POST or GET . The default value is POST . |
to | string | The phone number that will receive the message. The phone number must be in the E.164 format. If no to value is added, this value will default to the phone number that received the call. |
Example
In this example, an SMS message is sent to the phone number value of to
. The message body is added between the Sms
tags. If no to
and from
attributes are added to the Sms
tag, the sending party will default to the calling party, and the receiving party will default to the called party.
<Response>
<Sms to="15162065317">Have a great day!</Sms>
</Response>
Nesting Rules
- You cannot nest other verbs or nouns within the
Sms
verb. - You cannot nest the
Sms
verb within other FlexML verbs.