Extension to help with email templates

Hey all, I too had this issue and it made me abandon my nicely formatted emails entirely for many months. Fortunately, I have created a fix that works on Server Edition 26.8.4.3664 and may also work on other recent Manager versions.

GitHub Link: https://github.com/zdb00/managerio-email-tags

This is a third-party extension and is not part of, or endorsed by, Manager. As with any Inline Custom Button, users should review the source before installing it.

This extension adds dynamic tags and legacy Liquid support to Sales Invoice emails. Integrates with and fixes Manager’s existing email composer.

Install

  1. In Manager, go to Settings → Custom Buttons → New.
  2. Set Name to Enhanced Email (or anything you’d like).
  3. Set Source to Inline and paste the entire contents of manager-email-bridge.html into the HTML field.
  4. Set Placement to sales-invoice-view.
  5. Save, open a Sales Invoice, and click Enhanced Email.

Add your placeholders to Manager’s existing Sales Invoice Email Template, then reopen the invoice with the new custom button. Review the prepared email and click Manager’s normal Send.

Manager’s email settings must already be configured. The customer needs an email address, and Hide balance due must be off on the invoice.

Dynamic tags

These tags work in both the subject and body. Copy the spelling and capitalisation exactly.

Tag Value
{BusinessName} Business name
{CustomerName} Customer name
{CustomerEmail} Customer email address
{InvoiceNumber} Invoice reference
{InvoiceReference} Same as InvoiceNumber
{InvoiceDate} Formatted invoice date
{DueDate} Formatted due date, or blank if missing/hidden
{InvoiceTotal} Full invoice total
{BalanceDue} Outstanding balance, including zero for a fully paid invoice

Unknown tags stay unchanged. If the balance cannot be determined safely, the extension shows an error.

Example of a message using Dynamic tags:

Dear {CustomerName},

Invoice {InvoiceNumber} has an outstanding balance of {BalanceDue}, due on {DueDate}.

Compatibility with old Liquid

You can mix simple tags and Liquid in the same template. Every tag above also works as a Liquid variable, such as {{ CustomerName }} or {{ BalanceDue }}.

These older variables are supported:

{{ reference }}
{{ recipient.name }}
{{ recipient.email }}
{{ business.name }}

Existing Liquid loops, conditions and captures can use these exact labels:

Collection Supported labels Value property
fields Invoice date, Due date field.text
table.totals Total, Balance due total.text

For example, this old balance lookup works unchanged:

{% for total in table.totals %}
  {% if total.label == 'Balance due' %}
    {{ total.text }}
  {% endif %}
{% endfor %}

Compatibility covers the variables listed here; other old theme variables, line items and custom fields are not included. Body values are already HTML-escaped, so remove an extra | escape filter from these values if your old template uses one.

Thanks for sharing this.

A moderator note for users considering installing it: this is third-party code and is not part of, or endorsed by, Manager. Inline Custom Buttons execute code within your logged-in Manager environment, so users should review and understand the source before installing any such extension.

I would also suggest removing the statement that it “should also work for all previous Server Editions”. The extension depends on the current API4/custom-button implementation and several current Manager UI internals, so compatibility with earlier versions cannot be assumed without testing.

It would be better to state simply that it has been tested on Server Edition 26.8.4.3664 and may work on other recent versions.

The GitHub repository is also very new and currently has no licence, so adding one would be advisable.

Excellent work @brandon thank you. I’ve now got personalised emails working on the latest version (26.9.1.0)

Thanks eko, fair points.

I’ve updated the post to remove the compatibility claim and made it clear it’s a third-party extension. I’ll also add an MIT licence to the repo.

Appreciate the feedback.

This works really well, thank you very much for creating it!

One small thing I found: {InvoiceTotal} and {BalanceDue} add a stray space at the end, which can be annoying when you end a sentence with those variables.

Example:

  • The amount due is {InvoiceTotal}.
  • The amount due is € 100,00 .

Thanks @Domenico for confirming it works on 26.9.1.0, and @iGrasmat for the feedback and for catching that trailing space!

I’ve updated the extension with a fix for that and a few additions:

Fixed: extra space after amounts

{InvoiceTotal} and {BalanceDue} now have trailing whitespace removed, so punctuation can follow directly:

The amount due is {BalanceDue}.

This now produces The amount due is $ 100.00. rather than The amount due is $ 100.00 .

New: amount-formatting options

You can now control currency spacing, decimal places and thousands separators. These options work with both InvoiceTotal and BalanceDue, in the subject and body.

For an amount normally displayed as $ 1,234.56:

Tag Result
{BalanceDue_Compact} $1,234.56
{BalanceDue_Spaced} $ 1,234.56
{BalanceDue_NoCurrency} 1,234.56
{BalanceDue_NoDecimals} $ 1,235
{BalanceDue_2Decimals} $ 1,234.56
{BalanceDue_NoGrouping} $ 1234.56
{BalanceDue_Compact_2Decimals_NoGrouping} $1234.56

When combining options, use currency → decimals → grouping order. These respect the invoice’s configured currency and number separators; they do not convert currencies. Rounding only changes the email’s displayed amount, not the invoice, PDF or actual balance.

The original tags still keep Manager’s formatting, apart from removing the trailing whitespace.

New: custom-field tags

You can now include custom fields displayed on the Sales Invoice, including customer fields shown there:

Invoice {InvoiceNumber} for {CustomField_Project Name}
Your purchase order reference is {CustomField_Purchase Order}.

Use the exact field name, including spaces and capitalisation. The field must have Display on view enabled and contain a value.

Hidden fields, image fields, business-detail fields and line-item fields are not supported. Missing fields or duplicate displayed field names leave the simple tag unchanged.

For optional fields, Liquid lets you omit the wording when no value is available:

{% if CustomFields["Project Name"] != blank %}
Project: {{ CustomFields["Project Name"] }}
{% endif %}

New: different wording for overdue invoices

You can now use the Liquid condition IsOverdue to switch between a normal invoice email and a payment reminder, using the same template.

For example, in the body:

Dear {CustomerName},

{% if IsOverdue %}
A friendly reminder that invoice {InvoiceNumber} was due on {DueDate}. The remaining amount due is {BalanceDue_Compact_2Decimals}.
{% else %}
Please find invoice {InvoiceNumber} attached. Thank you for your business.
{% endif %}

This also works in the subject. It follows Manager’s overdue status and requires a visible, explicitly configured due date. Partially paid invoices can still be overdue; fully paid invoices and invoices due today use the normal wording.

Updating

Replace the HTML in your existing Enhanced Email custom button with the latest contents of manager-email-bridge.html, save, then reopen the invoice using the button.

Latest code and full instructions: https://github.com/zdb00/managerio-email-tags

Everything still uses Manager’s existing email composer, PDF attachment and normal Send button, nothing is sent automatically. As before, this is a third-party extension, so please review the source before installing or updating.

Excellent update, thank you @brandon — the formatting options are very handy.

I’m curious, is this code easily extensible to sales quotes? Could the code be adapted so it also works with a placement in the sales quote view?

Thank you for the quick response, it is now working as expected!

Yes, it is. I’m currently working on something that will work for all existing templates (e.g. Payslips, Quotes, Orders, etc) and should improve the overall user experience greatly. Although, you may have to add an individual custom button for each area where you’d like to use it, unless someone knows a workaround to add multiple placements for one button?

Give me a couple days to get this finished, but I’m sure you guys will love it.

@brandon I’m sincerely grateful for all the work you’ve done—as is, the invoice plugin means I can run the latest version of Manager and issue my invoices with ease. Anything more is truly a bonus! I hope your work gets recognised, especially in light of the fact that the thread on the underlying issue has no formal acknowledgement on native support.

@brandon I’ve noticed the plugin will escape special characters like apostrophes and ampersands if a customers name is something like “Dom’s Kitchens & Bathrooms Pty Ltd”. The modifications attached have fixed it for me using Claude AI