Transactional emails are automated, API-triggered emails that are sent to individual contacts based on a specific action they have taken.

Examples include confirmation emails, password reset emails, and purchase confirmations.

Unlike Campaigns or Loops, Transactional emails are not promotional in nature and as a result they do not require unsubscribe information to be included in the email.

How it works

To send Transactional email, you will need to use our API (with more support for third-party integrations coming soon). Requests need to be authenticated using an API key as described here.

Sending your first transactional email

To get started, click “Create” followed by “Transactional”.

Compose your email

Use our builder

In this email, a user clicks the Reset Password button to reset their information.

The link in the button is filled in by the information in the data variable you send. We’re also sending the user’s name in through a data variable.

Note that currently you can insert data variables into the text of the email with the “terminal prompt” button:

For image links and button links, you will be able to insert data variables with the inline version of the same button.

Bring your own MJML

You can also upload your own MJML code to use in the email. This is useful if you have a pre-existing template you want to use.

For a general overview of uploading custom emails with Loops, see here.

At this time, you cannot use merge tags in MJML transactional emails. However, we do support using data variables. For example, if you want to create a data variable called PasswordResetLink, you can use it in your MJML like this:

<mj-text> Hello {DATA_VARIABLE:PasswordResetLink}</mj-text>

Note the uppercase “DATA_VARIABLE” and the colon before the variable name.

Data variables are case-sensitive and can only contain letters, numbers, underscores, and dashes.

Review your email

On the next page, after clicking “Next”, you’ll see the API Details section. This contains the data variables used in the email as well as a sample payload for reference. The “Transactional ID” lets you distinguish between different transactional emails when calling the API and is required.

Publish the email

To enable sending the email, it needs to be published by pressing “Publish”.

Send your email

In the example above, two Data Variables were used in the email and there is a transactional ID needed as part of our API call. Any data variables created in the email are required when making the API request.

Here’s an example of the request for sending this email:

Send a POST to this endpoint (make sure to authenticate)

https://app.loops.so/api/v1/transactional

Payload

{
  "transactionalId": "clfq6dinn000yl70fgwwyp82l",
  "email": "[email protected]",
  "dataVariables": {
    "name": "Chris",
    "passwordResetLink": "https://example.com/reset-password"
  }
}

Editing the email

To edit the email, press “Duplicate as Draft” on the Compose page:

The previous version of the email will continue sending until you press “Republish” on the Publish page:

That means you can edit Transactional emails while still sending your existing emails.

Metrics

After emails are sent, details are shown in the metrics page.

These include send time and if messages experienced any issues with delivery (bounces or spam complaints).

Note that open and click tracking is disabled for transactional messages to improve deliverability for infrastructure-level communications.