action.skip

Invoices

← Invoice Management

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

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

    An invoice is becomes Paid, if the sum of all balances assigned to it (as kept in the Invoice field Balance) is 0. If the sum is not zero, the invoice is Open.

  • Closed: Deposit invoices or pro forma invoices must be closed before creating the final invoices.

invoice_lifecycle
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 the integration with JustOn Cash Management or bank statement imports. 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.

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
empty Used for "usual" invoices.
Deposit Used for deposit invoices
Proforma Used for pro forma invoices
Final Used for final invoices with previous deposit/pro forma 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 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).

    For accessing and using file-related JustOn features, make sure that the Salesforce features Content Deliveries and Salesforce CRM Content are enabled.

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

Integrating JustOn Billing & Invoice Management with JustOn Cash Management requires users who finalize invoices are assigned the permission set JustOn Payments Read/Write.

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.

By default, the invoice finalization involves the following steps (see FinalizeInvoiceChain):

  • Retrieve external taxes
  • Build transaction tables (for missing records)
  • Settle (non-related) invoices and credits
  • Finalize invoices
  • Finalize external taxes
  • Create installments
  • Create entries

    Is executed after integrating with JustOn Cash Management.

  • Assign (free) payment balances

  • Settle entries

    Is executed after integrating with JustOn Cash Management.

  • Get payment links

    Is executed after integrating with JustOn Cash Management and a payment service provider for invoices with the payment method Online Payment.

  • Create PDFs

  • Cancel related entries

    Is executed after integrating with JustOn Cash Management to cancel entries that originate from invoices being canceled.

  • Create transaction CSVs

  • Send email

    Is executed if the email auto send option is enabled.

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

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

Emailing Invoice PDF Documents

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.

Getting Payment Page 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

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

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

In particular, public institutions in the EU are required to accept and process electronic invoices. A set of common specifications and standards (Peppol) provides for interoperability between issuers and recipients across Europe.

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

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

E-Invoice: Concepts
Creating E-Invoices

Sending E-Invoices With Peppol

JustOn Billing & Invoice Management allows distributing electronic invoices via the Peppol Network. This is an infrastructure for exchanging electronic documents, where a set of common specifications and standards provides for interoperability between issuers and recipients across Europe.

Info

Prior to distributing e-invoices via Peppol, your organization must

  • Contract with JustOn for the Peppol service,
  • Request the technical activation via JustOn Support.

Once set up, JustOn Billing & Invoice Management creates legally valid XRechnung files and sends them to the Peppol Network. Peppol will transfer the e-invoices to the recipients and send notifications about the distribution status.

peppol
Distributing invoices through Peppol

E-Invoice: Concepts
Sending E-Invoices With Peppol

Sending E-Invoices With Basware

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 (see Creating E-Invoices). To help getting a wider 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.

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

Preparing Invoices for Printing and Mailing

Invoice Payment Methods

Setting a payment method on the invoice, you can control downstream collection-relevant processes. You do not just request how your customers are supposed to pay, but rather determine how JustOn Billing & Invoice Management handles the created invoices.

There are three relevant payment methods:

inv_paym_methods

SEPA

Use the payment method SEPA to support SEPA Direct Debit and SEPA Credit transfers.

For invoices with the payment method SEPA, you can produce the relevant SEPA XML files to be transferred to and processed by your bank. You can do so either exporting SEPA XML files in JustOn Billing & Invoice Management or directly transferring SEPA orders to your bank via JustOn Cash Management. Using this payment method will apply the payment information Payment Info Direct Debit or Payment Info Credit Transfer, depending on whether producing a direct debit order or a credit order.

To enable the payment method SEPA, you add the picklist value SEPA to the Invoice field Payment Method (see Modifying Picklist Values).

Online Payment

Use the payment method Online Payment to cover all payment methods that are made available through PSP integrations via JustOn Cash Management.

After integrating with JustOn Cash Management, JustOn Billing & Invoice Management retrieves links to the payment page for invoices with the payment method Online Payment. You can then add this link directly to the invoice email or PDF, or have JustOn Billing & Invoice Management create a payment page QR code. Using the payment method Online Payment will apply the payment information Payment Info Online Payment.

To make use of the payment method Online Payment, you must make sure that the picklist value Online Payment is available the Invoice field Payment Method (see Modifying Picklist Values).

Bank Transfer

Use the payment method Bank Transfer to prompt your customers to execute a credit transfer.

For invoices with the payment method Bank Transfer, you can have JustOn Billing & Invoice Management produce QR codes to initialize a SEPA credit transfer using an appropriate online banking application. Using the payment method Bank Transfer will apply the payment information Payment Info Bank Transfer.

Be aware that as opposed to SEPA or Online Payment, the payment method Bank Transfer puts your customers in charge of the payment execution.

Info

You can use the ON field mechanism, Salesforce flows or other automation tools to have the payment method set automatically, based on your conditions, when generating invoices.

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 or ON_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 yth 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 yth day of the next month. 2018-02-12 eom 10 26 (2018-03-10)
y Starting from the invoice date, goes to next yth 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 yth day of the next month. 2018-05-20 14d eom 20 61 (2018-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 built-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 specific checkbox field GrossInvoice__c on the invoice line item.

You can set the checkbox individually on each invoice line item. This allows to specify whether to generate net invoices, gross invoices or mixed net/gross invoices.

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

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. When doing so, make sure to use the correct API name GrossInvoice__c.

Some jurisdictions, like France, or use cases, like e-invoices, require buyer-specific, purchase-related information on the invoice. To this end, JustOn Billing & Invoice Management provides the following fields on the Invoice object:

Field Description
Purchase Order No. Represents the reference to the purchase order on which the invoice is based.
Seller ID Specifies a buyer-specific identifier of the vendor.

This information is usually given by buyers. They use it to track the progress of an order or purchase in their system, and to facilitate the communication with the seller in case of need.

JustOn Billing & Invoice Management can acquire the purchase order number and the seller ID from the source data based on which invoices are built. Assume the following scenario:

(1) You use contracts to track your purchases. Using the generic invoice run, you create invoices from the contracts.

(2) You keep the purchase order number and the seller ID in the custom Contract fields ON_PurchaseOrderNo__c and ON_SellerId__c. JustOn Billing & Invoice Management copies the given information to the relevant target fields on the invoice during the invoice run – applying the ON field mechanism.

(3) Once available on the invoice records, this information

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,0241,00
1,0251,0741,05
1,0751,0991,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

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.

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

Flow-Based Value Aggregation