Table of Contents

Triggered Emails: Setup

Morgan Wynnes Updated by Morgan Wynnes

Read Time: 9 mins

Triggered emails allow you to configure customized emails that can be sent out automatically to customers based on the occurrence of specific events. For example, you can have an email automatically sent to customers once they reach a certain percentage of their data usage each month, or when a credit card on the customer's account is about to expire. Below you will find an overview of how to set up triggered emails, as well as an example use case of where these can be utilized.

By default, there will be 3 triggered emails already setup within your instance:

1. "New User Created"
2. "User Forgot Password"
These two emails are fundamental to the system working and therefore they cannot be edited or deleted, as indicated by the 'Yes' under the Protected column.

3. "Inventory Item Status Updates"
This email is not protected, as it is used in conjunction with alerting rotations to provide device status updates and can therefore be disabled or removed, if you are not making use of this feature.

How To Configure A Triggered Email

Part 1: Creating the Email Message

Before we can actually create the triggered email, we need to first create the email message that it will contain. To do so, navigate into "Email Messages", found within the "Communication" header from the Settings panel and click "Create Email Message".

Clicking "Create Email Message" will open up the Create Email Message window - this is where you will need to fill out the name of the email message, the "From Name" (which will determine the sender name that the email appears from), and the "From Email Address".

The "From Email Address" field can only use a domain name that has already been verified within Sonar. For more information on setting up an outbound email domain, refer to our knowledge base article found here.

Once you have created the email message container, find it from the Email Messages table, and click "Create Email Message Content" for that message.

This will open the Create Email Message Content window, where you will further define the email message.

The following fields will need to be configured within the Create Email Message Content window:

  • Email Message: This dropdown field will already be selected for you, based on the email message container you are creating content for.
  • Language: The language field will determine which language the email is available in.
  • Inbox Preview: This field is not required, but allows you to set an inbox preview for the email message - this can be used to provide a sneak peek to the recipient of what the email is regarding, before actually opening the email.
  • Subject: This is where you can define the subject of the email that gets sent out.
  • Email Triggers: Selecting a trigger is not required, but doing so will provide you with the Variables menu, where you can select related variables from the menu to include in the message body. Variables are wrapped in *| and |* and are used as a placeholder for data; when the email is sent out, the variables will populate with the appropriate values. For example, the variable *|CONTACT_NAME|*​​ will populate with the name of the contact when the email is actually sent out. The available variables that can be used in an email message will change depending on the email trigger being used
The Variable menu highlighted below will only appear once a trigger has been selected from the "Email Triggers" list.
  • Body: The body is where you can define the email message's content, and can use the text editor to customize the appearance of the message. These email messages can contain conditional statements as well as variables. Conditional statements allow you to send out emails to different subsets of customers while only having each customer see what is relevant to them. For example, one of the conditional checks available is *|AMOUNT_DUE_RAW|*, which is the amount of money the customer owes, as a floating point number (e.g. 1.23.) If the email was sent with the conditional statement example below, the IF/ELSE statement will be evaluated and the email will only contain 'You owe money!' or 'You don't owe any money!', based on whether or not *|AMOUNT_DUE_RAW|* is greater than 0.
    *|IF:AMOUNT_DUE_RAW > 0|*

    You owe money!


    You don't owe any money!

There is currently an issue with the formatting of variables not being preserved when copying/pasting variables into the text editor, causing them to not trigger properly. Expand the section below for detailed steps on the workaround available.
Temporary Workaround for Preserving Variables When Pasting into the Editor
Until the abovementioned issue is resolved, steps are provided below to preserve variable formatting when pasting content into the text editor; the workaround involves using the { } button shown here:

Temporary Workaround:
1. Click the { } button within the text editor

2. Paste the content that contains variables

3. Click the { } button again

For more information about creating email messages check out the Email Messages: Example Content article.

Once you have created your email message, it will be visible from the email messages list. Clicking on the message bubble (highlighted below) will open the email message content view where you can quickly see the inbox preview, email subject and language. Clicking on "View" under the Body column will open a Content window where you can view the email message content, similar to clicking the side arrow at the far right. Using the Edit menu at this layer will allow you to edit the message content and details, whereas using the edit function in the primary top row will allow you to edit the email message container details.

You cannot delete an email message if it is being used by a triggered email - you must first disassociate the email message, or delete the triggered email.

Part 2: Setting Up the Triggered Email

Now that we have our email message ready, we can navigate to "Triggered Emails" under the "Communication" header from the Settings menu; you will be brought to the Triggered Emails screen as can be seen below.

Click "Create Triggered Email" (as seen in the image above) to create a new triggered email. Doing so will result in a Create Triggered Email window being displayed.

By default, the Enabled checkbox will be selected.

The following fields will need to be configured within the Create Triggered Email window:

  • Enabled: This checkbox determines whether the triggered email is active and currently sending out to customers, or if it is disabled and therefore not being used.
  • Name: This is used for the name of the triggered email itself and is a required field.
  • Trigger: Here is where you would select the event that would trigger the email to be sent out, from a predefined dropdown list of available triggers. This is also a required field.
  • Email Message: This required field is where you would define the content of the email - any email messages that you have created will be available to select here from the dropdown list.
  • Email Categories: This is where you can select which category(ies) the triggered email should fall under, if any. Email categories are used to determine the type(s) of emails that a contact should receive, and can be defined for each contact listed on an account.

Once you have successfully created your new email, it will appear in the list of available triggered emails. If enabled, it will also automatically send out whenever the trigger conditions are met going forward.

From here, you can see at a glance whether or not a particular triggered email is currently enabled, what email categories it falls under, and you can also edit or delete the email from the "Edit" menu on the right. The email message used in the triggered email can also be seen under the "Email Message" column - clicking the name of the email message will open a sidebar window that contains a few details of that particular email message as well as the activity history for it.

Example Use Case

When A Late Fee Is Applied To An Account

For this example, we want to set up a triggered email to go out to customers when a late fee has been applied to their account. Having an email automatically sent out once a late fee has been added will help to make customers aware that they have an outstanding amount due on their account, and will also help to avoid surprises of an additional charge when they do go to make a payment.

Before we can create the new triggered email, we will first need to create the email message that it will use. We have created the 'Late Fee Applied' email message by clicking "Create" from the Email Messages screen and filling out the required information. Now, we need to add content to the email message and can do so by clicking "Create Email Message Content" as seen below.

We have selected the appropriate trigger for the email from the dropdown list and filled out the required fields. The body of our email has been set up to include variables to pull account-specific information for our customers and also includes some conditional content.

Since we have our customer portal enabled, we want to encourage customers to pay through the portal if the company the account is assigned to has the customer portal enabled; however, if they do not have the portal set up, then we don't want to be including information that is unnecessary to them. Through using a conditional statement, we are able to accommodate both situations - with the email content below, we are able to direct customers to the customer portal with language instructing them to pay through it. If the company that the account is associated with does not have the customer portal set up, that section of information will not be seen.

Since we have our email message set up in a way that meets our needs, we click "Create" and now have it available to select when configuring our triggered email.

Now that we have navigated to the Triggered Emails screen, we can click "Create" to set up our triggered email. After we give our email an appropriate name, we select the desired trigger for which we want this email to be automatically sent out, along with the email message that we just created. We choose the Financial email category to ensure that any contacts set up for emails related to finances will receive this. Lastly, we check the "Enabled" box because we want this email to begin automatically sending out to customers as soon as we have it configured.

Now we can rest assured that our customers will be receiving email notice when a late fee is applied to their account, without having to manually track that information or send out emails ourselves. And in the future, if we decide that this triggered email is no longer needed or we want to temporarily disable it, we can do so by editing the triggered email and deselecting the "Enabled" checkbox.

How did we do?

Setting up an Outbound Email Domain

Call Logs: General Best Practices