action.skip

Distributing Invoices

Finalized invoices, that is, those that are Open and due for payment, are supposed to be distributed to the recipients.

Note

As of JustOn 2.49, Salesforce Files is the default location for storing produced files. For accessing and using file-related JustOn features, make sure that the Salesforce features Content Deliveries and Salesforce CRM Content are enabled.

Emailing Invoice PDF Documents

By default, JustOn supports the distribution of the generated invoice PDF documents via email. For information about what is contained in the email, like subject, text body, etc., see Email Contents.

For an invoice to be considered in the email distribution, the checkbox Email Invoice must be selected.

For an invoice email to be sent automatically on finalization, you must add and select the checkbox AutoSend (see Enabling Automatic Email Dispatch on Finalization)

To help tracking the invoice distribution, JustOn creates a history task for sent invoice emails. The task is assigned to the contact set in Email Contact on the invoice. The generated task records are displayed in the Activities list on the related invoice. For details, see Controlling Email Tracking Options.

There are various options for emailing the PDF documents:

  • sending all or selected invoices from the Invoices list in the invoice run view or the Invoices tab, or
  • sending an invoice individually from its detail view.

Info

Unless triggered manually, the emails are not sent immediately. Instead, JustOn queues the emails and sends them at 03:00 every day by default.

Email statuses

email
Sending emails from JustOn

JustOn stores the email distribution status in the field Email Status on the invoice or statement. There are the following statuses:

Email Status Description
Unsent The default status: the email has not been sent yet.
Queued The email is put in the queue for being sent by the corresponding job.
Is set either after a user has clicked Send.
Sent The email has been successfully sent by the email job.
Error The email has not been sent because of an error. The error message is written to the field Email Error.
The email job tries to resend the invoice email on its next run.
Email attachments

During the generic invoice run, JustOn can link documents that are associated to (parent or child) source records with the resulting invoice record. If the file type is not excluded (using the field Email File Types on the template, see Modifying Invoice Email), the linked documents are then attached to the invoice upon distribution (emailing, etc.) and sent to the corresponding recipient.

To allow a fine-grained control over which (of possibly multiple) documents are linked with the invoice, the setting is made using a checkbox on document basis. If required by your business case, make sure that the intended documents are selected accordingly.

For details, see Propagating Associated Documents.

When selecting attachments, be aware of the email size limit imposed by Salesforce. If set up accordingly, the maximum size of one email is 25 MB, which includes the body, headers and attachments (see General email limits in the Salesforce Help). That is, an email with a 25 MB attachment will exceed this limit and would, consequently, not be processed.

Sending Multiple Invoice PDF Documents

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Send button.

  2. On the Invoices tab, select the checkboxes next to the invoices you want to send, or leave all checkboxes unmarked to include all listed invoices.

  3. Click to open the action menu, then select Send.
  4. Optionally, specify the additional distribution options.

    • BCC me: If selected, sends a blind carbon copy to the current user.
    • Send the emails immediately: If selected, sends out the emails immediately.

      If left unselected, JustOn queues the emails and sends them using a scheduled job (at 03:00 every day by default).

  5. Click Continue to confirm and complete the operation.

    This sends the selected, or all, respectively, invoices to all accounts that have an invoice email recipient defined.

Info

In case you must resend multiple invoice emails, make sure to reset the email status to Unsent before trying to send them again.

Sending Single Invoice

  1. Navigate to the Invoices list in the invoice run view or open the Invoices tab.
  2. Click the number of the invoice you want to send.
  3. Click Send.

    For draft invoices, you are prompted the option to finalize the invoice.

  4. Click Continue.

  5. Edit the email details as necessary.

    The email is pre-populated with the configured email contact (if available) and the contents as defined in the template (see Email Contents).

  6. Click Send.

    This sends the current invoice immediately to the specified recipients.

JustOn Billing & Invoice Management can integrate with payment service providers via JustOn Cash Management. Once set up, it sets a link to the payment page to provide invoice recipients the option to directly pay their invoices. In case of installment modifications or errors, or after finalizing an invoice from its detail view, users can update the links to the payment page.

  1. Open the Invoices tab.
  2. Select the invoices for which you want to get the payment page link.
  3. Click to open the action menu, then select Get Payment Links.
  4. Click Continue to confirm and complete the operation.

    This will get or update the payment page links for the selected invoices or related installments, overwriting existing data in the fields Payment Page URL and Payment Page URL Error, regardless of whether there has already been a valid URL.

    This will not automatically update the invoice PDF files. If necessary, recreate the relevant PDF files manually.

Info

Changing the installments of a finalized invoice will delete all existing related entries and create new entries based on the new installments. As a consequence, the payment page links on the invoice and installments, which relate to the deleted entries, become invalid and will therefore be deleted. In order to set valid payment links again, users must update the links using the Get Payment Links button.

In Salesforce Lightning, you can manually create a public link to the invoice PDF on the Files tab.

  1. Open the Files tab.
  2. In the row of the invoice PDF you want to share, open the actions menu and select Public Link.

    Files that have been uploaded to cloud storage services are not longer available on the Files tab.

  3. In the Public Link Sharing dialog box, click Create Link.

    You can then copy the link and email it to any recipient using your standard email app.

Info

You can have JustOn create public file links automatically. For details, see Setting Up Public Link Generation.

Redistributing Invoice PDF Documents

Certain business use cases may require (re-)distributing existing PDF documents to a file distribution target, for example, in case the automatic distribution has failed or there is a new file distribution target to be populated. To this end, JustOn provides the custom button Distribute PDF. You can select records from list views and then use this button to distribute the corresponding PDF files to a (configurable) file distribution target.

Note

Use the redistribution function with caution. JustOn does not check the selected file distribution target for existing files, so distributing the same files to the same targets produces duplicates, which may consequently have unwanted effects.

To (re-)distribute invoice PDF documents:

Make sure that the PDF redistribution is enabled. For details, see Defining File Distribution and Enabling PDF Redistribution.

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Distribute PDF button.

  2. On the Invoices tab, select the checkboxes next to the invoices you want to redistribute to a file distribution target, or leave all checkboxes unmarked to include all listed invoices.

  3. Click to open the action menu, then select Distribute PDF.
  4. Select the file distribution target.
  5. Optionally, select the option to consider draft folders and draft documents only.
  6. Click Continue.

    This starts a job that regenerates the corresponding PDF files and stores them in the selected location.

Downloading Invoice PDF Documents

Certain business use cases may require you to download invoice PDF files. To this end, JustOn allows you to select records from list views and download the PDF documents of the corresponding invoices (without any associated documents, though) to a ZIP file.

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Download ZIP button.

  2. On the Invoices tab, select the checkboxes next to the invoices you want to download, or leave all checkboxes unmarked to include all listed invoices.

  3. Click to open the action menu, then select Download ZIP.
  4. Optionally, select a specific file name pattern.

    The corresponding picklist shows the item Automatic Filename as well as the file name patterns as defined in PDF Name settings.

  5. Click Start.

    This starts a job that collects and, if necessary, regenerates the corresponding PDF files and writes them to a ZIP file.

    Be aware that the download considers the actual invoice PDF documents only. Any associated documents from invoice source records will not be included.

    Depending on the number of involved records, the job may freeze without indicating an error. In this case, cancel the current execution (leaving the page or closing the browser tab) and repeat the operation with a smaller number of records to process.

  6. When the process has completed, click Download ZIP.

    This opens the dialog for saving the ZIP file to your computer.

Sending E-Invoices With Peppol

To support public e-invoicing, JustOn Billing & Invoice Management can prepare electronic invoices and credits in the XRechnung format (UBL syntax).

You can send XRechnung files to the Peppol Network, from where the e-invoices will be distributed to their recipients.

Make sure that the both the e-invoice creation and the Peppol integration are properly set up and the action Send E-Invoice is available. For details, see Enabling E-Invoice Creation.

To send an XRechnung via Peppol:

  1. Open the invoice that you want to distribute via Peppol.

    Make sure the invoice meets the required conditions.

  2. Click to open the action menu, then select Send E-Invoice.

  3. Optionally, click Create to create the XRechnung XML file.

    If there is no XRechnung XML file yet (E-Invoice Status is Not created), JustOn Billing & Invoice Management prompts you to create it. Doing so creates the XRechnung XML file, validates it, and attaches it to the current invoice record.

  4. If necessary, modify the recipient address and scheme.

  5. Click Send to confirm and complete the operation.

    This transfers the e-invoice to the Peppol Network for distribtion.

    Clicking Finish closes the screen flow.

Creating E-Invoices

To support public e-invoicing, JustOn Billing & Invoice Management can prepare electronic invoices and credits in the XRechnung format (UBL syntax).

You can create XRechnung files and send these documents to their recipients via an invoice submission portal or email.

Make sure that the e-invoice creation is properly set up and the action Create XRechnung is available. For details, see Enabling E-Invoice Creation.

To create an XRechnung file for an invoice:

  1. Open the invoice for which you want to create an XRechnung file.

    Make sure the invoice meets the required conditions.

  2. Click to open the action menu, then select Create XRechnung.

  3. Click Next to confirm and complete the operation.

    This creates an XRechnung XML file, validates it, and attaches it to the current invoice record.

Sending E-Invoices With Basware

As of version 2.46, JustOn can send electronic invoices to the Basware Network Services, through which they are distributed to the recipients. For information about the Basware integration and its basic concepts, see Basware Integration Concepts.

Make sure that the Basware integration is properly configured and the button Send to Basware is available. For details, see Setting Up Invoice Distribution With Basware.

Sending Multiple E-Invoices

To send e-invoices from the invoices list view:

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Send to Basware button.

  2. On the Invoices tab, select the checkboxes next to the invoices you want to send, or leave all checkboxes unmarked to include all listed invoices.

  3. Click to open the action menu, then select Send to Basware.

    This sends the electronic invoices whose Basware status is not Finished as well as their attached documents to Basware for distribution.

Sending Single E-Invoice

Info

You can send a single invoice to Basware if one of the following conditions is met:

  • The invoice has not been sent yet, that is, the Basware status is not Finished.
  • The invoice has been sent, but Basware rejected it for technical reasons. Be aware that to retrieve notifications and to allow for resubmitting failed transfers, you need to enable the notification retrieval.

To send or resend an e-invoice from a single invoice:

  1. Open the invoice you want to transfer to Basware.

    You can send invoices in the statuses Open, Paid and Settled.

  2. Click Send to Basware.

  3. Click Continue to confirm and complete the operation.

    This sends or resends the selected electronic invoice to Basware for distribution.

Info

When (re)sending an invoice to Basware, JustOn creates a new Basware Status record. For the most recent record, the checkbox Is Latest is selected. You can use this information for reporting purposes, for example.

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:

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 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:

  1. Open the relevant contact.
  2. Change to the Details tab.
  3. Double-click the field JustOn Contact Role.
  4. Select the use case Invoice Mailing Contact.
  5. 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.

  1. 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.

  2. Click Manage in the row of File Distribution.

  3. Click New.
  4. 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)
  5. 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.