Preparing Invoices for Printing and Mailing
Your business may require to print invoice PDF documents, and then send the letters by postal mail. To support this, you have JustOn set the recipient address on invoice creation and store the relevant PDF files to a dedicated file distribution target.
Preparing invoices for printing and mailing usually involves:
- Defining the contact role
Invoice Mailing Contact
to pre-populate the mailing contact and mailing address fields when executing an invoice run, - Providing for the checkbox
Print Invoice
to be settrue
- Defining a specific file distribution target for collecting the PDF files to be printed
Once set up accordingly, you can establish business processes to have the invoices printed, or integrate with a print and mail service provider.
Defining Invoice Mailing Contact
You can use contact roles to pre-populate contact and address fields when executing an invoice run. JustOn Billing & Invoice Management supports contact roles as defined using the custom picklist field JustOn Contact Role
on the Contact object or on the Account Contact Relationship object.
Defining contact roles requires the field JustOn Contact Role
to be available on the page layout of the Contact object. For details, see Enabling Contact Roles for Invoice Distribution.
To define the contact role Invoice Mailing Contact
for a contact:
- Open the relevant contact.
- Change to the Details tab.
- Click
next to the field
JustOn Contact Role
. - Select the use case
Invoice Mailing Contact
. -
Click Save.
Make sure to not assign two or more contacts with the same role to an account. If this is the case, JustOn randomly picks one of them, which may produce unwanted results.
Selecting Invoices for Printing
The Invoice object provides the checkbox Print Invoice
. You can use it as a selection criterion for retrieving the invoice records whose PDF files are to be printed.
Depending on your source data or business processes, the way to select the Print Invoice
checkbox may vary. You can, for example, use the ON field mechanism, Salesforce flows or other automation tools to have it set automatically on invoice generation if certain conditions apply. Alternatively, you can establish business processes to have users select this checkbox on the relevant records manually.
Creating Print File Distribution Setting
To hold the invoice PDF files to be printed, JustOn needs a dedicated file distribution target. This can be a cloud storage location or a library/folder in Salesforce Files.
As an administrator:
-
Click to enter Setup, then open Custom Settings.
In Salesforce Lightning, navigate to Custom Code > Custom Settings.
In Salesforce Classic, navigate to Develop > Custom Settings.
-
Click Manage in the row of File Distribution.
- Click New.
-
Specify the details as necessary.
Field Possible Values Description Name string A unique name for the custom setting record.
For cloud storage services (Amazon S3 or Google Drive), specifies the name of the target folder.Active true
Specifies whether to use this distribution target or not. Only active distribution targets are considered. Backend Folder
GoogleDrive
AmazonS3
Specifies the distribution target. Folder
enables the library/folder-based backend.Path string For the Folder
backend, specifies the complete path (library/folder location) as set up in Salesforce Files.PDF Name string Specifies the naming pattern and file ending used for the file name of the PDF document to be generated. Can include placeholders, for example, [AccountName]_Invoice_[InvoiceNo].pdf
.Select Condition PrintInvoice__c = TRUE
Specifies the condition to restrict the selection of invoices that are copied to this folder (a condition expression as used in an SOQL WHERE clause).
For details, see SOQL WHERE clause in the Salesforce Help.Use Case InvoicePDF
Specifies the intended use case for the distribution target, InvoicePDF
(or empty) for storing PDF files (invoices, account statements, dunning reminders) -
Click Save.
This will store the invoice PDF files to be printed in the specified location. Subsequently, your (custom) print and mail solution can fetch these documents and process them accordingly.