You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Table of Contents

This email template is sent when a scheduled unpaid invoice is delivered to the client. It will contain a PDF attachment of the invoice. Each of the clients' billing contacts will receive this email if any are set, otherwise the primary contact will receive the email.

Supported Tags

The tags described in Blesta are only a list of commonly-used tags, for brevity.

Because the {invoices} tag is an array of objects (i.e. possibly multiple invoices), it should not be used as written. Instead, you should configure the template to loop through each invoice individually by using the for notation described under Customizing Emails.

The tags below are all of those available for this email template. For other email and tag customizations, see Customizing Emails.

TagDescriptionNotes
{contact.first_name}The client's first name 
{contact.last_name}The client's last name 
{contact.email}The client's email address 
{contact.id_code}The client's IDe.g. 1500
{autodebit}Whether or not autodebit is enabled for this clienti.e. 1 or 0, denoting yes or no, respectively
{client_url}The URI to Blesta's client interfacee.g. domain.com/billing/client/

Due to the nature of tag objects containing several fields, many of which are likely irrelevant for use in email templates, but may be useful to you in certain circumstances, an example dump of the tag objects are shown below.

The {contact} object
stdClass Object
(
    [id] => 1
    [id_format] => {num}
    [id_value] => 1500
    [user_id] => 2
    [client_group_id] => 1
    [primary_account_id] => 
    [primary_account_type] => 
    [status] => active
    [id_code] => 1500
    [contact_id] => 1
    [first_name] => First
    [last_name] => Last
    [company] => Company Co.
    [email] => first.last@domain.com
    [address1] => 123 Main St.
    [address2] => 
    [city] => City
    [state] => CA
    [zip] => 90001
    [country] => US
    [group_name] => General
    [company_id] => 1
    [username] => first.last@domain.com
    [two_factor_mode] => none
    [two_factor_key] => 
    [two_factor_pin] => 
    [date_added] => 2014-06-25 18:05:34
)
The {invoices} array of objects
Array (
    [0] => stdClass Object
        (
            [id] => 1
            [id_format] => {num}
            [id_value] => 1
            [client_id] => 1
            [date_billed] => 2014-06-25 00:00:00
            [date_due] => 2014-07-01 00:00:00
            [date_closed] => 
            [date_autodebit] => 2014-06-29 00:00:00
            [status] => active
            [subtotal] => 10.0000
            [total] => 10.0000
            [paid] => 10.0000
            [previous_due] => 0.0000
            [currency] => USD
            [note_public] => 
            [note_private] => 
            [id_code] => 1000
            [delivery_date_sent] => 2014-06-25 23:15:00
            [due] => 0.0000
            [line_items] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 1
                            [invoice_id] => 1
                            [service_id] => 1
                            [description] => Bronze Standard - domain.com
                            [qty] => 1.0000
                            [amount] => 10.0000
                            [subtotal] => 10.00000000
                            [taxes] => Array
                                (
                                )
 
                            [taxes_applied] => Array
                                (
                                )
 
                            [tax_subtotal] => 0
                            [tax_total] => 0
                            [total] => 10
                            [total_w_tax] => 10
                        )
                )
 
            [delivery] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 1
                            [invoice_id] => 1
                            [method] => email
                            [date_sent] => 
                        )
                )
 
            [meta] => Array
                (
                )
 
            [tax_subtotal] => 0
            [tax_total] => 0
            [taxes] => Array
                (
                )
        )
    [1] => stdClass Object
        (
            [id] => 2
            [id_format] => {num}
            [id_value] => 2
            [client_id] => 1
            [date_billed] => 2014-06-26 00:00:00
            [date_due] => 2014-07-01 00:00:00
            [date_closed] => 
            [date_autodebit] => 2014-06-29 00:00:00
            [status] => active
            [subtotal] => 20.0000
            [total] => 20.0000
            [paid] => 20.0000
            [previous_due] => 0.0000
            [currency] => USD
            [note_public] => 
            [note_private] => 
            [id_code] => 1001
            [delivery_date_sent] => 2014-06-26 23:15:00
            [due] => 0.0000
            [line_items] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 1
                            [invoice_id] => 2
                            [service_id] => 1
                            [description] => Gold Standard - domain2.com
                            [qty] => 1.0000
                            [amount] => 20.0000
                            [subtotal] => 20.00000000
                            [taxes] => Array
                                (
                                )
 
                            [taxes_applied] => Array
                                (
                                )
 
                            [tax_subtotal] => 0
                            [tax_total] => 0
                            [total] => 20
                            [total_w_tax] => 20
                        )
                )
 
            [delivery] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 2
                            [invoice_id] => 2
                            [method] => email
                            [date_sent] => 
                        )
                )
 
            [meta] => Array
                (
                )
 
            [tax_subtotal] => 0
            [tax_total] => 0
            [taxes] => Array
                (
                )
        )
)
  • No labels