Add AMPscript to SMS messages to allow a user to write and send a custom SMS message through Distributed Marketing. SMS messages are sent through journeys using the MobileConnect SMS message activity.
Required Editions
| User Permissions Needed | |
|---|---|
| To enable a custom SMS message: | Access to App Builder or Experience Builder |
Considerations:
- Custom SMS messages are available in all Quick Send workflows except Quick Send Bulk Send where SMS isn’t supported.
- The default maximum character limit is 160. You can configure this limit to up to 500 characters in Settings.
- Distributed Marketing is optimized for GSM characters only. Distributed Marketing doesn’t programmatically prevent users from entering or sending non-GSM characters. However, the maximum character count doesn’t automatically update to reflect new character limits per message. If a user includes non-GSM characters, up to three messages can be sent.
To enable a custom SMS message, configure an SMS message activity with the following settings in Journey Builder:
-
In Message Definition, enter this AMPscript in the message:
%%[Set @smsValue = AttributeValue("smsValue")]%%%%=v(@smsValue)=%% - In Delivery Options, select the Send only to contacts who are subscribed currently subscriber option-in option.
-
Finish creating the SMS activity.
Note smsValue must be included in the journey’s entry event data extension.