System Email Templates
What are Email Templates?
Email Templates allow you to customize the content of emails sent from FusionInvoice. You can use them to personalize communication with your clients for various scenarios—such as sending quotes, invoices, overdue notices, upcoming payment reminders, credit memos, and payment receipts. Each template supports HTML and a range of dynamic variables, which are replaced with real data when the email is sent.
Where to Configure Email Templates:
Navigate to System > Configuration > System Settings on the Email tab to find and configure the various email templates. Depending on the type of email (quotes, invoices, overdue invoices, payment receipts, etc.), you can customize the subject and body fields.
HTML and Dynamic Variables:
Email templates support HTML formatting. You can also use dynamic variables to automatically insert relevant information such as client names, invoice numbers, totals, and due dates. Variables are wrapped in {{ }}
tags and reference objects like $quote
, $invoice
, $payment
, or $client
.
Custom Fields:
Starting with FusionInvoice version 2019-3 and later, you can include custom fields in any email template. Reference them using:
{{ $invoice->client->customField('Field_Label') }}
For example:
{{ $invoice->client->customField('Favorite Color') }}
Quote Email Templates
Can be used in both the body and subject fields for the following emails:
- Quote
- Quote Approved
- Quote Rejected
Available Variables:
Quote Information
{{ $quote->formatted_created_at }}
: Issue Date{{ $quote->formatted_expires_at }}
: Expiration Date{{ $quote->number }}
: Quote Number{{ $quote->status_text }}
: Quote Status{{ $quote->summary }}
: Summary Text{{ $quote->public_url }}
: Public Link to View the Quote{{ $quote->formatted_terms }}
: Terms{{ $quote->formatted_footer }}
: Footer{{ $quote->amount->formatted_total }}
: Total Amount
Client Information
{{ $quote->client->name }}
: Client Name{{ $quote->client->formatted_address }}
: Client Address{{ $quote->client->phone }}
: Phone{{ $quote->client->fax }}
: Fax{{ $quote->client->mobile }}
: Mobile{{ $quote->client->email }}
: Email{{ $quote->client->web }}
: Website
User Account Information
{{ $quote->user->name }}
: User Name
Company Profile
-
{{ $quote->companyProfile->formatted_address }}
-
{{ $quote->companyProfile->phone }}
-
{{ $quote->companyProfile->mobile }}
-
{{ $quote->companyProfile->web }}
Example Subject:
Quote #{{ $quote->number }}
Example Body
<p>To view your quote from {{ $quote->user->name }} for {{ $quote->amount->formatted_total }}, click the link below:</p>
<p><a href="{{ $quote->public_url }}">{{ $quote->public_url }}</a></p>
Invoice Email Templates
Can be used in both the body and subject fields for the following emails:
- Invoice
- Overdue Email
- Upcoming Payment Notice
- Credit Memos
Available Variables:
Invoice Information
{{ $invoice->formatted_created_at }}
: Issue Date{{ $invoice->formatted_due_at }}
: Due Date{{ $invoice->number }}
: Invoice Number{{ $invoice->status_text }}
: Invoice Status{{ $invoice->summary }}
: Summary{{ $invoice->public_url }}
: Public Link to View the Invoice{{ $invoice->formatted_terms }}
: Terms{{ $invoice->formatted_footer }}
: Footer{{ $invoice->amount->formatted_total }}
: Total Amount{{ $invoice->amount->formatted_paid }}
: Amount Paid{{ $invoice->amount->formatted_balance }}
: Remaining Balance
Client Information
{{ $invoice->client->name }}
: Client Name{{ $invoice->client->formatted_address }}
: Client Address{{ $invoice->client->phone }}
: Phone, etc.
User Account Information
{{ $invoice->user->name }}
: User Name
Company Profile
{{ $invoice->companyProfile->company }}
: Company Name{{ $invoice->companyProfile->formatted_address }}
: User's Address{{ $invoice->companyProfile->phone }}
{{ $invoice->companyProfile->mobile }}
{{ $invoice->companyProfile->web }}
Example Subject:
Invoice #{{ $invoice->number }}
Example Body:
<p>To view your invoice from {{ $invoice->user->name }} for {{ $invoice->amount->formatted_total }}, click the link below:</p>
<p><a href="{{ $invoice->public_url }}">{{ $invoice->public_url }}</a></p>
<p>{{ $invoice->user->formatted_address }}</p>
Payment Receipt Email Templates
Can be used in both the body and subject fields for the following emails:
- Payment Receipt Email
Payment Receipt Subject Variables:
{{ $payment->formatted_amount }}
: Payment Amount{{ $payment->formatted_paid_at }}
: Payment Date{{ $payment->formatted_numeric_remaining_balance }}
: Remaining Balance of the Payment{{ $payment->paymentMethod->name }}
: Payment Method Name{{ $payment->formatted_note }}
: Payment Note
Available Variables for Payment Receipts:
-
Payment Information:
- Payment Date:
{{ $payment->formatted_paid_at }}
- Payment Amount:
{{ $payment->formatted_amount }}
- Remaining (Unapplied) Balance:
{{ $payment->formatted_numeric_remaining_balance }}
- Payment Note:
{{ $payment->formatted_note }}
- Payment Method Name:
{{ $payment->paymentMethod->name }}
- Payment Date:
-
Referencing Invoices Paid (by the Payment):
If the payment was applied to multiple invoices, you can reference each invoice, individually, by its index number in the paymentInvoice model, for instance:- This will reference the first invoice paid, returning the document number for it.
{{ $payment->paymentInvoice->first()->invoice->number }}
- This will reference the second invoice paid, returning the currency formatted numeric total amount of the invoice.
{{ $payment->paymentInvoice->first()->invoice->amount->formatted_total }}
-
There are some convenience functions that can return all of the invoices that were paid from a payment too.
- This will give you a formatted and hyperlinked (public invoice link) list of all invoices paid from a single payment.
{!! $payment->payment_applications_with_links !!}
- This will return a list of all invoice document numbers that a payment was applied to.
{!! $payment->invoice_numbers !!}
- This will give you a formatted and hyperlinked (public invoice link) list of all invoices paid from a single payment.
- This will reference the first invoice paid, returning the document number for it.
-
Referencing Client and User Information:
Similar to invoice email templates, you can include details from the client the payment was for, or user that processed the payment.- For instance, to display the client name:
{{ $payment->client->name
}}
- To display the name of the user that processed the payment:
{{ $payment->user->name }}
- For instance, to display the client name:
Example Subject:
Thank you for your payment of {{ $payment->formatted_amount }}
Example Body:
<p>We have received your payment of {{ $payment->formatted_amount }} on {{ $payment->formatted_paid_at }}.</p>
<p>Payment Method: {{ $payment->paymentMethod->name }}</p>
<p>Remaining Balance: {{ $payment->formatted_numeric_remaining_balance }}</p>
<p>{{ $payment->formatted_note }}</p>
If multiple invoices were paid, loop through $payment->paymentInvoices
:
@foreach ($payment->paymentInvoice as $paymentInvoice)
<p>Invoice #{{ $paymentInvoice->invoice->number }}: {{ $paymentInvoice->invoice->amount->formatted_total }} paid.</p>
<p>Remaining Balance on Invoice: {{ $paymentInvoice->invoice->amount->formatted_balance }}</p>
@endforeach
Best Practices
- Keep it Clear & Concise: Use straightforward language and formatting to ensure your clients understand the email content.
- Leverage Variables: Insert dynamic details such as invoice totals, due dates, or public URLs to streamline client interactions.
- Test Before Sending: Send a test email to verify that variables render correctly and that the formatting looks good in common email clients.
- Maintain Branding: Include your company name, logo (via HTML), and brand colors to maintain a professional image.
- Update as Needed: Refresh your templates when your business details, policies, or branding change.
By utilizing these Email Templates and variables, you can ensure that all outbound communications are professional, informative, and consistent with your company’s branding and messaging.