Rebranding Sisense Automated Emails in Windows

Sisense automated emails are sent to users according to predefined scenarios. When a predefined scenario such as a build alert is triggered, an automated email is sent to the relevant Sisense users.

You can customize these emails to match your company’s branding.

This page describes the Sisense automated emails and how you can replace them with your own.

Sisense Automated Emails

You can rebrand the following automated emails:

  • Build Alert: Sent each time a build alert is triggered.
  • Dashboard Errors Reports: Sent when a dashboard report fails.
  • Dashboard Errors Reports Bulk Fail: Sent when a large amount of email reports fail.
  • Dashboard Reports: Sent to the recipient of a shared dashboard when you share a dashboard.
  • Empty Dashboard Report: Sent to an Administrator when an empty dashboard report is sent.
  • KPI Alert: Sent each time a KPI alert is triggered.
  • New User Invitation: Sent to a new user invited to Sisense .
  • Password Recovery: Sent to a user who requested a new password.
  • Share ElastiCube: Sent to the recipient of a newly shared ElastiCube .
  • Share With: Sent to the recipient of a shared dashboard.
  • Transfer Ownership: Sent to a user who received ownership of a dashboard from another user.
  • User Created: Sent to a user when a user is created.
  • User Created AD: Sent when a user is created in Sisense after being added from Active Directory.

For each automated email, Sisense provides an email template in LESS and EJS formats. These files are located within template folders inside the Template Parent folder located at:

...\Program Files\Sisense\app\translations\{LOCALIZATION_CODE}\email-templates.js

Note:

After changing these files, you must restart the Sisense.Galaxy service.

LESS Files

All templates contain the style.less file that refers to a stylesheet that defines the branding used in Sisense ’s automated emails. style.less is located at:

...\Program Files\Sisense\app\galaxy-service\src\features\emails\templates

By replacing the content of the styles.less file with your own CSS, you can redefine the branding used in all of the email templates to your custom branding.

EJS Files

Each template folder contains an EJS file, which contains HTML and JavaScript that describe the content of the email.

You can use any text or HTML editor to modify the HTML.ejs files according to your needs.

The following is an example of an HTML.ejs file.

<% include ../header %>
<tr>
<td>
<div class="contentText">
<p class="userText" style="margin: 0;"><%= i18nContent.hi %> <%= newOwnerUserName %>,</p>
<p class="generalInfo" style="margin: 0;"><%- i18nContent.generalInfo %></p>
</div>
</td>
</tr>
<% include ../footer %>

Each EJS file has three sections, a header, body, and footer; each of which describes various areas in the email your users receive.

Section 1 is the Header section defined in the EJS file as <% include ../header %> . This is a reference to the header.ejs file located at:

…\Program Files\Sisense\app\galaxy-service\src\features\emails\templates

The header.ejs file defines the title and image used in the header section of each email template. You can modify the header by replacing the header.ejs file or by replacing the &lt;% include ../header %&gt; tag from each template with your own HTML and JavaScript.

Section 2 is the Body section, which contains the content displayed in the email your users receive. There are two types of content displayed in automated emails: tokens and strings. Tokens refer to Sisense variables, such as the Sisense username or dashboard owner’s name. For example, the &lt;%= newOwnerUserName %&gt; token displays the new owner of a dashboard’s Sisense username in the automated email.

<tr>
<td>
<div class="contentText">
<p class="userText" style="margin: 0;"><%= i18nContent.hi %> <%= newOwnerUserName %>,</p>
<p class="generalInfo" style="margin: 0;"><%- i18nContent.generalInfo %></p>
</div>
</td>
</tr>

When you replace the HTML.ejs file with your own files, you can still use the Sisense tokens. For more information about tokens that you can add to your automated emails, see the section below, Applying Sisense Tokens.

In addition, each template contains an object such as i18nContent.hi that displays strings predefined by Sisense. These strings can't be modified. However, you can remove and replace the object with your own content.

Section 3 contains the footer. The footer,&lt;% include ../footer %&gt; , is a reference to a footer.ejs file located at:

...\Program Files\Sisense\app\galaxy-service\src\features\emails\templates

The footer.ejs file defines the copyright text and image used in the footer section of each email template. You can modify the footer by replacing the footer.ejs file or by replacing the &lt;% include ../footer %&gt; tag from each template with your own HTML and JavaScript.

Images displayed in the Header and Footer are stored in the following location:

...\Program Files\Sisense\app\galaxy-service\src\features\emails\templates\images

You can replace these with your own images by maintaining the same file names used. However, it is recommended to replace the content of the Header and Footer sections together with your own content.

Replacing Sisense Automated Emails

If you prefer to implement your own email templates for Sisense ’s predefined scenarios, you can replace Sisense ’s emails with your own through the Sisense REST API.

Note:

Rebranding Sisense emails must be enabled for your license. Contact your Sisense representative for more information.

For each automated email, Sisense provides an email template in the format of EJS and LESS files. These files are located within template folders inside the Template Parent folder located at:

...\Program Files\Sisense\app\galaxy-service\src\features\emails\templates

Some template folders may contain an html-org.ejs file. These files are legacy templates and are maintained for backwards compatibility. Newer developments should only modify or replace the html.ejs files.

Note:

While it is possible to modify the content of your automated emails through the language.js file located in the templates folder, the recommended method is to modify the email templates as described in the procedure below.

After you have prepared your new automated emails, through the /branding endpoint of the REST API, you can configure Sisense to send the customized automated emails when the relevant event is triggered.

To define the location of your branded emails:

  1. Copy the contents of the directory:

    ...\Program Files\Sisense\app\galaxy-service\src\features\emails\templates

  2. Paste all the folders in the following directory:

    ...\Program Files\Sisense\app\galaxy-service\src\features\emails\

    Note:

    You will modify the templates in this folder and configure Sisense to send them instead of the original Sisense automated emails.

  3. For each template you want to modify, change the contents of html.ejs files and styles.less as described in the section above, Sisense Automated Emails.

  4. On the left-hand menu, access the Sisense REST API.

  5. In the API Documentation, select version 0.9 on the top-right of the screen.

  6. Click Post/branding to access the relevant API settings, and then click Try It Out .

  7. In version 0.9 of the REST API, click POST /branding.

  8. In the 'email' object, define the following information:

    Note:

    If you have already rebranded Sisense, copy the current settings through the GET /branding endpoint and paste them into the POST /branding endpoint, modifying or adding the 'emails' object. If you only modify the 'emails' object, the remaining objects and keys will revert to their default Sisense settings and will overwrite any current settings.

Key Description
senderEmail The email address from which the automated email is to be sent.When you define the senderEmail value, you must verify your domain in Sisense’s Mandrill email service. Click here for more information.
senderName Note: To change the name to be displayed as the Sender in the automated email, go to a different endpoint: POST/settings/system, and change the 'senderName' setting there. You can leave the current endpoint (POST /branding) as-is, without making any changes to it.
templates_directory The directory location of your template folders. Sisense accepts /resources/branding/emails as a custom location for automated email templates. This directory is located on your Sisense server at.../resources/branding/emails
passwordRecoverySubject The subject line of the password recovery email.
newUserInviteSubject The subject line of the new user email.
createdUserSubject The subject line of the new user invite email.
shareWithNewUserSubject The subject line of the shared dashboard with a new user email.
shareWithExistingUserSubject The subject line of the shared dashboard email.
transferOwnership The subject line of the dashboard transfer ownership email.

For example:

"emails": {
"senderEmail": "sys-admin@company.com",
"senderName": -----, (change this in POST/settings/system endpoint)
"templates_directory": "/resources/branding/emails",
"passwordRecoverySubject": "Recover Password",
"newUserInviteSubject": "new User Account Activation",
"shareWithNewUserSubject": "A Dashboard has been shared with you:",
"shareWithExistingUserSubject": "A Dashboard has been shared with you:"
},

  1. Click Run.

    The next time an automated email is sent, your templates are sent instead of Sisense ’s predefined emails.

Applying Sisense Tokens

Most Sisense automated emails include tokens that you can apply to your automated emails. When the email is sent, Sisense populates the token with the relevant value. For example, the &lt;%= owner %&gt; token represents the owner of the dashboard.

Each template has tokens defined by Sisense for each automated email that you can apply listed below. Tokens from one automated email can't be applied to another.

build_alert: Sent when a build alert is triggered.

No Template Tokens Available

Dashboard_errors_report: Sent when an Dashboard email report fails.

Template Tokens Available

<%= errors[i].error %>
<%= errors[i].widgetFailed %>
<%= errors[i].widgetCount %>

Dashboard_errors_report_bulk_fail: Sent when a Dashboard email report sent to a large number of users fails.

Template Tokens Available

<%= errors.groups[i] %>

Dashboard_report: An automated email that contains a dashboard report sent to users.

Template Tokens Available

<%= url %>
<%= images[i] %>

Empty_dashboard_report: An automated email that contains an empty dashboard report sent to users.

No Template Tokens Available

Kpi_alert: Sent to shared users when a KPI alert is triggered.

Template Tokens Available

<%= measure %>
<%= value %>
<%= message %>

New_user_invitation: Sent to a new user you have invited to join.

Template Tokens Available

<%= owner %>

  • The folder for this template contains a file called HTML-ORG.ejs. This file is for older versions of Sisense and is maintained for backward compatibility.

Password_recovery: Sent when a user requests their password from the Forgot Password page.

No Template Tokens Available

  • The folder for this template contains a file called HTML-ORG.ejs. This file is for older versions of Sisense and is maintained for backward compatibility.

Share_with: Sent to a new recipient of a dashboard when the dashboard is shared with them.

No Template Tokens Available

  • The folder for this template contains a file called HTML-ORG.ejs. This file is for older versions of Sisense and is maintained for backward compatibility.

transfer_ownership: Sent to the new owner of a dashboard when ownership is transferred.

Template Tokens Available

<%= newOwnerUserName %>
<%= oldOwnerUserName %>
<%= sharingDashboardName %>

User_created: Sent to the recipients of new Sisense accounts.

No Template Tokens Available

User_created_ad: Sent when a user is created in Sisense after being added from Active Directory.

No Template Tokens Available

.r.