SMS templates are reusable message blueprints that you can select in campaigns and journeys to send your users as SMS and MMS messages. They can contain contain text, links, and images, and you can customize them with user profile data, event data, data feeds, and Catalog data.
# In this article
# Permissions
Before you can create an SMS template, make sure that:
- Your project has at least one SMS message type.
- Your project has at least one verified SMS sender (to check, go to Project Settings > Senders).
- You have the Create and Manage Templates permission.
# Message types and message senders
Understanding the relationship between SMS message senders and message types will help you as you create your templates.
In Iterable, when you define an SMS sender, you can:
Associate that sender directly with various message types that you can use when sending campaigns.
Or, you can choose to leave that sender unbound from any specific message types, allowing you to use the sender for all message types.
When you're building an SMS template, you'll first choose a message type, and then a sender who's allowed to send messages of that type.
Therefore, it is important to first create your message types, then your senders. After you associate an SMS sender with particular message types, you can only change them by contacting support.
# Creating an SMS template
To create an SMS template you can reuse for a single or multiple SMS campaigns:
Go to Content > Templates.
Click New Template > SMS.
Give your template a name that will make it easy to find when you (or your teammates) are setting up campaigns or journeys. This field has a 150-character limit.
Click Create Template.
There are other ways to create templates, too: as you're setting up a new campaign, and by using Iterable's API. To learn more, read Working with Templates.
# Creating an MMS template
You can create an MMS message by either adding a Media URL or a contact card to an SMS template.
MMS messages can contain up to 1600 characters in addition to a piece of multimedia content or file attachment.
# MMS link conversion
When you need to send content such as media or contact cards but the sender ID doesn't support MMS messages, you can still send a campaign using link conversion. This automated conversion happens just for the recipients who need it.
If you use Iterable SMS or Telnyx, then Iterable attempts to convert these files to a link for you before sending.
If you use Twilio, then your MMS files are processed into links by
Twilio's MMS converter
(when enabled).
These services apply automatically and you don't need to change the settings in your Iterable project or campaign to do this.
# Configuring the details of an SMS template
To update template details such as message type, sender, message, media URLs, etc., open it up and configure the options in the Details area.
To update these options, click Edit Details. As you make changes, the preview updates. When you're done editing, click Save or Cancel.
IMPORTANT
Do not include leading spaces in template details input fields — doing so can cause send failures. For example, to set up the Media URL field:
✅ www.fiterable.com
❌ www.fiterable.com
Below are descriptions of the various settings you'll see in the Details area.
# Message type
The category to associate with your template, which affects who receives campaigns based on it. To learn more, read:
If you have any SMS senders bound to a marketing message type, then the message type you choose here may change the senders available for the campaign. To learn more, read Managing SMS Opt-Outs by Message Type.
# Sender
The sender that the recipient sees for this message.
For SMS, the options in the message sender dropdown are determined by whether the sender was bound to a particular message type.
When you select a transactional message type, all SMS senders bound to marketing message types are disabled. You're only able to send marketing messages with senders associated with the marketing message type.
For help setting up a SMS sender, contact your customer success manager.
# Message
The content of your message. The body of an SMS message can contain:
- Text with GSM-7 or UCS-2 character encoding.
- Links, which you can shorten and track.
- Handlebars expressions and snippets.
- Special characters and emoji.
When you're working on a message, you can see the total character count, number of segments, and encoding type to the left of the message body.
Each SMS segment has a limited number of characters. This limit varies based on two factors: the character encoding of the message, and whether the message is one segment or multiple segments.
# Copy assist
To generate variations of message text, type text as you normally would (minimum, 10 characters), click the Iterate icon in the bottom corner of the text field (pink star), and select from the list or click Try Again. See Using Copy Assist.
# Inserting a snippet
To insert a snippet at the cursor's current location, click the insert snippet icon and select a snippet. For more information on using snippets in templates, see Adding a Snippet to a Template.
# Adding Handlebars
You can use Handlebars in the SMS message body to pull in dynamic data and craft personalized message content. For more information, read Personalizing Templates with Handlebars.
Near the message input, you can see the total character count, how many messages it will send to your recipients, and the encoding type.
When you add Handlebars to a message, the final message's character count can vary from the character count shown in the template preview window, as well as from one user to another.
To view an accurate message character count when using Handlebars, save the template's Details and open the Preview. Keep in mind that this count can vary per user depending on the data field you're referencing.
For example, a merge parameter for a field such as {{firstName}}
takes 13
characters in the message body. Naturally, the character count is different for
each user. As a result, your SMS campaign could send different numbers of
segments to different users if the length of their first name increases the
character count above the segment limit.
# Including opt-out instructions
Text that describes how users can stop receiving texts from you.
In Iterable, the SMS template always includes your SMS opt-out text in the preview, however this text only sends to users based on rules set in your project settings.
When Iterable adds opt-out instructions to your campaign, the length increases (in # of characters). Because SMS segments have character limits, this could add an additional segment to your campaign.
You can customize the instruction text and send frequency for each destination country. To learn more, read Customizing SMS Opt-Out Instructions.
# Media URL
The URL of an image, video, or audio file to include with your text message.
Sample content URLs:
- Video:
https://www.example.com/mov_bbb.mp4
- PDF:
https://www.xmpl.net/my-doc.pdf
# File types and size limits
Supported file types and size limits vary depending on your SMS provider:
- Iterable SMS: images (jpeg, png, gif), audio (MP3, OGG, AMR), text (PDF, vcard, txt ), and video (mp4, 3gpp), up to 900kb.
- Telnyx: See MMS Sending and Receiving.
- Twilio: See Supported File Types and Size Limits for MMS Media Messages.
Your SMS provider rejects MMS when the file size is above their limits. There are limited exceptions with Twilio, which resizes specific image files (a process also called transcoding).
# Recommended aspect ratios
For media content such as .png or .jpg images, animated GIFs, and video:
-
Square - A 1:1 aspect ratio is a simple option for display in mobile.
Examples: 320x320px, 480x480px. - Portrait - A 9:16 aspect ratio is optimal to fill most phone screens. Examples: 640x1138px, 720x1280px.
- Landscape - A 16:9 aspect ratio is best when users rotate their screen. Examples: 1138x640px, 1280x720px.
# Contact cards
To make it easier for your users to recognize your phone number when you send them a message, you can send them a contact card to install on their devices. Adding this to your template makes the message MMS instead of SMS.
To learn more about contact cards in SMS campaigns, read SMS Verified Contact Cards.
# Data feeds
Data feeds allow you to fetch user-specific data from external URLs (your own or third-party) and use it to personalize your messages. For example, a restaurant chain might use a data feed to fetch information about locations close to the user, and then highlight them in their messages. To tell the data feed which user you need information for, you can pass query parameters in the data feed URL.
To enable data feeds, check Data feeds. Then, select an existing data feed from the dropdown or click Add a new data feed.
For more information about data feeds, related configuration options, and how to use them, read Personalizing Templates with Data Feeds.
# Shorten and track
Shorten all links included in the SMS campaign's content. Shortlinks allow you to fit more content in the message and see if your contacts are opening the links.
Shortlinks can vary in length up to six additional characters from the preview URL that you see in the template preview mode.
For more details, read SMS Link Shortening and Click Tracking.
# Google analytics
Requires Shorten and track. Appends utm_source
, utm_campaign
, and utm_medium
parameters to links in your messages, for Google Analytics tracking.
To learn more, read:
- SMS Link Shortening and Click Tracking.
- Integrating Iterable with Google Analytics
- Google's Collect Campaign Data with Custom URLs
NOTES
- If you don't set up your campaign to use SMS link shortening and click tracking, Iterable doesn't include UTM parameters on any links, regardless of your selection here.
- For UTM parameters on links in test messages, Iterable uses a
campaignId
of-12345
.
# Link parameters
Requires Shorten and track. Custom URL parameters that are added to your SMS campaigns. These custom parameters give you the opportunity to track custom metrics, that you define, when a customer clicks on a link in your campaign. This helps track which clicks came from which campaign, and when using other analytics providers besides Google Analytics.
For example, if you add a link parameter with key campaignId
and value
{{campaignId}}
, links in your template include a query string parameter
for the campaign ID:
https://www.example.com/?campaignId=12345
For more info, read Link Parameters.
TIP
You can use Google Analytics parameters, link parameters, and hard-coded URL parameters in the same campaign. They'll be added in this order:
- Hard-coded URL parameters
- Google Analytics parameters
- Link parameters
# Locales
Use locales to define the content this template use for users in different locales. This feature doesn't translate for you, but provides a place for you to put localized content.
For more information, read Supporting Multiple Languages.
# Previewing an SMS template and sending test messages
After configuring and designing your template, preview it and make any necessary fixes. There are a couple of ways to check your template: using the Preview page, and sending test messages.
# Previewing your template
To see what your text message looks like when rendered with different combinations of user data, data feeds, and Catalog data, use the Preview page. On this page, you can load a user profile and see how the template renders for that user.
NOTE
Previewing a template for a specific user won't make any changes to your template. However, you can use the Details button (on the bottom-left corner of the page) to update your template's details.
To preview an SMS template with user data:
-
With the template open, click Preview.
-
Enter the email address of a user in your project and click Load User Data. That user's data loads.
Feel free to play around with this data, modifying it as needed — your changes won't get saved to the user profile. Treat this page as a playground, and check how different combinations of data cause your template to render. Make sure that the template looks correct in all the different ways it may appear to your users.
TIP
If the preview doesn't update after you've edited or loaded data, click the refresh icon (at the top-right corner of the previewer).
To see how your template renders with a data feed loaded, click Load Data Feeds. Feel free to edit the loaded data feed data, to see how different data looks. This doesn't affect the data feed itself.
Click Exit Preview to return to the template page.
WARNINGS
The character count on the Preview pages do not account for:
- Variable length of unique keys in shortlinks. When sending, shortlinks can be up to six characters longer than the minimum key length.
- Project connector characters (if using the default tracking domain,
itbl.co
). - Additional characters for deep links - all deep links have the
/a
characters added, but the previewer does not accomodate them.
To account for additional characters per link, consider adjusting your message content, or plan ahead in case your campaign is split into an additional segment for some users.
For more information on previewing templates and campaign templates with data, check out Previewing Templates with Data.
# Previewing as mobile devices
It's often useful to see how your SMS message and notification appears on Android vs. iOS devices. To do this, open the template, and in the Design area:
- Scroll below the device preview, and toggle the iOS and Android icons.
- Click the dropdown, and choose Message or Notification.
# Sending a test message
After setting up your template, designing its content, and previewing it with user data, it's always a good idea to send yourself (and other internal users) some proofs. This way, you can validate the message from the perspective of your users.
To send a copy of the text message to yourself or another internal user:
- Open the template.
- Open up Design mode.
- Click on the Send test message dropdown menu and choose To yourself, To an internal list, As random users, or To another address.
For more info about these options, read Sending Test Messages.
NOTE
The user associated with the test message must have a phoneNumber
field set on
their profile.
To prevent you from accidentally sending a test message to a production list, these sends are capped at 50 users.
For more information, read Sending Test Messages.
# SMS segment limits and character encoding
The character encoding of your message text determines the character limit for each SMS segment. You can use two different character sets in the message body of your SMS message: GSM-7 and UCS-2 (UTF-16).
GSM-7 character encoding allows the most characters per segment. This helps limit the number of segments a campaign uses and is more cost effective.
UCS-2 encoding allows fewer characters per SMS segment, which causes an increase in the number of segments a campaign uses. This character set includes advantages such as special characters and emoji.
GSM-7 is the default encoding in Iterable's template editor, however Iterable automatically detects encoding based on your input.
Actions that change character encoding from GSM-7 to UCS-2 include:
- Copying and then pasting text. Some text editors use different encoding for angled smart quotes (curly quotes), non-standard spaces, and other characters.
- Adding emoji.
- Adding special characters.
See this progression of character count totals and number of segments:
SMS Segments | GSM-7 Characters | UCS-2 Characters |
---|---|---|
1 segment | 0 - 160 | 1 - 70 |
2 segments | 161 - 306 (153 characters per segment) | 71 - 134 (67 characters per segment) |
3 segments | 307 – 459 | 135 - 201 |
... and so on
You may notice that when your SMS message body passes the limit for a single segment, the character limit per segment decreases slightly. This happens because multi-segmented SMS messages include data headers that contain information for the receiving carrier about how to display the message, such as concatenation. Concatenation happens when multiple SMS segments appear to the user as a single message and cause a single SMS notification (instead of 3, for example).
When your message body is GSM-7 encoded, a single-segment SMS can have up to 160 characters. Once a SMS has 161 or more characters, each segment allows up to 153 characters to make room for data headers.
When your message body is UCS-2 encoded, a single-segment SMS can have up to 70 characters. Once a SMS has 71 or more characters, each segment can have up to 67 characters.
When you remove the character(s) causing UCS-2 encoding, Iterable updates the message to use GSM-7 encoding, increasing the number of characters available per segment.
To learn more about character encoding and how it impacts SMS, read Twilio's guides to GSM-7 and UCS-2.
# Special characters and emoji
When you add emoji and special characters to an SMS message, it updates to use UCS-2 encoding. This, in turn, reduces the overall character limit per segment and increases the number of SMS segments in the campaign.
Adding special characters and emoji may also consume multiple characters in a message body. A calendar emoji (📅) requires 50 UCS-2 characters even though it appears as a single character in the message.
Emoji aren't universally supported by mobile carriers at this time.
Example SMS with emoji
In this example, the message body contains the party popper emoji (🎉). The character encoding is UCS-2, and the message has 97 characters (2 segments).
# Want to learn more?
For more information about some of the topics in this article, check out these resources. Iterable Academy is open to everyone — you don't need to be an Iterable customer!
Iterable Academy
Support docs