Invoice PDF

Estimated reading: 5 minutes 5 views

Overview

Wattyo offers the possibility to generate a PDF version of the invoice in order to send it to the customer or store it to any other purpose.

The PDF Generation leverages Wattyo Document Composer which is a powerful tool that allows you to design Document Templates and generate the PDFs from Salesforce or External data.

Invoice Templates

The Invoice Template is the design of the PDF that will be generated. The Invoice Template is designed in the Document Composer Designer and it can be customized to fit your needs.

Wattyo comes with different Invoice Templates that you can use as a starting point to create your own. Additionally in the Document Composer documentation you can find more information about how to design the templates and the different components that you can use.

Summarising, the templates are designed with the Template Designer which is a Drag & Drop tool, or directly in the HTML Editor.

You can have different Invoice template as may be required by your business. For instance you may have different templates for different customers, different products or different countries.

PDF Generation

Wattyo offers two different architectures to generate the PDFs. Depending on your requirements you can choose one or the other.

Standalone PDF Generation

In this architecture the PDF Generation is done by the Salesforce Platform. This is the simplest way to generate the PDFs and it’s the default one. Due to Salesforce Platform limits it presents some limitations regarding the use of some HTML / CSS elements and the performance may be not suitable for large scale PDF generation.

External PDF Generation

In this architecture the PDF Generation is done by an external service that runs outside Salesforce. This service is called by Salesforce to generate the PDFs and it can be hosted by Wattyo or directly on the customer infrastructure. This architecture is more flexible and powerful and it allows you to generate the PDFs with more complex designs and to generate the PDFs in a more performant way.

Provinding Data to the document

The PDF Generation process requires to pass the data to the Document Composer in order to generate the PDF with the different dynamic information you want to include (i.e, the Customer name).

Wattyo offers two different ways to pass the data to the Document Composer:

  • Automatic: which will automalically retrieve the data based on the placeholders that you have defined in the template.
  • Apex Based: which will require you to write an Apex Class that will retrieve the data and pass it to the Document Composer.

Automatic Data Retrieval

The automatic data retrieval is the most simple way to pass the data to the Document Composer. You only need to define the placeholders in the template and the Document Composer will automatically retrieve the data from the Invoice record and pass it to the template.

In this mode you can retrieve any data from the Invoice record or from the related records. For instance you can retrieve the Customer Name, the Invoice Number, the Invoice Date, the Invoice Lines, etc.

However if you need to parse the data in a specific way or you need to retrieve data from other objects, although possible, maybe it’s not the recommended mode.

Apex Based Data Retrieval

The Apex Based Data Retrieval is the most flexible way to pass the data to the Document Composer. In this mode you need to write an Apex Class that will retrieve the data and pass it to the Document Composer.

This mode is recommended when you need to retrieve data from different objects, when you need to parse the data in a specific way or when you need to retrieve data that is not directly related to the Invoice record.

Although in this case you need to develop an Apex Class, once developed, the template designing is much more simple and you can design the templates without worrying about the data retrieval.

Keep in mind that this method is the preferred way for Batch PDF Generation as it allows you to retrieve the data in a more performant way and for more complex templates.

Additional Features

Charts

The Document Composer allows you to include Charts in the PDFs. The Charts are a powerful way to include dynamic information in the PDFs. You can include different types of charts like Pie Charts, Bar Charts, Line Charts, etc to show for instance the Consumption or Invoice history of the Service Point.

QR Codes

The Document Composer allows you to include QR Codes in the PDFs. The QR Codes are a powerful way to include dynamic information in the PDFs. You can include a Payment QR Code in order to automatically allow the customer to pay the invoice or you can include a QR Code with a link to the customer portal.

Watermarks

The Document Composer allows you to include Watermarks in the PDFs. The Watermarks are a powerful way to include additional information in the PDFs. You can include a “Draft” watermark in the PDFs that are not yet approved or a “Paid” watermark in the PDFs that have been paid.

Digital Signature

It’s a common legal requirement to digitally sign the Invoice pdfs. The Document Composer allows you to include a Digital Signature in the PDFs in different ways and cover all the current legal requirements related to the invoice.

Generating the PDF

The PDF Generation can be done in two different moments:

  • On Demand: You can generate the PDF from the Invoice record page clicking on the Generate PDF button.
  • Billing Batch: If is set so, the Billing Batch will automatically generate the PDF for the invoices that have been generated.

Leave a Comment

       
Euphoria, forever till the end of times

Euphoria

Share this Doc

Invoice PDF

Or copy link

CONTENTS