Design Template
Templates are the content block of your notification. In SuprSend, content for all channels (SMS, email, chat, push etc.) is grouped under a single template group for simplified management. Your template can have 2 types of content:
- Static Content : This remains the same for all users and contains your core message or design.
- Dynamic Content : These are placeholders for user or tenant-specific information, such as first names, booking amounts, appointment times, and more. The variables are populated dynamically based on the data provided in your workflow or event request.
Create Template
SuprSend’s template designer empowers you to create beautiful templates with easy drag-and-drop editor
Create a template
Add a template name and Click on ‘Save
’.
The new Template will be created, which you can see on the top of ‘Templates’ listing page. Click on the template to start editing.
Select the Channel
Select the channel that you want to edit and enable it.
Add template content
You can get the detailed guide to design the template for each channel in their respective documents:
Push channels:
Chat:
Template Versions
SuprSend creates a new version every time you publish a template. This is to ensure that you have historical reference to all the changes done in your template. Helps with audit trails and understanding which template content performed better in terms of user engagement.
- A draft version is created by default. You’ll always do your changes in the draft version and publish the template once finalized.
- The recent published template will become the live version . All your notifications will be using the live template version.
- Earlier published versions will become inactive as soon as you publish a new template. You can see inactive template versions by selecting ‘
All
’ tab from the top right side options.
Adding dynamic content
We use as the template variables language. You can learn about here.
- To add dynamic data, first add the variable data from your event and workflow request in the mock data.
- Often times there is a mismatch between template variables and the data that come as part of payload of the trigger or event. Defining the JSON structure of variables before hand reduces the chances of error.
- The variables will show as auto-suggestions while designing the template, reducing the possibility of typo errors.
- Once declared, these variables can be used consistently across all channels for that particular template.
- The sample values are used to send test notification and show the preview of final notification.
In the above screenshot, there are other elements in the mock data like tenant and batching. You can check their respective documentation to know more about it.
You can copy below mock data for starters:
Using variables in the templates:
As a general rule, all the variables have to be entered within double curly brackets: . For URLs and links, we recommend using triple curly braces.This is to avoid escaping html entities in handlebars. You can also write transformations like date-time formatting, if-else statement inside your templates using handlebar helpers.
Other than your workflow data
variables, you can also add other type of variables in your templates like tenant properties. See a full list of possible variables here.
There are slight differences in variable format and placement for different templates. Checkout each channel template documentation for reference.
Preview and Publish
You can see the notification preview on the right side of your editor for most of the channels. Variables in template are replaced with the values from ‘mock data’ for preview
For email, preview option is available in the bottom left side menu
For Slack, you can click on ‘Load preview
’ button to see the preview
Once finalized, you can publish the template by clicking on ‘Publish template
’ button on the draft version
Test template
You can send test notifications directly from the template editor page to see how the message will appear on user’s device. To send a test notification,
Click on the "Test" button
You can find the Test
button on the top right corner.
Add Distinct ID
Add the distinct_id
of the user, and click on search. It will show all the available channels for the user.
Choose the relevant channels
Select those channels on which you’d like to test, and then click on Trigger Test using mock data
. This will trigger a test notification.
Go to Logs
You can go to the logs in order to monitor the real-time status of your sent notification.
JSON data added in the global “Mock Data” button will be used to render variables in the template. Make sure to add mock data for all the variables added in the template else notifications will fail.
** Defining template in your workflow request **
The serves as a unique identifier for referencing a template in workflows created through API. To copy the slug name, click on the clipboard next to the Template name.
** Edit template name and other details **
You can edit the template description, name, and add tags to the template by clicking on the edit icon next to the its name.
- We recommend adding your template trigger logic and other relevant notes pertaining to the notification in the
description
. This is helpful for later reference and note keeping. Tags
are used for better organization of the templates on listing page. You can group similar templates using tags. Tags can then be used to filter out templates on listing page and also while fetching templates through API.
Clone template
To avoid designing templates from scratch, you can clone your existing templates and design on top of it.
Adding multiple languages
SuprSend allows you to create notifications in multiple languages in the same template. Once the languages are added, SuprSend will pick the preferred language from user’s profile and send the message as per the user’s preferred language. You can add template languages using Language option from the top-right corner burger menu. For more details, check steps and guidelines on adding language.
Archive template
You can archive your unused templates by clicking on “Archive” option from the top-right corner burger menu. Templates can’t be recovered once archived.
View and filter your template list
All of your active templates will be visible on the template listing page. You can filter your templates by channel
, tag
, status
or just get the templates which were ‘edited by you’.
Archived templates can be seen by clicking on Archived
tab from the top right side options