Creating a Message Template
Scenarios
Message templates contain fixed and changeable content and can be used to create and send messages more quickly. When you use a template to publish a message, you can specify values for different variables in the template.
This section describes how to create a message template on the management console.
Procedure
- Log in to the SMN console.
- In the navigation pane on the left, choose Topic Management > Message Templates.
- On the Message Templates page, click Create Message Template.
The Create Message Template dialog box appears.
Figure 1 Creating a message template
- Specify the template name, protocol, and content.
Table 1 Parameters required for creating a message template Parameter
Description
Template Name
Template name, which:
- Contains only letters, digits, hyphens (-), and underscores (_) and must start with a letter or digit.
- Can contain 1 to 64 characters.
- Cannot be modified once it is created.
Protocol
Endpoint protocol. It cannot be changed once the template is created.
The protocol can be Default, SMS, Email, HTTP, HTTPS, or FunctionGraph (function).
The default protocol is Default. You can select other protocols for the same template as needed.
Each template must include the Default protocol.
Content
Template content.
Use {xxx} as the placeholder to create a template. When you use this template to publish messages, replace {xxx} with specific content. xxx must start with a letter or digit and can contain up to 21 characters, including only letters, digits, hyphens (-), periods (.), and underscores (_).
The template content must meet the following requirements:
- The template content supports plain text only.
- The template content cannot be empty.
- The size of the template content cannot exceed 256 KB.
- The template can contain up to 256 variables in total, but that includes redundant variables. For unique variables, there can be no more than 90.
- When you publish messages using a template, the value you specify for each variable cannot exceed 1 KB.
For example, the template information is as follows:- Template Name: tem_001
- Protocol: Default
- Content: The Arts and Crafts Exposition will be held from {startdate} through {enddate}. We sincerely invite you to join us.
Figure 2 Creating a message template
- Click OK.
The template you created is displayed in the template list.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot