Email templates

The Email Templates provided via the ReachFive Console allow you to send templated emails that are triggered when certain actions occur.

Configure email templates

You configure the email templates from the ReachFive Console by navigating to Settings  Emails  Templates. The tabs below show you how to configure each template. Currently, the following variables are available using liquid.

Template variables

Variable Description

{{link}}

This is the generated magic link (hosted by ReachFive that redirects to the specified URL).

{{verification_code}}

This is the generated verification code sent by email.

{{user.email}}

The user’s email address.

{{user.lang}}

The default language for the user.

{{locale}}

The user’s locale (country).

{{user.given_name}}

The user’s given name (first name).

example

Nicole Dubois

{{user.family_name}}

The user’s family name (last name, surname).

example

Nicole Dubois

{{user.custom_fields.key}}

Custom user fields. Only the string, select, and tag custom field data types can be used in email templates.

example

{{user.custom_fields.favorite_movie}}

The tags custom field type is concatenated by default. If you want to separate the tags, use the join function:

Example

favorite_movie:["The Secret Life of Pets","Forrest Gump","Amélie"]

format
{{ user.custom_fields.favorite_movie | join: " , " }}
output
The Secret Life of Pets, Forrest Gump, Amélie

{{user.suspension_reason}}

The reason why the user was suspended.

{{user.client_id}}

The client ID used to perform the API call. This can be either an Identity or Management client.

{{user.lockout_end_date}}

The date and time when the lockout for the user ends.

{{ip}}

The IP address of the user attempting to log in.

{{userAgent}}

The user agent content.

Typically, this includes browser and platform information.

{{operatingSystem}}

The user’s operating system such as Android.

{{deviceClass}}

The class of the user’s device such as Phone.

{{deviceName}}

The name of the user’s device such as Google Nexus 6.


Signup

Sent after a user signs up via email

A link with a code and a specific redirect URL is sent. This verifies the user and redirects the user to the page of your choice.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Hi {{user.given_name}}! Please confirm your email.
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <h1>Please verify your email address</h1> <p>To verify your email, please select <a href="{{link}}">this link</a>.</p>
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime


Verify email

Sent to users who still need to verify their account.

Sometimes, users have created an account without verifying it. In these cases, the accounts may have been around for quite some time or perhaps, they’re new. Either way, this template is sent in order to verify the user account.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Please verify your account, {{user.give_name}}.
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <h1>Hi there! Please verify your email address so we can ensure it's you. </h1> <p>Click <a href="{{link}}">this link</a> to verify your email.</p>
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime


Email update

Sent when a user email is updated

When the user updates their email address in the system, an email is sent to them containing a verification link.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Email update - Please confirm your email.
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <h1>Please verify your email address</h1> <p>To verify your email, please select <a href="{{link}}">this link</a>.</p>
  7. Don’t forget to Save your input.

If you want to notify the old email address that the email was updated, you’ll also need to do the following:

  1. Click the Notify email update option.

    This sends a notification email to the old email address about the email being updated.

  2. Write your Notification subject.

    Email address updated
  3. Write your Notification message.

    <h1>We have just received a request to update your email address.</h1> <p>If you didn't change it, please contact the site administrator to cancel this update.</p>

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime

Notify email update

Checkbox if you want to send an email to the old address to notify of an email change.

notify


Password reset

Sent when a user password is reset

The email contains a link that can used only once. This link enables the user to change their password on the page of your choice.

This Password reset template is sent when users have started the "Forgot password" flow. Users receive an email with the magic link as part of the flow and no follow up email is sent after the password is updated.
When the password reset template is used for custom providers, the request payload contains the has_password boolean.

The has_password boolean gives custom providers the option to let users create a password.

  • true: The user already has a password; the user should be asked to reset the existing password.

  • false: The user does not have a password associated with their account; the user should be asked to create a password.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Hi {{user.given_name}}! Please reset your password.
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <p>A request was made to reset your password.</p> <p>If you initiated this request you can follow <a href="{{link}}">this link</a></p>. Alternatively, you can use this {{verification_code}} to reset your password.
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime


Password updated

Sent when a user password is updated

When a user’s password is changed, an email is sent to them to inform them of this change.

This Password updated template is sent when users log in and update their password themselves. For forgotten passwords, users receive an email with the magic link as part of their forgot password (Password reset) flow and no follow up email is sent after the password is updated.
  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Hi {{user.given_name}}! Your password was changed.
  4. Write your Message for the template.

    <p>Hi {{user.given_name}},</p> <p>We wanted to let you know that your password was changed.</p>
  5. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.


Signup invitation

Sent when a user registers interest

When a user wants to sign up, this email is sent to so they can follow the sign up flow.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Hi {{user.given_name}}! Sign up with us!
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <p>Hello {{user.given_name}},</p> <p>Please click on the following <a href="{{link}}">link</a> to signup to your account.</p>
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (days)

The URL lifetime in days.

url lifetime days


Account suspension

Sent when a user account is suspended

When a user’s account is suspended, an email is sent to them informing them of the steps they need to take to reactivate their account.

If a user is indefinitely suspended, they will not receive a reset link. For more information, see the user suspension page.
  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Uh oh! Your account has been suspended.
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <p>Hello {{user.given_name}},</p> <p>Your account has been disabled for security reasons. Please <a href="{{link}}">reset</a> your password to reactivate it.</p>
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Client ID

The client ID used to perform the API call. This can be either an Identity or Management client.

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime

User lockout

Sent when a user is locked out from their account

When a user gets locked out from their account from something like too many unsuccessful login attempts, an email is automatically sent to them informing them of the steps they need to take to unlock their account.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Your account has been locked.
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <p>Hello {{user.given_name}},</p> <p>Your account has been temporarily locked until {{user.lockout_end_date}}. Please follow the instructions <a href="{{link}}">here</a> to unlock your account.</p>
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime

Risky Login Notification

Sent to user when login attempt is deemed risky

This template should be used to notify users that a login attempt from their account is considered unusual or risky. For users that haven’t enrolled any identifiers for MFA, the email is sent every time a user attempts to log in.

To learn more, see Risk-based Authentication.

  1. Enable the template.

  2. Enter the sender’s email in the From field.

  3. Write your Subject.

    Unusual login attempt
  4. Enter the URL to redirect users in the Redirect to field.

  5. Specify the URL lifetime (in seconds).

  6. Write your Message for the template.

    <p>Hello {{user.given_name}},</p> <p>An unusual login attempt occurred on your account. Please confirm it was you.</p>
  7. Don’t forget to Save your input.

Custom provider templates

If you have configured a custom provider, your templates will be different and only contain the following fields:

Field Description

Enabled

Checkbox to enable the template.

enabled

Template ID

The ID that you assign to the template.

template id

Redirect to

The URL to which you want to redirect the user.

redirect to

URL Lifetime (seconds)

The URL lifetime in seconds.

url lifetime

Translate email template

When sending emails, you can use liquid templating language to check the user’s language and send the email in the appropriate language for that user.

By default ReachFive detects a user’s language from the browser. You can override this at initialization if desired.

To translate emails based on the user’s specific language, use the user.lang parameter. See the example below for help if needed:

Translate email
{% case user.lang%} {% when 'fr'%} Bienvenue! {% when 'it'%} Ciao! {% when 'es'%} ¡Bienvenido! {% else%} Welcome! {% endcase%}
Section Notes

{% case user.lang%}

Uses the case control flow to put a condition on user.lang.

{% when '<language>'%} <Translation>

Specifies what translation to use based on the specified language.

Currently supported languages
  • ar - العربية Arabic

  • de - Deutsch German

  • en - English

  • es - Español Spanish

  • fr - Français French

  • hu - Magyar Hungarian

  • it - Italiano Italian

  • jp - 日本 Japanese

  • ko - 한국인 Korean

  • nl - Nederlands Dutch

  • pt - Portuguese

  • ru - Ру́сский Russian

  • sk - Slovenský Slovak

  • zh-CN - People’s Republic of China Simplified Chinese

  • zh-Hans - Simplified Chinese

  • zh-Hant - Traditional Chinese

  • zh-HK - Hong Kong Traditional Chinese

  • zh-MO - Macao Traditional Chinese

  • zh-SG - Singapore Simplified Chinese

  • zh-TW - Taiwan Traditional Chinese

{% else%} <default_content>

Specifies the default content if languages other than the aforementioned translations are used.

{% endcase%}

Ends the case control flow for the user.lang parameter.