Quick guide to SMS templates for beginners

Updated at:

An SMS template is standard message content that an enterprise uses to send SMS messages. Before sending verification codes, notification messages, or promotional messages, an enterprise must create and submit an SMS template of the corresponding type. After the template is approved, the enterprise can use it with an SMS signature and recipient phone numbers to send messages. A template can contain fixed content and variables to define the structure, purpose, and variable information of the messages that are sent.

Should you choose a verification code, notification, or promotional template? Which content is suitable for variables? Can you include links and contact information? What else should you check before submission? This topic provides suggestions for common scenarios. For complete specifications and detailed operations, see the links in this topic.

1. Which type of SMS template should I choose?

Choose the template type based on the actual message content and sending scenario.

Business scenario

Recommended template type

Notes

User registration, login, and identity verification

Verification code

Keep the content focused on the verification code and its purpose. Do not include unrelated notifications, marketing, or advertisements.

Identity verification before resetting a password or changing important information

Verification code

These are security authentication scenarios.

Order confirmation and order status changes

Notification

Use only for business notifications. Do not include promotional content.

Logistics updates and pickup reminders

Notification

The content must relate to the actual logistics service.

Service activation, price adjustments, and purchase confirmations

Notification

Reassess the template type if you add discounts, promotions, or other marketing information.

Coupons, discounts, and promotional activities

Promotional

Apply in accordance with the rules for promotional messages.

Birthday greetings and holiday greetings for members

Promotional

Submit these member-care messages as promotional messages.

New products, business promotion, and member marketing

Promotional

Comply with the user relationship and sending requirements for promotional messages.

Pay particular attention to the following:

  • A verification code message that includes marketing content is no longer solely a verification code message. Verification code templates cannot contain unrelated notifications, marketing, or advertisements.

  • A notification that includes discounts or promotions is no longer solely a notification. For example, in “Your order has been delivered. Click to claim a coupon,” the second part is promotional content. Notification messages cannot include marketing content.

  • For promotional messages, consider both the content and the recipients. Marketing content must target members, registered users, and other users who meet the requirements. You cannot send registration invitations, company introductions, or other commercial marketing information to non-members whose membership relationship cannot be verified.

For complete rules, see:

2. Are ready-made templates available before I create a template?

If the Alibaba Cloud Short Message Service console provides complimentary templates that meet your business requirements, you can use them first instead of creating new templates.

Create your own template if existing templates do not meet your requirements.

3. How do I use template variables?

Which content is suitable for variables?

Only information that changes each time a message is sent is suitable for variables, such as verification codes, order numbers, times, and amounts.

For example:

Your order ${order_no} has been shipped and is expected to arrive on ${date}.

The order number and date can change and can be variables. Keep the other business descriptions fixed.

Do not make large portions of the message body variables merely to increase flexibility.

How should I write variables?

Situation

Recommendation

Use variables only for information that actually changes

✓

Match variable attributes to the actual content

✓

Include fixed text between multiple variables

✓

Use variables for most of the message body

×

Place two variables directly next to each other

×

Use only variables in the entire template

×

Keep template variables to the necessary minimum. Currently, use no more than three variables per template. The template must also contain fixed content.

Select attributes that match the actual content of each variable. For example, select the time attribute for times and the amount/quantity attribute for amounts. Do not select “Other” for all variables merely for convenience.

Can I pass arbitrary variable values after a template is approved?

No. After a template is approved, the variable values that you pass when sending messages must still comply with the rules for their attributes.

For example, for this template:

Your order amount is ${money} yuan.

${money} should be set to the actual amount, such as:

99

Instead of:

99 yuan

If a value does not meet the variable attribute requirements, the message may fail validation before it is sent.

Verification code templates have separate requirements for the number and format of variables. If you use a verification code template, see Verification code template specifications.

5. What else should I check before submission and after approval?

Quick checks before submission

Item

Quick check

Template type

Have you selected verification code, notification, or promotional correctly? Does a notification include marketing content?

Variables

Have you kept only the necessary variables? Do their attributes match the actual content?

Third-party content

Does the content involve other companies, brands, or businesses? Are the relevant qualifications and authorizations complete?

Special industries

Does the business involve industries with additional restrictions, such as finance, gaming, social networking, or government and enterprise services?

Links / contact information

Do they comply with the relevant template specifications? Have you filled in traffic-driving information as required?

Scenario description

Have you described the actual business scenario and provided complete message and variable examples?

If you apply for a promotional message, also check the following:

  • Whether recipients meet the requirements for members, registered users, and other eligible users.

  • Whether the user relationship or authorization materials meet the requirements.

  • Whether the unsubscribe method at the end of the template meets the specifications. Currently, promotional messages support only “拒收请回复R” (reply R to opt out). Short Message Service automatically adds this text if it is omitted.

If your business involves special industries such as finance, gaming, or social networking, review the applicable restrictions before you prepare a template. For example, promotional messages explicitly do not support the finance, gaming, and social networking industries.

Three easily overlooked issues after template approval

1. Approval does not guarantee successful sending.

Variable values, links and traffic-driving information, and real-time carrier rules may still affect the final sending result.

2. Pay attention to TemplateCode after you change a template.

To change the content or variables of an approved template, you generally need to apply for a new template or clone a template. When you use the new template, also check the TemplateCode in your business code.

3. The associated signature selected during application is not a permanent binding for sending.

The associated signature selected during application primarily assists the review. After the template and signature are approved, specify TemplateCode and SignName separately when sending messages. You can combine them as needed as long as their usage scenarios match.

Find the right topic when you encounter a problem

My question

Recommended topic

I do not know whether to choose verification code, notification, or promotional

SMS template specifications

I want to learn how to apply for a template

Apply for an SMS template

I am unsure about verification code template content or variables

Verification code template specifications

I am unsure about links or contact information in notification templates

Notification template specifications

I am unsure about promotional message content, user relationships, or unsubscribe methods

Promotional message template specifications

My template failed review

Suggestions for handling review failures

I want to manage, clone, or delete existing templates

Manage SMS templates