A message template consists of a body, placeholders, and other message attributes. Placeholders are used to add dynamic content. You cannot send personalized push messages using templates that do not contain placeholders.
Templates make message configuration more flexible and reduce repetitive data entry. Templates are required for template pushes, batch pushes, and broadcast pushes.
This section describes how to configure a push template. When you configure a template, use the #placeholder_name# format to mark dynamic content. Placeholders can be used in the Template title, Template body, and Redirect URL.
Procedure
Log on to the mPaaS console. After you select the target application, navigate to Message Push > Message Templates in the left navigation pane.
Click the Create Template button and configure the template. For parameter descriptions, see the following table.
Parameter
Required
Description
Template name
Yes
The name of the template. It can contain up to 200 characters, including letters, digits, and underscores. The name must be unique. It is used as the unique identifier for the template in API calls.
NoteThe template name cannot contain commas.
Template description
Yes
The description of the template. It can contain up to 200 characters, including letters, digits, and underscores.
Template title
Yes
The title of the template.
Template body
Yes
The body of the template.
Silent message
Yes
Specifies whether the message is displayed.
Yes: The message is silent. The user is not notified, and the message is not displayed on the device.
No: The message is displayed in the notification bar.
For the Android push platform, the required action depends on the push channel:
Proprietary channel: This parameter is sent to the client for reference. Parse the message body and use this field's content to control the message display.
Third-party channel: This parameter is sent to the target device. The vendor's system parses the field and controls the message display. No other action is required.
For the iOS and HarmonyOS platforms, message display is handled by the vendor's system. No other action is required.
Display style
Yes
The display style of the message on the client. The default (small text), big text, and image and text styles are supported.
Default: Displays a push title and text. This style is suitable for simple messages. The message text should not exceed 100 characters, including custom parameters and symbols.
Big text: Displays a push title and text. This style is suitable for text-heavy messages, such as news updates. It lets users get information without opening the application. The message text should not exceed 256 characters, including custom parameters and symbols.
Image and text: Supports an icon and a large image in the message. This style is suitable for rich content. For the best display, the message text should not exceed two lines.
Message icon
No
The icon displayed to the right of the message content in the notification bar. JPG, JPEG, and PNG formats are supported. Enter the URL of a publicly accessible icon asset. If you do not upload assets for each third-party channel and only provide a default asset URL, the system automatically pulls the default asset for all channels. However, because asset requirements vary by channel, upload assets for each channel separately for the best display.
Default icon: Recommended size is 140 × 140 px. The file size must be 50 KB or less.
OPPO channel icon: Recommended size is 140 × 140 px. The file size must be 50 KB or less.
Xiaomi channel icon: Recommended size is 120 × 120 px. The file size must be 50 KB or less.
Huawei channel icon: Recommended size is 40 × 40 dp. The file size must be 512 KB or less.
FCM channel icon: No specific configuration is required. The system automatically pulls and adapts the default icon.
Large image
No
The image displayed below the message content in the notification bar. Enter the URL of a publicly accessible large image asset. If you do not upload assets for each third-party channel and only provide a default asset URL, the system automatically pulls the default asset for all channels. However, because asset requirements vary by channel, upload assets for each channel separately for the best display.
Default large image: Recommended size is 876 × 324 px. The file size must be 1 MB or less. JPG, JPEG, and PNG formats are supported.
OPPO channel large image: Recommended size is 876 × 324 px. The file size must be 1 MB or less. JPG, JPEG, and PNG formats are supported.
Xiaomi channel large image: Recommended size is 876 × 324 px. The file size must be 1 MB or less. JPG, JPEG, and PNG formats are supported.
iOS channel large image: You can use a custom image. There are no size restrictions.
FCM channel large image: No specific configuration is required. The system automatically pulls and adapts the default large image.
HarmonyOS channel large image: The recommended size is less than 25000 px. PNG, JPG, JPEG, HEIF, GIF, and BMP formats are supported.
Action on click
Yes
This parameter is optional. It is passed to the client as a reference field. You are responsible for the implementation logic.
Web page: Redirects the user to a web page when they click the message. If you select this option, enter the web page URL.
Client-side custom: Redirects the user to a native page when they click the message. If you select this option, enter the native page address (Android: ActivityName, iOS: VCName).
Redirect URL
No
The address of the page that opens when a user clicks the message. This parameter is sent to the client for reference only and has no effect on its own. You must implement the redirection logic.
Click Create. After the template is created, you are redirected to the Message Templates page. The new template appears at the top of the list.