We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

Email Manager

Unlock the full potential of our feature and take your skills to the next level! Dive into our Training Center and discover exclusive Best Practice resources that will elevate your implementation strategy. With expert tips and insider knowledge, you'll become a master in no time. Access the links below to learn more and gain a competitive edge.

Ready to get started? Our Training Center is just a click away: here.

*For more information about our Training center, please visit the article here.

Overview

All available notification templates are located under Manage → Email manager. To enable an email, click the toggle on the right side of the page to green. Once you've done that, you'll be able to hit the pencil icon to customize the email template in question. If you want to preview any emails, simply click the eye icon next to that email.

Important: Please note that, for all white-labeled Piano applications, you must customize the "Master Email Template" before any emails will send. This ensures that you've added your branding to your emails before they go out.

When you open each email, you'll notice a list of variables off to the left that are available within that template. By using those variables, you can write one email that automatically inputs information specific to your business or the customer you're emailing (such as the customer's name, your business name, the name of a resource, and other user or use-case-specific details).

Before using the Email manager, you'll need to go to Edit Business from the Piano Dashboard to designate a support email (this is the email address from which your emails will be sent from and to which users can respond to). Once you've done that, you'll want to follow these steps to ensure emails sent through Piano appear to originate from your domain.

Note that Piano email templates support the <t></t> custom element.

Using Handlebars In Emails

Piano's notification templates support the Handlebars templating engine. With Handlebars, in order to include a variable simply surround the variable name with double curly brackets. Here, for example, is how you would add today's date to an email: {{current_date}}. Note that available variables will vary from email to email (all available variables will be shown in the left sidebar of an open email template). If you click on a variable in the left sidebar, it will automatically be inserted into the template.

As Handlebars by default escapes HTML characters, you can use triple curly brackets not to do that. For example, if the variable contains HTML code and you want to keep it formatted properly, you'd add the variable like this {{{sys_inquiry_latest_comment.sys_inquiry_comment_text}}}.

If Statements

Handlebars allows you to add or exclude parts of emails depending on whether a value exists for a particular variable. In those cases, this formulation is used: {{#if variable_name}}...{{/if}}.

For example, when purchasing a gift term, the gift giver has the option to include a custom message for the gift receiver. Within the default "Voucher delivery" email, there's a {{voucher_message}} variable that's used to dynamically insert that custom message. But, because the custom message is optional, it's possible the gift giver won't add a message. Using {{#if voucher_message}}...{{/if}} ensures that the custom message section is only shown if a message was specified by the gift giver. Here's the section in question:

      {{#if voucher_message}}
      <table bgcolor="#f2f4f8" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 6px 0 0 0; font-size: 14px;">
        <tr>
          <td style="padding: 14px;font-style: italic;">
            "{{voucher_message}}"
          </td>
        </tr>
      </table>
      {{/if}}

If needed, you can also add an Else statement, for example like this:

{{#if user_firstname}}{{user_firstname}}{{else}}Dear User{{/if}}

Additional Conditional Helpers

Email templates support additional conditional helpers from this library to enable more advanced logic.

The following example uses the startsWith custom helper together with the eq helper inside an or condition. It displays custom content if the billing ZIP code either:

  • Begins with "00", or

  • Exactly matches "06390"

This is useful for region-specific messaging, such as legal disclosures or promotional notices.

{{#or (startsWith billing_zip_code "00")
    (eq billing_zip_code "06390")}}
  <div style="margin:16px 0; padding:12px; background:#f7f7f7; border:1px solid #ddd;">
    <p style="margin:0; font:14px/20px Arial, Helvetica, sans-serif; color:#333;">
      <strong>Important Notice:</strong>
      This is a custom message displayed for specific ZIP codes.
    </p>
  </div>
{{/or}}

If neither condition is met, the content inside the block will not be rendered in the email.

Within notification templates there are two URL variables. One is the business URL that you added to Piano's Edit Business screen. The second is a URL for the business logo you uploaded to Edit Business. Within notification templates you are able to use these variables as you would any other URL. So, for example, you could use the src attribute to insert your logo into the email template like this:

HTML
<img src="{{logo_url}}" width="40" height="40">

And you could use a href to create a link with your business URL like this:

HTML
<a href="{{business_url}}">{{business_name}}</a>

Please note, that we currently don't have an option to insert a link that the user could click to view the email in a browser's tab or window.

Emails Piano Sends To You

In addition to sending emails to your customers, Piano will automatically send emails to the Notification email address you specify in Edit Business. We will inform you when important events occur. Such as:

  • Purchases

  • Cancellations

  • Customer inquiries

  • Refunds

  • Account changes

  • Changes to your email domain settings

  • Webhook status changes

  • External service term verification

Term-Specific Emails

A subset of the emails listed in Email Manager can also be customized on a per-term basis. If you want to customize emails for a particular term, click on Manage → Terms, select a term, and click on the Email templates tab. That will show the list of emails that you can customize for that term. If you turn on a per-term email, it will override the email of the same name you've set up in Email manager, so the corresponding email in your Email manager will not be sent if the term is converted on.

See here for a full breakdown of all Piano notification templates.

Last updated: