Email Notification
Enable and set up the email recipients to receive notification events from Suger service
Overview
Email notifications let you set up multiple alerts, each with specific recipient addresses and notification scopes. When an event from Suger matches the defined notification scope, an email is automatically sent to the designated recipients.
Configuration
-
Enable Email Notification: Go to the settings page and find the
Notification
section. Click the buttonEdit
of Notification Configs. Now you can enable the email notification as shown below. -
Email Notification Scopes: You can add or edit multiple notification scopes by clicking the
Add notification scope
button. For each scope, you can independently specify theNotification Scopes
andRecipients
as shown below.
Custom Templates
Custom email templates allow you to personalize your notification emails with dynamic content and professional layouts. You can create templates that automatically incorporate data from your notification events, making your emails more informative and engaging.
Create New Template
- Navigate to the settings page
- Go to the
Notification
section - Scroll down to the
Templates
section - Click the
+ New Template
button - In the template creation slider:
- Enter a descriptive name for your template
- Select the evaluator type (currently, only Golang Template is supported)
- Use the email builder to design your template
- Click
Create
to save your template
Use Email Builder
The email builder provides a comprehensive set of tools to create professional-looking emails:
- Columns: It allows your users to add columns to your design in order to have a better design arrangement.
- Button: Add any type of button in your email. You can change colors and styles.
- Divider: It gives your users appropriate spacing at any point they want in their design.
- Heading: Add headings (from level 1-6) to the design.
- Text: Text is a built-in tool so users can add text to their designs.
- Image: To make your emails attractive, you can add images using this tool.
- Social: It is a built-in tool that lets users add their social media icons to your design.
- Menu: Menu is a built-in tool used to create navigation menus.
- HTML: This tool will give your users room to add custom HTML to the design.
Working with Dynamic Data
Using Single Variables
-
Select a notification event type to make its variables available in the builder. By default, use the
BaseNotificationEvent
. -
In the text or heading tool, click the
Merge Tags
button and select the variable you want to insert
Looping Over Lists
To display multiple items from a list:
- Add a Columns tool to your template
- Click the tag symbol on the Columns tool
- Select the list you want to iterate over
- For complex objects in the list:
- All variables from the list items become available within the Columns block
- Use them in text tools just like single variables
- For simple values (strings or numbers):
- Use the
this
merge tag to access the current item within the Columns block
- Use the
Apply Templates to Notification Scopes
To use your custom template with a notification scope:
- Go to the settings page
- Find the
Notification
section - Click the
Edit
button of Notification Configs - Scroll down to the
Email Notification Scope Templates
section - For each notification scope:
- Select the desired notification scope in the first column
- Choose one of your created custom templates from the second column
Test Custom Templates
Before using a template in production, you can test it to ensure it works as expected:
- In the
Email Notification Scope Templates
section, click the email icon next to your template - In the test dialog, provide the following information:
- To Email: The recipient email address for the test
- CC Emails: Optional comma-separated list of email addresses to CC
- One event json data: Choose (and modify as you want) between:
- Mock JSON data files
- Last recorded events for your organization
You can also edit the template directly from the test dialog by clicking the Edit Template
button, which will open the email builder.