Garage

How to use custom fields in your invoices

The long awaited feature to add custom fields to your invoices and quotes has finally arrived

Invoicebus Invoice Custom Fields

You wanted this, we wanted this, so here it is. The document custom fields give you the flexibility to include additional data to the document besides the data that Invoicebus supports by default.  For example, this feature allows you adding various custom fields such as: project description, tax details, client contact details, shipping info, etc, and displaying them anywhere you need throughout the document.

Adding a custom field to your invoice is easy. All you need to do is:

  1. Define a custom field in the invoice editor
  2. Apply the custom field to the HTML invoice template

1. Defining custom fields in the invoice editor

To make it even more flexible, we separated the document data from the client data, thus when you add a client to a specific invoice, all custom fields associated with the client will be applied to the invoice as well. Now let’s see how to add your first custom field.

Adding custom fields to the documents

The document custom fields should first be added within the invoice editor (see section “Document Custom Fields”). In the left column enter the field name (this is a unique identifier which will later be used as a placeholder in yout html template), and in the right column enter the field value.

Invoice Custom Fields

You can notice the middle column with the values “Constant” or “Variable”. So what this means? If you choose “Constant”, the value of the custom field will be saved for future re-use. That way when you create a new invoice this value will be pre-populated automatically. In the image above, the tax number is considered to be permanent for all future invoices, thus it is set to “Constant”.

And if you choose “Variable”, the value won’t be saved so when you create a new invoice the value field will be left empty (you should manually populate it). In the previous example, the project name and the project description are considered to be invoice specific, thus they are set to “Variable”.

Note: Document custom fields can be applied to both – invoices and quotes.

Adding custom fields for the clients

Adding a custom fields for the client is almost identical. All you need to do is click the “Manage Client Custom Fields” link within the client section.

Invoice Add Client

A new window will pop up where you can add client custom fields:

Client Custom Fields

The values entered in the client custom fields will be always saved for future re-use, so there’s no need of specifying “Constant” or “Variable”. In the example above, you can see we’ve specified the client’s shipping address.

2. Applying custom fields to the HTML invoice template

So you’ve added your custom fields, and now you should tell Invoicebus where you would like this information to be displayed in your final document. For this, you’ll need to edit your HTML invoice template. The easiest way to do this is to:

  • download your current invoice template (within the template window click download template),
  • extract it from the archive,
  • edit the template.html file with any text editor,
  • add your custom fields to the HTML template as described below,
  • zip the modified template and re-upload it again to Invoicebus.

Adding custom fields to the HTML template

Probably you’ve noticed that the names of the custom fields are in the form {document_custom_[name]} and {client_custom_[name]}. So these are the actual placeholders you should use in your HTML template, where [name] is your custom name for the placeholder. You can find more info on how to edit or create your own invoice template here.

From our previous example, the custom fields define the following placeholders:

  • {document_custom_project_name}
  • {document_custom_project_desc}
  • {document_custom_tax_number}

And the custom client placeholder:

  • {client_custom_shipping_address}

In the final invoice, these placeholders will be replaced with actual values you enter in the invoice editor.

And don’t forget! If you need any help with the template customization you can always contact our support.

What’s on tap for our next update?

We think it would be great if you’d be able to use any invoice field (including custom ones) as a placeholder in your default email templates + your default terms & notes. Currently, the terms & notes section doesn’t support placeholders while the email/reminder/thank-you templates support only pre-defined placeholders such as {client_name}, {doc_number}, {total_price}, {paid_sum}, etc.

By giving you the flexibility to use any placeholder, you can easily create more specific terms & notes and write even more personal emails (for example, you can add a contact person and then address him by his first name only).

We haven’t officially started developing this feature as we first wanted to hear what you think about it. Feel free to leave your thoughts in the comments below. We’d love to hear from you!

Dimitar Stojanov
Dimitar is co-founder of Invoicebus, an online invoicing tool for easy invoice management. He's passionate about creating beautiful and simple web applications and occasionally writes on this blog about web design, online business, and fighting the status-quo. Follow him on Twitter and Facebook.
Dimitar Stojanov
RT @invoicebus: Get Ready for Taxes – Choose the Right Business Structure - https://t.co/7wLU9b4J7j https://t.co/Ka21bj4RTk - 23 hours ago
Dimitar Stojanov

Latest posts by Dimitar Stojanov (see all)

2 Comments

  1. john nwanja.o says:

    Dear support,
    Compliments of the seasons.
    I learnt that invoicebus members can receive bitcoin payments now,please kindly explain to me how to receive bitcoin payments in our invoicebus account.
    I shall be very glad for your mutual assistance.
    Best regards,
    john nwanja.o

Leave a Comment