Invoices
Invoices are the statements that document your payment requests against your customers. They relate to a sale transaction and indicate the products or services, quantities, and agreed prices for the products or services you have provided to a buyer.
General Invoice Concepts
Info
Usually, invoicing is subject to specific international or national rules depending on where the seller and the buyer are located.
For details, see, for example
- VAT invoicing rules for the European Union
- Invoicing and taking payment from customers in the United Kingdom
- Issuing tax invoices in Australia
- What are the requirements, criteria, or format of a commercial invoice for commercial shipments to the USA
A typical invoice contains the following information:
- a unique identification number
- the date of the invoice
- name and contact details of the seller
- tax or company registration details of seller, if relevant, like ABN for Australian businesses or VAT number for businesses in the EU
- name and contact details of the buyer
- a full description of the goods or services provided
- the date of the supply if different from the invoice date
- the unit prices of the goods or services provided
- applied taxes, if relevant, like GST or VAT
- the total amount charged, including, if relevant, a tax breakdown
Depending on your business requirements or any national specifics, you can provide additional information on your invoices. Common additional information may include:
- a purchase order number (or similar tracking numbers requested by the buyer to be mentioned on the invoice)
- payment terms (including payment method, payment due date, details about charges for late payment, etc.)
- in countries where wire transfer is the preferred method of settling debts: the bank account number of the seller and, usually, a reference code to identify the payer, like the KID for Norway or the Finnish Reference Number
Invoices in JustOn
Invoices are the statements that document your payment requests against your customers, relating to a sale transaction and indicating the involved products and prices.
For every generated electronic invoice and its invoice line items, JustOn stores records in the database of the Salesforce Platform. These records are the single source of truth – they hold all legally relevant information. See the PDF files, which are produced by default, merely as readable images of this data.
Managing Invoice Runs
Scheduling Invoice Run
Manually Creating Invoices
Editing Invoices
Invoice Statuses
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.
Usual lifecycle of an invoice in JustOn
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 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 themPaid
. 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 becomePaid
?. -
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 theInvoice
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 typeCash
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 toPaid
and the invoice balance to0
.
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
.
Invoice Types
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 |
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 the invoice date (if not defined beforehand on invoice creation or using
Preferred Invoice Date
on subscriptions), - 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).
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.
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 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.
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 (FINALIZEINVOICE) from an 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 | ||
Get payment links Is executed after integrating with JustOn Cash Management and a payment service provider for invoices with the payment method Credit Card |
||
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 Flows
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 fetched – in this order – either from
- the invoice source record (
PaymentDue
on the subscription orON_PaymentDue
on another source object) - the field
Default Payment Due
on the account, or - the field
Default Payment Due
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.
Your business may, however, require a more flexible way for determining the Payment Due Date
– like, for example, you want it always to be set automatically to the last day of the next month. To this end, use the Invoice field Payment Due Condition
. It provides a way to define a custom calculation for the Payment Due Date
and for the Payment Due
value.
JustOn evaluates the Payment Due Condition
- on invoice creation,
- when setting a date on (draft) invoices,
- on invoice finalization.
Note
Each evaluation recalculates the values for Payment Due Date
and Payment Due
. Hence, do not set Payment Due
when using Payment Due Condition
.
The following table lists the calculation options for Payment Due Condition
and illustrates the behavior:
Pattern | Result | Example Invoice Date | Example Payment Due Condition | Calculated Payment Due (Date) |
---|---|---|---|---|
xd |
Adds x days to the invoice date. |
2018-01-01 | 14d |
14 (2018-01-15) |
xd eom |
Adds x days to the invoice date, then goes to the last day of the month. |
2018-05-20 | 14d eom |
41 (2018-06-30) |
eom |
Starting from the invoice date, goes to the last day of the month. | 2018-02-05 | eom |
23 (2018-02-28) |
xd y |
Adds x days to the invoice date, then goes to the next y th day of the month. |
2018-01-01 | 14d 10 |
40 (2018-02-10) |
eom y |
Goes to the last day of the month, then goes to the next y th day of the next month. |
2018-02-12 | eom 10 |
26 (2018-03-10) |
y |
Starting from the invoice date, goes to next y th day of the month. |
2018-02-12 | 16 |
4 (2018-02-16) |
xd eom y |
Adds x days to the invoice date, then goes to the last day of the month, then goes to the next y th day of the next month. |
2018-05-20 | 14d eom 20 |
61 (2017-07-20) |
The spelling of eom
in the picklist values does not matter – you can use lowercase, all caps or mixed-case spelling. JustOn converts the letters to lowercase before processing the payment due condition.
Info
Up to version 2.79, JustOn Billing & Invoice Management shipped the default custom placeholder [PaymentDueDate]
to retrieve the Payment Due Date
. Starting with version 2.79.1, JustOn Billing & Invoice Management provides the built-in placeholder [PaymentDueDate]
, which is more reliable when using a Payment Due Condition
.
Be aware that when upgrading from a version prior to 2.79.1, the existing default custom placeholder [PaymentDueDate]
is not deleted. Since custom placeholders always take precedence over built-in placeholders with the same name, you must delete the existing default custom placeholder manually if you use a Payment Due Condition
.
Note, however, that it is still possible to overwrite the build-in placeholder using a custom placeholder in order to apply some custom retrieval logic.
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 flows 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,000
– 1,024
→ 1,00
1,025
– 1,074
→ 1,05
1,075
– 1,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.
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 aggregation fields upon invoice finalization
- Value aggregation using a flow for any defined fields
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
Flow-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 flow 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.
Aggregating invoice values on a related parent record
If configured accordingly, the flow 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 flow ignores draft invoices.
- Aggregating blank fields may produce a blank result.
- The limit of records per parent is 50.000.
Invoice Distribution
Finalized invoices, that is, those that are Open
and due for payment, are supposed to be distributed to the recipients.
-
Email
By default, JustOn supports the distribution of the generated invoice PDF documents via email.
Depending on your business requirements, you may have to enable the Amazon Simple Email Service to overcome Salesforce's email limitations.
-
Payment page
If set up accordingly, users can get or update a link to the payment page.
-
Link sharing
Optionally, you can create a public link to the produced PDF file.
-
Electronic invoice
JustOn can send electronic invoices to the Basware Network Services, through which they are distributed to the recipients.
The Basware integration is available as of JustOn 2.46.
-
Cloud storage or local storage
You can (re)distribute invoice PDF documents to new file distribution target in Salesforce Files, Amazon S3 or Google Drive. In addition, you can download them to a ZIP file for local processing.
-
Print and mail
You can create a dedicated file distribution target for invoices to be printed – providing for a print and mail solution.
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.
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
Unless triggered manually, the emails are not sent immediately. Instead, JustOn queues the emails and sends them at 03:00 every day by default.
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 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
Getting Payment Page Link
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.
Creating Public File Link
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. If set up accordingly, JustOn creates the preview or download links when finalizing the invoices.
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
- manually, see Creating Public File Link
- automatically, 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.
File Distribution
Storing Files in Salesforce Libraries and Folders
Configuring Upload to Cloud Storage Services
Redistributing Invoice PDF Documents
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.
Downloading Invoice PDF Documents
Sending E-Invoices
When operating certain markets, your business may require to distribute electronic invoices – structured invoice data that is exchanged electronically between trading partners in order to automate accounts payable processing.
Be aware that there are various e-invoice formats, distribution channels, and operators. To help getting a wide reach, JustOn Billing & Invoice Management integrates with the Basware Network. This global e-invoicing network supports many protocols and document formats, and interoperates with a large number of partner networks.
Once set up,
- JustOn sends the invoice data as well as relevant file attachments, like the invoice PDF, to the Basware Network, and
- Basware generates legally valid electronic invoices and transfers them to the recipients – either directly or via partner networks.
Distributing invoices through Basware
JustOn sends the electronic invoice data as well as relevant 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).
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. -
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.