Customizing invoice emails in Storeganise
Contents
- Overview
- Using placeholders
- Using custom fields
- Advanced customization of invoice partials
- Adding separate bank accounts for each site
Overview
Storeganise has several automated email functions which are managed in the main settings of the admin portal. These emails can be customized to fit your needs. They are built as general templates that pull placeholder information so each email is automatically personalized to the customer and user it is being sent to. This article will focus on how to utilize these features to customize your invoice-related emails.
You will find these templates in the Main Settings of your admin portal under the Emails section. Simply click on one of the emails here to open the window where you will edit the layout and content of the email.
You can find more information about these email notifications here.
Using placeholders
Placeholders in email templates pull recipient-specific data from the system. Default placeholders are available and can be selected in the 'edit template' window. Click 'Insert placeholder â–Ľ' in the top right corner to see the list of default variables.
When you select a placeholder, it will be automatically placed where your cursor is. For example, to add a greeting near the top of your invoice email that addresses your customer by name, use the placeholders from this list.
- {{user.firstName}} and {{user.lastName}}
If you add this information and click the Preview button, the placeholders will turn into the recipient's first and last names.
Placeholder additions:
Previewed:
When previewing emails for customers, dummy information will be automatically filled in to provide a better idea of the content.
You can use placeholders to customize your email templates. The preset placeholders include data related to users, sites, rentals, invoices, and more.
Learn how to create and use custom placeholders below.
Note: If you want to show dates in a short format, make sure that
formatDate
is added before{{invoiceCreated}}
e.g.{{formatDate invoice.created}}
.
Using custom fields
If you need to add non-native information to your invoices in Storeganise, you can use custom fields. These fields will be automatically added to the 'Insert placeholderâ–Ľ' dropdown list in email template editing as you create them.
Click here to view more information about creating and using custom fields.
For example, if a customer needs to link Purchase Order numbers to invoice payments, create a custom field for this information. In this case, the custom field will be created at the user level.
Note: In order to make custom fields appear as placeholders for email templates they must be viewable by users in the User permissions setting.
With the custom field created, you will now see it as an option in the placeholder dropdown.
However, data must exist in this custom field for it to display in the email. If you use a placeholder without associated data, it won't show anything. Let's add a PO number for the user in this example.
Now if we insert a new line for the invoice email template and utilize the custom field placeholder, it will display this information in the email.
Custom field placeholder added:
Previewed:
By utilizing custom fields you can significantly increase the customizability of your automated emails to tailor them to your specific business needs.
Advanced customization of invoice partials
If you need more control over the customization of the default invoice partials for the header and line items, the full HTML codes can be found below.
The full HTML code for {{>invoiceHeader}}
:
<table width="100%" border="0"> <tr> <td width="50%" style="font-size: 16px; vertical-align: top;"> <a href="{{urls.unitsApp}}/account/invoices/{{uppercase invoice.sid}}" style="color:{{brand.linkColor}}"> <strong>{{cmsText 'invoiceHeader.title'}}</strong> #{{uppercase invoice.sid}} </a> {{#ifInvoiceFailed}} <br /> <strong style="color:#B94A48;font-size: 16px;">{{cmsText 'invoiceHeader.failed'}}</strong> {{/ifInvoiceFailed}} {{#ifInvoicePaid}} <br /> <strong style="color:#60C060;font-size: 16px;">{{cmsText 'invoiceHeader.paid'}}</strong> {{/ifInvoicePaid}} </td> <td width="50%" class="text-end" style="vertical-align: top;"> {{cmsText 'invoiceHeader.date'}}: {{formatDate invoice.startDate dateFormats.short}} </td> </tr> </table>
The full HTML code for {{>invoiceItems}}
:
<table width="100%"> {{#if unit.name}} <tr> <td colspan="3"> <h4 style="margin-bottom: 0">{{cmsText 'invoiceItems.unitHeader'}} {{unit.name}}</h4> </td> </tr> {{/if}} {{#if invoice.entries.length}} <tr> <td></td> <td class="text-muted text-end">{{cmsText 'invoiceItems.price'}}</td> <td class="text-muted text-end">{{cmsText 'invoiceItems.tax'}}</td> <td class="text-muted text-end">{{cmsText 'invoiceItems.total'}}</td> </tr> {{#each invoice.entries}} <tr> <td> {{desc}} <br/> <span class="text-muted"> {{#if endDate}} ({{formatDatePeriod date endDate}}) {{else}} ({{formatDate date ../dateFormats.short}}) {{/if}} </span> </td> <td class="text-muted text-end">{{#if qty}}{{qty}} × {{/if}}{{formatPrice amount}}</td> <td class="text-muted text-end">{{#if tax}}{{formatPrice tax}}{{/if}}</td> <td class="text-muted text-end">{{formatPrice total}}</td> </tr> {{/each}} {{/if}} <tr><td colspan="4"> </td></tr> {{#if invoice.tax}} <tr> <td colspan="3" class="text-end">{{cmsText 'invoiceItems.subtotal'}}:</td><td class="text-end">{{formatPrice invoice.subtotal}}</td> </tr> <tr> <td colspan="3" class="text-end">{{cmsText 'invoiceItems.tax'}}:</td><td class="text-end">{{formatPrice invoice.tax}}</td> </tr> {{/if}} <tr> <td colspan="4" class="text-end" style="font-size: 16px; padding-top:20px;"><strong>{{cmsText 'invoiceItems.total'}}: {{formatPrice invoice.total}}</strong></td> </tr> {{#ifNull invoice.amountPaid}} {{else}} <tr> <td colspan="4" class="text-end" style="font-size: 16px; padding-top:6px;">{{cmsText 'invoiceItems.amountPaid'}}: {{formatPrice invoice.amountPaid}}</td> </tr> <tr> <td colspan="4" class="text-end" style="font-size: 16px; padding-top:6px;"><strong>{{cmsText 'invoiceItems.amountDue'}}: {{formatPrice invoice.balance}}</strong></td> </tr> {{/ifNull}} </table>
Adding a bank account for each site
To ensure that each site’s invoices display the correct bank account details, follow these steps:
Create a custom field for bank account information
- Go to your main settings.
- Navigate to the "Custom Fields" section and under the ''Site Custom Field'' section.
- Create a new custom field specifically for bank account information.
- Name this field clearly, such as “Bank Account Details” or something similar.
- Save your new custom field.
Note: To learn more about custom field settings, you can check this help document.
Assign the custom field to each site:
- For each site within your business, go to 'Details.'
- Find the section for custom fields.
- Assign the newly created "Bank Account Details" field to the site.
- Enter the correct bank account information for that specific site in the custom field.
- Repeat this process for all sites.
Update the invoice email template:
- Access your invoice email template, which is used across the entire business.
- Identify where the bank account details need to be displayed.
- Insert the placeholder for the custom field you created (e.g., {{Bank Account Details}}) into the appropriate location within the email template.
- Save the updated template.
Finally, run a test invoice for each site to ensure that the correct bank account information is being populated automatically. Also, check that the email template correctly pulls the custom field data for each site.