Skip to content

Invoices

Invoice Management

Invoices are the statements that document your payment requests against your customers.

According to the business needs, invoices have different statuses.

  • Draft: New invoices have the status Draft. You can check draft invoices for correctness and edit them as necessary.
  • Open: If you approve of a draft invoice, you Finalize it. This sets the status to Open, making the invoice effective, that is, due for payment (and unalterable).
  • Paid: With incoming payments that make up for the due amounts, open invoices become Paid.
  • Closed: Deposit invoices or pro forma invoices must be closed before creating the final invoices.

invoice_lifecycle
Usual lifecycle of an invoice in JustOn

Depending on the semantics, there are various types of invoices. They are usually set by JustOn, but users can select a type when manually creating an invoice.

Invoice Type Description
Installment Used for invoices with installments
Deposit Used for deposit invoices
Proforma Used for pro forma invoices
Final Used for final invoices with previous deposit/pro forma invoices
Final with Installment Used for final invoices with previous deposit/pro forma invoices, combined with installments
How to offset open invoices?

In double-entry bookkeeping, open invoices represent bookings for which the corresponding offsetting booking is still missing. Since these bookings affect your cash position, you want them offset (or "cleared").

In JustOn, you can offset open invoices via different operations, depending on the the business use case and the prerequisites.

  • Registering a payment: JustOn can track collections made via bank statement imports, banking transaction retrieval from finleap connect or a payment provider integration. These operations create Payment balances on the invoices and set them Paid. When preparing the bookkeeping data, JustOn generates the corresponding offsetting bookings that clear the open invoice bookings.

    For other ways to set invoices Paid, see How do invoices become Paid?.

  • Correcting an invoice: Issuing a credit or canceling an invoice creates a credit with the reversed amount of the original invoice. This way, your reduce or completely void the original claim to your customer. When preparing the bookkeeping data, JustOn generates the according "opposite" booking, offsetting the invoice with the credit.

    For details about correcting invoices, see How to correct an invoice?.

  • Writing off an invoice: If outstanding payments (which may have already been devalued using individual value adjustments) become uncollectible, you write off the corresponding amount. Doing so creates a balance of the type Write off, which is immediately assigned to the current invoice. When preparing the bookkeeping data, JustOn generates the according "opposite" booking, offsetting the open invoice with the write-off balance.

    For details about write-offs, see Write-Off.

How do invoices become Paid?

Basically, there are four ways for JustOn to cover open invoice amounts and to set invoices Paid:

  • Registering a payment entry and assigning it to the invoice: This creates a Payment balance on the invoice, which counts against the open amount as recorded in the Invoice balance.
  • Settling the invoice against a credit: This creates a Clearing balance on the invoice, which, again, counts against the open amount.
  • Finalizing an invoice with the payment method Cash: This creates a balance of the type Cash on the invoice, which offsets the open amount.
  • Writing off an invoice: This creates a balance of the type Write off, which is assigned to the invoice, and sets the invoice status to Paid and the invoice balance to 0.

In addition, you can create and assign balances like Refund or Prepayment, which also reduce an open invoice amount.

If the sum of all balances for the invoice is 0, the invoice is considered Paid.

Manually Creating Invoices
Editing Invoices

Finalization

New invoices have the status Draft. You can check draft invoices for correctness and edit them as necessary. If you approve of a draft invoice, you Finalize it. This process

  • sets the status to Open, making the invoice effective, that is, due for payment (and unalterable),
  • sets a unique final invoice number based on the configured invoice counter (see Counters and Number Ranges), and
  • creates PDF documents.

    Find the produced files on Salesforce's Files tab in the group Owned by me, if not configured otherwise (see File Distribution).

Info

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 the Salesforce features Content Deliveries and Salesforce CRM Content are enabled.

You can finalize

  • a single invoice individually from its detail view,
  • selected invoices from the invoice list view (on the Invoices tab or the invoice run detail view), or
  • all listed draft invoices at once.

In order to apply the correct tax, make sure that the invoice line items have set a correct service period or, as a fallback, the invoice has set a correct date.

Note

Once an invoice is finalized, you can no longer change it.

The steps that JustOn executes on invoice finalization differ depending on whether you start the finalization batch chain from the invoice list view or an individual finalization from an invoice detail view. Note, besides, that Salesforce allocates more computing resources to batch processes.

Involved Steps Finalization Batch Chain From List View Single Finalization From Detail View
Retrieve external taxes
Build transaction tables (for missing records)
Settle invoices
Assign balances
Finalize invoices
Finalize external taxes
Create installments
Create PDFs
Create transaction CSVs
Payment collection
Is executed if there are payment instruments available for the corresponding account, which requires a payment provider integration via the Self-Service Portal.

Info

You can set up JustOn to finalize draft invoices automatically during an invoice run when certain conditions become true.

Finalizing Invoices
Enabling Automatic Finalization on Invoice Run
Setting Up Finalization or Cancellation Using Processes

Service Period

JustOn automatically determines the service period of an invoice based on various conditions:

Generally, the earliest service period start date of all included invoice line items defines the service period start of the invoice. Consequently, the latest service period end date of all included invoice line items defines the service period end of the invoice.

Invoice Service Period Condition
Start The earliest (minimum) service period start date of all invoice line items.
End The latest (maximum) service period end date of all invoice line items.

The dates are recalculated when invoice line items are inserted, updated or deleted. Empty date fields on line items are ignored.

If set, the subscription end date forces the service period end of the invoice.

With respect to invoice line items, the billing type of the item usually determines how the service period is calculated.

Item Billing Type Service Period Start/Service Period End
One-Time The start date/end date of the corresponding item, or, if not available, the start date/end date of the invoice run period
Recurring The start date/end date of the invoice run.
Recurring with Billing Factor Start date: Next Service Period Start
End date: Next Service Period Start + Billing Period - 1 day
Transactional Start date: earliest (minimum) service period start date of the transactions
End date: latest (maximum) service period end date of the transactions

For recurring items, the start date and end date set as the invoice run period usually represent their service period. If, however, JustOn determines a billing factor (as given by a billing period and a billing unit), the service period start of the invoice line item is set using the subscription item's Next Service Period Start field. The service period end is then calculated as follows: Next Service Period Start + Billing Period - 1 day.

If Next Service Period Start is not set, JustOn uses the invoice run start date instead.

Other settings that force an item's service period end include:

  • the subscription item's activation end date, and
  • the end date of the last price tier defined for the subscription item.

Using the custom placeholders ServicePeriodStart and ServicePeriodEnd, you can display the items' service period in the invoice PDF. For details, see Adjusting Invoice Line Item Table.

Payment Due Date

Usually, JustOn determines the Payment Due Date of an invoice adding the value of Payment Due (in days) to the set Invoice Date. That is,

Payment Due Date = Invoice Date + Payment Due

The invoice date is set on invoice finalization. For draft invoices, that is, those that are not yet finalized, JustOn displays a preliminary due date based on the current date (Today + Payment Due).

The payment due – the number of days to be added – is taken from the field Default Payment Due on the account (which takes precedence) or on the template. If you have not set a default payment due on the account or the template, JustOn defaults to 0.

Once the invoice is finalized, you can no longer modify the payment due date. You can, however, postpone the payment due date for open and draft invoices. Doing so suspends applicable payment collections and dunning procedures for the specified time.

Info

The service period of an invoice does not affect the payment due date.

Gross Invoicing

Depending on your business or legal requirements, the nature of your products, etc., you must create net invoices, gross invoices or both of them. This behavior is controlled using the checkbox Gross Invoice.

If the checkbox is selected (the value set true), the unit prices of the invoice line items are considered gross prices. That is, JustOn deducts any applicable taxes from the unit prices.

  • Up to JustOn 2.49, the checkbox is to be set on the invoice. That is, you decide whether to generate a net or gross invoice on the invoice level for all included invoice line items.
  • As of JustOn 2.50, you can set the checkbox Gross Line Item individually on each invoice line item. This allows to specify whether to generate net invoices, gross invoices or mixed net/gross invoices.

Info

Use the ON field mechanism, Salesforce processes or other automation tools to have this checkbox set automatically when generating invoices and invoice line items.

Invoice Rounding

Some countries, like Switzerland or Sweden, have removed low-denomination coins from circulation. In these countries, payable amounts are rounded to the nearest multiple of the minimum currency unit available – either for cash transactions only, or for both cash and electronic transfers.

If your business requires invoice rounding, you can define rounding rules for a currency using the custom setting Currency Mapping.

Each record can hold the following information:

Field Data Type Description
Name Text (3) Specifies the ISO currency code.
Currency Sign Text (5) Specifies the currency symbol.
Activate Rounding Checkbox Controls whether the grand total of invoices in this currency is to be rounded.
Rounding Method Text (128) The method used for rounding the grand total of invoices. Available values include NONE, FLOOR, CEILING, DOWN, UP, HALF_DOWN, HALF_UP, HALF_DOWN_ZERO, HALF_UP_ZERO, HALF_EVEN.
The default rounding method is NONE.
For details, see, for example, RoundingMode.
Rounding Precision Number (13,5) Controls the precision for the rounding difference.
0.05 rounds to 5 cents, 1.00 rounds to whole euros.
Example configuration for Swiss currency rounding

In Switzerland, invoice amounts are rounded to 0,05 francs according to the following common rounding rules:

1,0001,024 1,00
1,0251,074 1,05
1,0751,099 1,10

That is, to support the invoice rounding for Switzerland, you need the following currency mapping setting:

Field Value Description
Name CHF The ISO currency code for Swiss francs.
Currency Sign SFr. The currency symbol for Swiss francs.
Active Rounding Activates the invoice rounding.
Rounding Method HALF_UP Rounds towards the nearest neighbor according to the defined precision, unless both neighbors are equidistant, in which case rounds up.
Rounding Precision 0.05 Rounds to 5 rappen.

When applying invoice rounding, JustOn automatically creates a special invoice line item of the type Rounding Difference. This line item contains the value needed to round the grand total according to the rules defined in the currency mapping. On the invoice PDF, the rounding difference is printed between the tax rates and the grand total.

Info

Depending on your locale or your business, you may need to modify the display name for the rounding difference. To do so, edit the custom label Rounding Difference.

Enabling Invoice Rounding

Value Aggregation

To support reporting purposes, for example, you can set up Juston to aggregate invoice and invoice line item fields on related object records. Generally, there are two ways to do so:

Value Aggregation Using Prefixed Fields

JustOn allows for aggregating the values of specific invoice line item fields on subscriptions or items.

To this end, you configure aggregation fields on the item or subscription, where the API name is the same as the invoice line item field, prefixed with CALC_. To aggregate, for example, the quantity of a particular line item, you map the field Quantity__c (the API name) of the invoice line item to the field CALC_Quantity__c (again, the API name) of the item.

The aggregation is executed during the finalization of the invoice.

Rules and limitations
  • You can only aggregate number fields (currency, number, percent and formula fields).
  • Decimal places of aggregation fields must be equal to the source fields to avoid rounding issues.
  • Empty fields result in CALC_ fields with a zero (0) value.
  • Canceled invoices and cancellation invoices are ignored by the calculation.
  • Partial credits are included in the calculation, so check beforehand how it will affect the calculated quantities, that is, when refunding only a currency amount.
  • The limit of aggregation fields per subscription or item is 100.
  • The limit of invoices per subscription or item is 50.000.
Examples
Subscription Field (API Name) Description
CALC_PosTotalNet__c Calculates the sum of the PosTotalNet__c field of all invoice line items that belong to the same subscription whose invoice status is either Open, Paid or Settled.
Item Field (API Name) Description
CALC_Quantity__c Calculates the sum of the Quantity__c field for all invoice line items of this item.
CALC_PosTotalNet__c Calculates the sum of the PosTotalNet__c field of all invoice line items that belong to the same item whose invoice status is either Open, Paid or Settled.

Value Aggregation Using Prefixed Fields

Process-Based Value Aggregation

Your business may require to show certain information of related invoices on an account or the source object based on which invoices are generated, like opportunities or contracts. To this end, you can set up a process that calculates an aggregation on invoices and writes the result to fields on a source object.

Think of the following example: You (repeatedly) generate invoices based on opportunities, that is, you produce multiple invoices from one opportunity. Now you want to show the number of generated invoices and the sum of the invoice totals on the corresponding opportunity record.

value_aggr_process
Aggregating invoice values on a related parent record

If configured accordingly, the process counts the produced invoices as well as sums up the grand total of all produced invoices, and then writes the result to the corresponding fields of the opportunity.

Info

The implemented aggregation uses SOQL aggregate queries internally where the result is grouped by the field that points to the parent.

Rules and limitations
  • The process ignores draft invoices.
  • Aggregating blank fields may produce a blank result.
  • The limit of records per parent is 50.000.

Process-Based Value Aggregation

Invoice Distribution

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

To help tracking the invoice distribution, JustOn creates a history task for sent invoice emails. 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

Be aware that by default, the emails are not sent immediately. Instead, JustOn queues the emails and sends them at 03:00 every day by default.

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

Email Status Description
Unsent The default status: the invoice has not been sent yet.
Queued The invoice email is put in the queue for being sent by the corresponding job. Is set after the 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.

Emailing Invoice PDF Documents

JustOn can generate public links to the produced PDF files. This allows you to share the documents with any users, including outside your organization, without password protection or any other restrictions.

Note

For generating public links, the Salesforce features Content Deliveries and Public Links must be enabled. For details, see Set Up Content Deliveries in the Salesforce Help.

You can create public links

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.

Redistributing Invoice PDF Documents
File Distribution
Configuring Upload to Cloud Storage Services

Downloading Invoice PDF Documents

Certain business use cases may require you to download invoice PDF documents. To this end, JustOn allows you to select records from list views and download the corresponding PDF files to a ZIP file.

Downloading Invoice PDF Documents

Sending E-Invoices

JustOn can send electronic invoices to the Basware Network Services, through which they are distributed to the recipients.

JustOn sends the electronic invoice data as well as according file attachments, like the invoice PDF, to Basware. Based on the transferred data, Basware generates legally valid electronic invoices and distributes them to the recipients.

Info

Prior to using Basware, your organization must become part of the Basware Network, which is subject to a (chargeable) contract.

The following concepts are important for understanding the Basware integration:

  • The recipient endpoint is the recipient's electronic delivery address (see Recipient endpoints in the Basware API Reference).
  • The Basware status is a "helper" object in JustOn used to track the data transfer status, which is linked to the invoice.

This is how the data transfer from JustOn to Basware takes place:

  • When a user finalizes an invoice that has a recipient endpoint set, JustOn creates a Basware status record. Only invoices that have a Basware status record are considered for distribution.
  • If configured accordingly, the user can review the data to be sent to Basware.
  • The user clicks Send E-Invoice on a single invoice or the invoice list view (see Sending E-Invoices).
  • JustOn transfers the invoice attachments (all attached files except for HTML files) using the batch process BatchBaswareFileUpload.
  • JustOn transfers the invoice data (invoice line items, invoice amount, etc.) using the batch process BatchBaswareInvoiceUpload.
  • JustOn updates the Basware status of the invoice.

The following Basware statuses are available:

Status Description
Unsent The initial status upon creation.
File Error States that some attachment uploads have failed.
Files Sent States that the batch process BatchBaswareFileUpload has completed successfully and the attachments are uploaded to Basware.
Invoice Error States that the batch process BatchBaswareInvoiceUpload has completed with errors and that the invoice data upload has failed.
Finished States that the invoice transfer (both the file and data upload) to Basware has completed successfully. Invoices with the Basware status Finished are not considered for further transfer processes.

Sending E-Invoices
Setting Up Invoice Distribution With Basware

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