Skip to content

Invoicing Support

JustOn's invoice generation is centered around the invoice run, which creates invoices or credits.

Invoice Run

The invoice run is the core concept of JustOn Billing & Invoice Management. It is the operation that creates invoices based on

  • customer and contract data as stored in the subscription,
  • product and price information stored in subscription items,
  • usage data available via transactions (see Usage Data Billing),
  • customer and product data as stored in an arbitrary object, if set up accordingly (see Billing Arbitrary Objects).

There are two ways to trigger an invoice run:

  • Manually, or
  • Using a scheduled job to have invoices created automatically on a regular basis.

In order to be considered by the invoice run, the start date of a subscription must be within the invoice run period. This also applies to the start dates of the subscription items as well as to the transaction date.

Info

If there have been deleted draft invoices from a recent invoice run, you can restore the invoices based on the corresponding subscriptions or accordingly configured objects. Be aware of the following specifics:

  • You can repeat the latest invoice run for a given data set.

    Assume, for example, you have multiple subscription filters or generic filters and execute individual invoice runs for selected filters. This means, you can always re-run the latest invoice run that has been executed for a given filter selection.

  • Re-running the invoice run applies the initial configuration (start date, end date, invoice date, filters, etc.).

  • When repeating an invoice run with subscriptions in its scope, you are prompted to individually select the subscriptions for which to restore invoices.

Managing Invoice Runs

Invoices and Credits

Invoices

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

Manually Creating Invoices
Editing Invoices

Credits

Credits, put simply, are invoices with a negative amount - statements about money you have to pay to someone else. Think of a marketplace scenario: You sell products that are delivered by a participating organization. You receive the customer's money, but you have to pay out the fulfiller. Other examples for credits include refunds or overpayments.

As invoices do, credits have different statuses according to the business requirements.

  • Draft: Like usual invoices, new credits have the status Draft.
  • Open: After finalization, a credit becomes Open and due to be settled.
  • Settled: Once the corresponding payments are refunded or you have generated a new invoice that outweighs the credit amount for the account, the credit is set Settled.

To issue a credit, you create a new invoice with a negative payment amount. There are two ways to do so:

  • Manually creating a new invoice that contains invoice line items that yield a negative invoice balance, or
  • Creating a (partial) credit for an existing invoice (in the status Open or Paid) you want to reverse - this option lets you select the corresponding items and payments to be done.

Creating Credits

Partial Credit Handling

You can issue a (partial) credit if you want to cancel one or more individual invoice line items of an invoice. This way, you reduce the original invoice amount, canceling (part of) your customer's debt.

alt text
Canceling an invoice line item, issuing a partial credit

The following examples illustrate JustOn's behavior when handling partial credits in different use cases.

Credit complete invoice amount, with no payment received

Credit the complete invoice amount of an open invoice. No payment has been made yet.

Invoice Partial Credit
Grand Total 100,00 -100,00
Balance before credit finalization 100,00 -100,00
Status before credit finalization Open Draft
Final Balance 0,00 0,00
Final Status Paid Settled
Invoice Balances Credit Balances
100,00€ (Invoice) -100,00€ (Credit)
-100,00€ (Clearing) 100,00€ (Clearing)
Exported Balance - -
Credit complete invoice amount, with a 40% partial payment received

Credit the complete invoice amount of an open invoice. A partial payment of 40,00€ has been made.

Invoice Partial Credit
Grand Total 100,00 -100,00
Balance before credit finalization 60,00 -100,00
Status before credit finalization Open Draft
Final Balance 0,00 -40,00
Final Status Paid Open
Invoice Balances Credit Balances
100,00€ (Invoice) -100,00€ (Credit)
-60,00€ (Clearing) 60,00€ (Clearing)
-40,00 (Payment)
Exported Balance - -40,00€
Credit complete invoice amount, with a complete payment received

Credit the complete invoice amount of paid invoice. A complete payment of 100,00€ has been made.

Invoice Partial Credit
Grand Total 100,00 -100,00
Balance before credit finalization 0,00 -100,00
Status before credit finalization Paid Draft
Final Balance 0,00 -100,00
Final Status Paid Open
Invoice Balances Credit Balances
100,00€ (Invoice) -100,00€ (Credit)
-100,00€ (Payment)
Exported Balance - -100,00€
Credit 40% of the invoice amount, with a 40% partial payment received

Credit 40,00€ of an open invoice (100,00€). A payment of 40,00€ has been made.

Invoice Partial Credit
Grand Total 100,00 -40,00
Balance before credit finalization 60,00 -40,00
Status before credit finalization Open Draft
Final Balance 20,00 0,00
Final Status Open Settled
Invoice Balances Credit Balances
100,00€ (Invoice) -40,00€ (Credit)
-40,00€ (Clearing) 40,00€ (Clearing)
-40,00€ (Payment)
Exported Balance 20,00€ -
Credit 60% of the invoice amount, with a 60% partial payment received

Credit 60,00€ of an open invoice (100,00€). A payment of 60,00€ has been made.

Invoice Partial Credit
Grand Total 100,00 -60,00
Balance before credit finalization 40,00 -60,00
Status before credit finalization Open Draft
Final Balance 0,00 -20,00
Final Status Paid Open
Invoice Balances Credit Balances
100,00€ (Invoice) -60,00€ (Credit)
-40,00€ (Clearing) 40,00€ (Clearing)
-60,00€ (Payment)
Exported Balance - -20,00€

Credit and Refund Workflows

The following sections illustrate likely business use cases that combine credit creation with payment refunds. The examples outline the involved steps and show their key results.

Refunding a payment without creating a credit

(1) Finalize invoice

(2) Register payment

(3) Refund payment

refund_uc1
Refunding a registered payment

For additional examples of complete or partial refunds, see Refund Handling Examples.

Refunding a payment with a credit issued before payment receipt

(1) Finalize invoice

(2) Create (partial) credit

(3) Register payment

(4) Refund payment

refund_uc1a
Refunding a registered payment for a partially cleared (reduced) invoice amount

Refunding a payment with a credit issued after payment receipt

(1) Finalize invoice

(2) Register payment

(3) Create (partial) credit

(4) Refund credited amount

(5) Finalize credit

(6) Manually settle open credit with refund balance

refund_uc2
Refunding a registered payment after creating a (partial) credit

Refunding a payment with a credit issued after refund

(1) Finalize invoice

(2) Register payment

(3) (Partially) refund payment

(4) Create (partial) credit

(5) Finalize credit

  • Individually from the detail view: Requires manual settlement with the refund balance using the function Register Payment
  • Via batch process from the list view: JustOn automatically assigns the refund balance upon finalization

refund_uc3
Refunding a registered payment before creating a (partial) credit

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 a batch finalization from the invoice list view or an individual finalization from an invoice detail view.

Involved Steps Batch Finalization 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.

Finalizing Invoices
Setting Up Finalization or Cancellation Using Processes

Cancellation

Invoices in the statuses Open or Paid can be canceled.

cancel_invoice
Canceling an invoice

The following steps outline the lifecycle of the canceled invoice and the cancellation invoice.

When a user cancels an open or paid invoice, JustOn creates a new draft invoice of the class Credit and the type Cancelation. The new invoice includes all invoice line items of the original invoice with a reversed unit price.

When the user finalizes the cancellation invoice, JustOn will

  • set the original invoice to the status Canceled and link the original with the cancellation invoice (Canceled with on the original invoice, Related with on the cancellation invoice),
  • unlink any received payments from the canceled (original) invoice,
  • set the cancellation invoice to the status Settled,
  • create clearing balances at the canceled (original) invoice and at the cancellation invoice.

After the cancellation is completed, both the original invoice and the cancellation invoice have an invoice balance of 0 and do no longer affect the account balance.

Info

You can also cancel credits. This produces an invoice of the class Invoice and the type Cancelation.

Bookkeeping data for cancellation invoices

If the bookkeeping data generation is enabled, JustOn creates booking details as follows when finalizing a cancellation invoice:

  • For each existing booking detail of the canceled invoice, JustOn creates a new, "opposite" booking detail.
  • For booking details of the type Revenue, JustOn appends the related account number to the name of the new booking detail.
  • For the amount of the new booking detail, JustOn sets the inverted amount of the existing booking detail.
  • For the booking date of the new booking detail, JustOn sets the date of the canceled invoice as long as the original booking period is Open. For new booking periods, JustOn uses the date of the cancellation invoice.
  • For the booking text of the new booking detail, JustOn prepends Cancellation: to the original booking text.

    This text is a custom label. If you need a locale-specific variant, provide a corresponding translation as described in Managing Custom Labels.

Info

In addition to manually creating a cancellation invoice, you can set up a process to automate this operation.

Canceling Invoices
Setting Up Finalization or Cancellation Using Processes

Cancellation vs. Credit

JustOn provides flexible options to handle invoice corrections or customer complaints. Depending on the use case, you can use

  • Credits: You can issue a (partial) credit if you want to cancel one or more individual invoice line items of an invoice. This way, you reduce the original invoice amount, canceling (part of) your customer's debt.

    alt text
    Canceling an invoice line item, issuing a partial credit

  • Cancellations: You can completely cancel an invoice in case of formal invoice errors like a wrong recipient address or if a customer has returned a complete purchase. Canceling an invoice creates a credit with the reversed amount of the original invoice, this way voiding the original claim to your customer.

    alt text
    Canceling an invoice including all invoice line items, creating a credit for the complete invoice

Partial Credit Handling

Invoice Write-Off

Some business use cases may require to write off certain invoice amounts:

  • If an assigned payment does not exactly match the invoice amount, you can write off the missing amount. Differences to cover may, for example, result from currency conversions upon payment matching. You define the difference that you are ready to accept and offset consequently according to your business requirements. In order to enable the automatic balance write-off after payment, you specify either a (percentage) threshold or an absolute amount in the global settings.
  • If your business model allows it, you can write off the complete invoice immediately upon finalization. This may be sensible for invoices with small amounts, which you may consider not worth collecting. To enable the automatic, immediate invoice write-off, you specify an absolute amount in the global settings. The date of the write-off balance will be set to the date of the invoice finalization.
  • You can write off an invoice manually. Doing so creates a balance of the type Write off, which is immediately assigned to the current invoice. By default, JustOn sets the current open amount of the invoice as the balance amount. You can, however, modify this value.

Once applied accordingly, JustOn sets the invoice status to Paid and the invoice balance to 0.

Enabling Automatic Balance Write-Off
Manually Writing Off 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.

Deposit Invoices

Certain business use cases require merchants or suppliers to ask their customers for advance payments. To this end, JustOn allows for creating deposit invoices.

Businesses issue deposit invoices before any goods or services are supplied, usually with the intention to secure a sale. The deposit is a partial amount or a percentage of the total amount, which is to be paid up front. After the sale is completed, the deposit invoice is closed and the final invoice is issued.

Info

JustOn supports deposit invoices when billing arbitrary objects and billing opportunities.

VAT on deposit invoices in Germany

In Germany, deposit invoices are subject to VAT, as regular invoices do. The tax due date, however, differs: For regular invoices, the tax immediately arises with the invoice issuance. With deposit invoices, the tax becomes chargeable only on receipt of the down payment (German VAT Act, Art. 13).

This may be favorable in certain business scenarios: You can issue a deposit invoice to secure your deal before delivering the goods or services, but you are not immediately liable to taxes.

Basically, the creation of a deposit invoice is controlled using the ON field ON_Type on the source object. If this field is set to Deposit, JustOn generates a deposit invoice.

In order to request an advance payment with your deposit invoice, use the ON fields ON_DepositRate or ON_DepositAmount. Depending on your use case, you can then specify either a percentage value of the invoice total or a fixed amount as the deposit.

The deposit invoice is subject to the usual invoice proceedings and business processes finalization, payment registration and the corresponding balance generation. As deposit invoices do usually not constitute a legally binding payment request, they are, however, exempt from cancellations, dunnings and bookkeeping data generation. In case of errors, you may still need to void an issued deposit invoice. For details, see How to void a deposit invoice?.

Note

When you use deposit invoicing, be aware that JustOn does not consider order discounts with the deposit invoices, but only when generating the final invoices.

Working With Deposit Invoices

The following sections describe how to work with deposit invoices, outlining their life cycle.

Deposit Invoice Creation

JustOn generates a deposit invoice if the field ON_Type on the source object is set to Deposit.

Note

Once you have set the field ON_Type on the source object to Deposit to trigger the deposit invoice creation, do not modify this field subsequently to make sure that the deposit invoicing features operate correctly.

You can define a deposit rate or a deposit amount using the fields ON_DepositRate or ON_DepositAmount on the source object.

Info

If both a deposit rate and a deposit amount is defined, the amount takes precedence.

Using a template detail named Deposit, you can provide appropriate texts for the invoice PDF, like the display type, deposit title or description (see PDF Contents).

After creating the deposit invoices, JustOn sets the custom field ON_ProformaInvoice on the source objects to the deposit invoices.

deposit_1
Creating a deposit invoice

Deposit Invoice Closure

Before you create the final invoice, you must close the deposit invoice. There are two ways to do so:

  • Using the Close button on an individual invoice
  • Using a custom process to be triggered from a source record
Close button or custom process?

The procedure to close the invoices depends on your business use cases and the corresponding data structure in your org.

pro-forma_close_1

If you create invoices from a parent record in a parent-child relation, you most likely use a custom process to be triggered from the relevant parent record. The process clears the custom fields ON_Invoice, ON_Type and ON_LastInvoiceRun on the parent source record, which allows for creating the final invoice from the same record.

pro-forma_close_2

If your invoice run involves multiple source records (for example, using multiple filters or via single source object configurations), the Close button on an individual invoice is the more appropriate approach. It clears the custom fields ON_Invoice, ON_Type and ON_LastInvoiceRun on all source records that are related to the current invoice to allow generating the final invoice. This saves the need for manually clearing these fields on the source records.

Close Button

Using the Close button on an individual invoice clears the custom fields ON_Invoice and ON_LastInvoiceRun on all related source records to allow generating the final invoice.

Custom Process

If appropriate, you can use a custom process to be triggered from a source record. Applying the specific Apex class that JustOn provides for this purpose, your process

  • sets deposit invoices to the status Closed
  • clears the closed deposit invoices to 0
  • unregisters any assigned payment balances
  • sets the field RelatedInvoice of the now unregistered deposit payment balances to the corresponding deposit invoice
  • sets the custom field ON_Type to Final
  • clears the custom fields ON_Invoice and ON_LastInvoiceRun on the source record that triggers the process

deposit_2
Closing the deposit invoice via process

Info

Usually, JustOn assigns unregistered deposit payment balances to the corresponding final invoices. Clearing the field RelatedInvoice of the unregistered deposit payment balance will allow to assign the balance to any matching invoice.

Final Invoice Creation

After you have closed the deposit invoice, you create the final invoice the same way and based on the same source records as the deposit invoice.

Doing so

  • registers the balances that were unregistered from the deposit invoice by the closing process to the final invoice
  • sets the field RelatedInvoice on the final invoice to the corresponding deposit invoice

deposit_3
Creating the final invoice, linked to the deposit invoice

Info

JustOn registers a down payment as a payment balance record. As invoices by default show related balance records, the final invoice shows the down payment information. Your business may, however, require to hide this information. In this case, you need a separate invoice template or a specific template detail that is configured to prevent the balance table from being printed. For details, see Hiding Balance Table.

Deposit Invoice Structure

A deposit invoice consists of two parts:

  • The first part lists the invoice line items, which are represented as Information type invoice line items and therefore do not count for the grand total, followed by a subtotal section with tax breakdown.

    The display of the subtotal section is controlled using the checkbox Display Subtotal After on the last Information type invoice line item. Deselecting this checkbox removes the subtotal section from the invoice PDF.

  • The second part contains an invoice line item of the type Deposit, followed by the corresponding tax breakdown, grand total and payment amount.

The two parts are optional. Whether they are displayed or not depends on whether there are already actual invoice line items to show or, respectively, on whether there is an advance payment defined. At least one part must exist to print the invoice line item table.

Example invoice line item table of a deposit invoice:

Pos. Title Tax Rate Net Price
1 Some Goods 20% 1000
2 Some Service 20% 500
Subtotal Net 1500
Tax Amount 300
Deposit Gross 1800
3 Down payment (50%) 20% 750
Tax Amount 150
Grand Total 900
Payment Amount 900

Pos. 1 and 2 are Information invoice line items, which do not count for the grand total of the invoice. Pos. 3 is a Deposit invoice line item. The value depends on the deposit setting used: it is either calculated based on the net subtotal of all invoice line items and the defined deposit rate, or it can be included as an absolute net amount using the deposit value.

The final invoice includes additional sections that show the received deposit payment and the remaining final payment, as well as the corresponding tax breakdown.

Pos. Title Tax Rate Net Price
1 Some Goods 20% 1000
2 Some Service 20% 500
Subtotal Net 1500
Tax Amount 300
Deposit Gross 1800
Received Payments Net 750
Received Payments Tax 150
Received Payments Gross 900
Remaining Final Payment Net 750
Remaining Final Payment Tax 150
Remaining Final Payment Gross 900
Payment Amount 900

You can override the labels according to your business requirements. For details, see Configuring Final Invoice Display.

Enabling Deposit Invoices

Pro Forma Invoices

Certain business use cases require merchants or suppliers to issue pro forma invoices. Pro forma invoices are commonly used as preliminary invoices with a quotation, for customs purposes, or to give an example of the charged prices. In that sense, the pro forma invoice is exempt from any accounting or payment-related processing.

Info

JustOn supports pro forma invoices when billing arbitrary objects and billing opportunities.

Basically, the creation of a pro forma invoice is controlled using the ON field ON_Type on the source object. If this field is set to Proforma, JustOn generates a pro forma invoice.

Note

When you use pro forma invoicing, be aware that JustOn does not consider order discounts with the pro forma invoices, but only when generating the final invoices.

Working With Pro Forma Invoices

The following sections describe how to work with pro forma invoices, outlining their life cycle.

Pro Forma Invoice Creation

JustOn generates a pro forma invoice if the field ON_Type on the source object is set to Proforma.

Note

Once you have set the field ON_Type on the source object to Proforma to trigger the pro forma invoice creation, do not modify this field subsequently to make sure that the pro forma invoicing features operate correctly.

Using a template detail named Proforma, you can provide appropriate texts for the invoice PDF, like the display type or description (see PDF Contents).

After creating the pro forma invoices, JustOn sets the custom field ON_ProformaInvoice on the source objects to the pro forma invoices.

pro-forma_1
Creating a pro forma invoice

Pro Forma Finalization

During invoice finalization a balance of typ Proforma (usually Invoice) is created. This balance type is excluded from the account balance (rollup summary) and the statement of account creation.

Pro Forma Invoice Closure

Before you create the final invoice, you must close the pro forma invoice. There are two ways to do so:

  • Using the Close button on an individual invoice
  • Using a custom process to be triggered from a source record
Close button or custom process?

The procedure to close the invoices depends on your business use cases and the corresponding data structure in your org.

pro-forma_close_1

If you create invoices from a parent record in a parent-child relation, you most likely use a custom process to be triggered from the relevant parent record. The process clears the custom fields ON_Invoice, ON_Type and ON_LastInvoiceRun on the parent source record, which allows for creating the final invoice from the same record.

pro-forma_close_2

If your invoice run involves multiple source records (for example, using multiple filters or via single source object configurations), the Close button on an individual invoice is the more appropriate approach. It clears the custom fields ON_Invoice, ON_Type and ON_LastInvoiceRun on all source records that are related to the current invoice to allow generating the final invoice. This saves the need for manually clearing these fields on the source records.

Close Button

Using the Close button on an individual invoice clears the custom fields ON_Invoice, ON_Type and ON_LastInvoiceRun on all related source records to allow generating the final invoice.

Custom Process

If appropriate, you can use a custom process to be triggered from a source record. Applying the specific Apex class that JustOn provides for this purpose, your process

  • sets pro forma invoices to the status Closed
  • clears the custom fields ON_Invoice, ON_Type and ON_LastInvoiceRun on the source record that triggers the process
  • unregisters any assigned payment balances and sets the balance field RelatedInvoice to the pro forma invoice

pro-forma_2
Closing the pro forma invoice via process

Info

Usually, JustOn assigns unregistered pro forma payment balances to the corresponding final invoices. Clearing the field RelatedInvoice of the unregistered pro forma payment balance will allow to assign the balance to any matching invoice.

Final Invoice Creation

After you have closed the pro forma invoice, you create the final invoice the same way and based on the same source records as the pro forma invoice.

Doing so

  • registers the balances (if any) that were unregistered from the pro forma invoice by the closing process to the final invoice
  • sets the field RelatedInvoice on the final invoice to the corresponding pro forma invoice

pro-forma_3
Creating the final invoice, linked to the pro forma invoice

Enabling Pro Forma Invoices

Counters and Number Ranges

Invoices, credits, cancellations and dunning reminders must have unique numbers to comply with legal regulations. In Draft status, these numbers are temporary and of no legal relevance. When finalizing invoices or dunning reminders, however, JustOn creates the unique and unalterable numbers based on defined counters.

Counter and Number Range Implementation

JustOn implements counters using the custom setting Counters. The following fields are available:

Field Possible Values Description
Name Specifies the name of the counter, is to be referred to by the template.
Reset YEARLY
MONTHLY
DAILY
Defines the interval after which the counter is reset. If empty, the counter is not reset.
Template [Year]
[Month]
[Day]
[AccountNo]
{00000}
Specifies the pattern of the produced number. It may contain custom placeholders (defined for fields on the invoice, account, subscription, business entity, related invoice and email contact), and must define the minimum number of digits like {00000}. You can combine the placeholders and add any fix strings as necessary.
Use Account Counters (checkbox) true
false
If checked, creates a new number range for each account that uses this counter.
Start Count Optionally, specifies a start count. If set, the associated number range will start with the next number (<value> + 1). That is, if you want the number range to start with 5, the start count value must be 4.
JustOn evaluates the start count on number range creation and after reset.
If empty, defaults to 0.

The default counter as shipped with JustOn, for example, uses the following pattern template:

[Year]{00000}

This produces invoice numbers of the following pattern:

201700001, 201700002, 201700003

The count increases each time an invoice is set Open and a new invoice ID is created.

The following table lists some examples.

Example Counter Template
2018Jan00001 [Year][MonthShort]{00000}
180100001 [Year:yy][Month:MM]{00000}
2018ACME00001 [Year][AccountAccountName]{00000}

Each counter is associated to one or more number ranges. Number ranges are implemented as a custom object. They represent the groups of numbers to which the unique numbers created for an invoice, dunning reminder etc. belong. If a number range as required by the counter does not exist, JustOn creates one automatically with the count set 0.

With the counter field Reset set to YEARLY, JustOn creates a new number range for each year. Likewise it creates a new number range for each month if Reset is set MONTHLY, and every day if Reset is set DAILY. The reset feature can be combined with the setting Use Account Counters.

JustOn selects number ranges based on the counter defined for the invoice, the account of the invoice and the invoice date for day/month/year.

Number ranges include the following fields:

Field Description
Counter Name Specifies the name of the associated counter.
Counter Shows the current count for this number range. Equals the number of the last invoice.
Year Shows the year for this number range. Is empty if the counter is set to not reset.
Month Shows the month for this number range. Is empty if the counter is set to not reset or set to reset YEARLY.
Day Shows the day for this number range. Is empty if the counter is set to not reset or set to reset YEARLY or MONTHLY.
Account Shows the account for this number range. Is empty if the checkbox Use Account Counters on the counter is not selected.

By default, JustOn provides the following counters:

  • Default: A single counter used by default for generating all invoice, credit, cancellation or dunning IDs. This counter is assigned to the default invoice template.

    If you have more than one template or template details to cover specific needs, you can use an individual counter with each template or template detail. To this end, configure additional counters. If you use the dunning functionality, for example, configure a dunning counter first and assign it to the corresponding template detail.

    If the template or template detail does not define a counter, JustOn falls back to the counter set on the business entity. If the system cannot find a valid counter, it shows an exception.

  • Dunning Run: Used to count the individual dunning runs. The dunning run counter does not offer the reset feature and does not work with placeholders.

  • Subscription: Used to count the subscriptions. The subscription counter does not offer the reset feature and supports only a limited set of placeholders (account-related and built-in).

Counters and Number Ranges

Number Range History

Invoice numbers must be unique and unalterable in order to clearly and unambiguously identify an invoice once it is finalized, that is, effective in legal and bookkeeping terms. Applying JustOn's counter and number range functionality, you make sure that these requirements are met.

The fact that some jurisdictions demand sequential invoice numbers does not, however, imply that your invoice numbers must necessarily be consecutive and without gaps in numbering - solely the uniqueness is required. As long as you can provide an explanation for non-consecutive numbers (like a specifically configured counter or just a canceled invoice), breaks in sequence are acceptable. For Germany, for example, the Sales Tax Application Decree states that a gapless sequence of issued invoice numbers is not mandatory ("Umsatzsteuer-Anwendungserlass", section 14.5).

In case of issues or disputes with respect to the sequence of JustOn's numbering, you may may need some detailed tracking or debugging information about the number range usage. To this end, JustOn introduces dedicated history fields and history tracking for number ranges.

Info

The number range history is available as of JustOn 2.64.

For each generated number, the following information is recorded:

Field Description
Counter The current count for this number range.
Timestamp The date and time of the latest count increase.
Target ID The Salesforce ID of the record on which the counter has been used the last time.
Last Generated Name The last produced counter (invoice number, etc.)

In addition, each history record includes

  • The name of the user who triggered the counter generation
  • The last value and the current value for Counter, Timestamp, Target ID and Last Generated Name.

Enabling Number Range History

Tax Handling

Depending on your business requirements and your system environment, JustOn can handle taxes in various ways:

Internal Tax Calculation

By default, JustOn calculates the tax for each invoice line item based on its tax rate. This tax rate can either be determined using tax rules, as outlined below, or be a fix value (set as product tax rate).

Info

JustOn recommends to use tax rules as the primary approach for defining applicable tax rates. You can, however, combine the two methods. The software first tries to evaluate tax rules, and in case there are no matching rules or none at all, it retrieves the specified product tax rate.

When using JustOn's internal tax calculation with tax rules or a fix tax rate, you can leave the invoice line item field Tax Provider empty. On completion, JustOn sets the value Internal to indicate the origin of the tax calculation on the invoice line item.

Tax Rules for VAT or Sales Tax

If you sell products with different tax rates or operate different markets where variable or multiple tax rates apply, you need rules to determine the correct tax rate for an invoice line item. To this end, JustOn supports tax rules. They provide for tax rate lookups along various combinations of account region, merchant or business entity region, product tax class, product group, etc.

To have JustOn calculate the taxes based on tax rules, you set up the tax rules that meet your business requirements.

With this respect, the following concepts are important:

Tax rules provide for tax rate lookups along various combinations of account region, merchant or business entity region, product tax class, etc.

A tax detail represents an individual tax data set that is determined for a specific combination of region, tax class, etc., and that is included in the tax calculation for an invoice line item. It is always produced if there are multiple tax types available for the context of a business entity, even if only one is finally applied.

Tax rules are applied to invoice line items immediately on creation. JustOn writes the values for the fields Tax Rate, Applied Tax Rule and Tax Code either directly to the invoice line item (like for the VAT) or creates a tax detail for each applicable tax type (like sales tax).

Tax Rules

Fix Tax Rate

If you sell products that always have the same tax rate, the invoice line item needs the following field to be set for the internal tax calculation to work:

Field Data Type Description Example Value
Product Tax Rate Percent (3,3) Specifies the actual tax rate. 19%
7%

There are several ways to set the value for the Product Tax Rate field:

  • Using data mappings, retrieving the value from virtually any field of any object,
  • Using the ON field mechanism, retrieving the value from a custom field ON_ProductTaxRate of any source object or (for compatibility reasons with older JustOn versions) from the custom field ON_TaxRate of a price book entry,
  • Via a data import.

Tax Calculation - Tax Rounding

Generally, there are two ways to calculate the taxes on an invoice: by row or by column. Applying one or the other method may produce different summarized values.

JustOn calculates the taxes on row base, that is, individually for each invoice line item, and then sums the resulting item totals. This means, each invoice line item fulfills the legal tax regulations, and in addition, JustOn supports multiple tax rates per invoice.

If, however, there is only one tax rate used, a user may be tempted to recalculate the invoice based on column totals. Then the user may get confused because of possible differences in the summarized values.

The following example illustrates the behavior and the possible confusion:

Pos Unit Price Quantity Tax Rate Pos Total (net) Pos Total (tax) Pos Total (gross)
A 0,69 3 19% 2,07 0,39 2,46
B 0,99 4 19% 3,96 0,75 4,71
Sum 6,03 1,14 7,17
Total (net) Total (tax) Grand Total

JustOn first calculates the total net, total tax and total gross values for each invoice line item, rounding them to two decimal places. Then it sums the item totals on the invoice.

Now assume a user recalculates the invoice based on the summarized net values, that is, applying the column-based calculation. This will yield the following result:

Total (net) Tax Rate Total (tax) Grand Total
6,03 19% 1,15 7,18
Formula Total (net) * 0,19 Total (net) + Total (net) * 0,19

Because of the differently applied rounding, the calculated column-based total tax and total gross values now are 1 cent higher than the summarized row-based values of the original invoice.

Some external systems may not be able to handle these tax rounding differences. To support such conflicting scenarios, JustOn implements a special invoice line item of the type Tax Delta.

The tax delta offsets any tax rounding differences. This way, JustOn creates invoices that are calculated correctly on row base and on column base. The tax delta is not displayed, however, on the invoice PDF, the clone invoice page and the invoice line item mass editing page.

This works for invoices that are calculated from net unit prices.

With this feature enabled and following the example above, JustOn creates this invoice:

Pos Unit Price Quantity Pos Total (net)
A 0,69 3 2,07
B 0,99 4 3,96
Subtotal (net) 6,03
Tax (19%) 1,15
Grand Total 7,18

The tax delta feature also supports invoices with multiple tax rates. JustOn groups the items by tax rate and calculates each group separately, as illustrated below:

Pos Unit Price Quantity Tax Rate Pos Total (net)
A1 1,49 1 19% 1,49
A2 2,49 1 19% 2,49
B1 3,49 1 7% 3,49
B2 4,49 1 7% 4,49
Subtotal (net) 11,96
Tax (19%) 0,76
Tax (7%) 0,56
Grand Total 13,28

Adjusting for Tax Rounding Differences

Precalculated Tax

Certain business use cases require to pass through taxes that were precalculated by an external system, like a web shop or an ERP system. When doing so, you turn off JustOn's internal tax calculation.

Info

The precalculated tax support is available as of JustOn 2.46.

For JustOn to deal with precalculated taxes, the invoice line item needs the following fields to be set:

Field Data Type Description Value
Tax Provider Picklist Specifies the provider that calculates the tax detail.
Precalculated disables the tax calculation.
Precalculated
Tax Rate Percent (3,3) Specifies the tax rate that applies to this invoice line item. With precalculated taxes, this value is passed through for display purposes, but it is not used for calculation. percentage tax rate to be displayed for the invoice line item
19%
Precalculated Tax Currency (16,2) Specifies the absolute tax amount as calculated by a third-party system. precalculated tax amount

There are several ways to set the values for the Tax Rate and Precalculated Tax fields:

  • Using data mappings, retrieving the values from virtually any fields of any objects,
  • Using the ON field mechanism, retrieving the values from custom fields ON_TaxProvider, ON_TaxRate and ON_PrecalculatedTax of any source object,
  • Via a data import.

External Tax Provider

Some countries, like the United States or Canada, have very complex sales tax rules that are difficult to manage. To facilitate corresponding business use cases, JustOn allows for retrieving tax data from an external tax provider.

Info

The tax data retrieval is available as of JustOn 2.43.

Currently, JustOn supports the AvaTax service from Avalara as external tax provider.

Setting Up Tax Data Retrieval
Setting Up Tax Data Retrieval From AvaTax

Reverse Charge

Certain international business conditions make buyers, rather than suppliers, liable to pay the taxes on transactions. The reverse charge procedure is a common practice for trade within the European Economic Area, including Switzerland. It does not apply, however, to all businesses or products in all associated countries.

Info

Consult your tax consultant about whether or not your business may use the reverse charge procedure.

When issuing invoices that are subject to reverse charge, suppliers must

  • Bill net prices only
  • Specify the recipient's VAT ID
  • Explicitly state that the reverse charge applies.

You can configure JustOn to display a reverse charge notice for invoices to be sent to buyers in specific countries. This involves

Setting Up Reverse Charge Notice

VAT Number Validation

The EU provides a VAT number validation service. It allows to validate the VATIN (value added tax identification number) of businesses in the EU.

Note | Important Info

Be aware of the following specifics:

  • The EU VAT number validation service is accessed via an insecure HTTP request.
  • The EU VAT number validation service is designed for single, sporadic requests. In case your repeated requests are considered abusive use of the service, your IP address will be blocked for a certain period.

JustOn uses this service to check the VAT number of an account. The VAT check can be performed

  • Individually for a single account, using a button on the account page, or
  • For multiple accounts using a scheduled batch job.

Info

The VAT number check is available as of JustOn 2.57.

By default, JustOn's VAT validation uses the VAT number as specified in the VATIN field of the account as the source field. You can, however, overwrite this behavior by creating a custom field ON_VATNumber on the Account object. Once this field exists, JustOn uses this field as the source. In order to validate the VAT number, the source field must not be empty.

The result of the VAT validation is written to fields on the Account object:

Field Label Description
VAT Number Valid Selected if the VAT number is valid
VAT Validated Name The name linked to the VAT number
VAT Validated Address The address linked to the VAT number
Last VAT Validation The timestamp of the last validation
Last Successful VAT Validation The timestamp of the last successful validation
Last VAT Validation Error The error message if the last validation was not successful

Note

The VAT validation only tells whether a given EU VAT information exists. It does not necessarily prove, however, that the given VAT number actually belongs to the current account.

Be aware of the following validation specifics:

  • If the validation was not successful, only the fields Last VAT Validation and Last VAT Validation Error are updated.
  • The fields VAT Number Valid, VAT Validated Name and VAT Validated Address reflect the result of the last successful validation.
  • Modifying the value in the VAT number source field (VATIN or ON_VATNumber) does not automatically update the VAT validation result fields. JustOn therefore recommends to delete the validation result fields after changing the VAT number.
  • Empty VAT number source fields (VATIN or ON_VATNumber) produce an error on manual VAT number check, prompting the user to specify a value, and make JustOn skip the corresponding accounts on automatic VAT number validation.
  • The name and address linked to a VAT may not be available.
  • If required, you can add the fields to the page layout of the Account object.

Enabling VAT Number Validation

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.

Business Entities

Certain business use cases require a Salesforce organization (the "virtual space" that includes all data and applications of an individual business) to hold specific billing-relevant information or to be further divided in subdivisions. To this end, JustOn has introduced business entities (up to JustOn 2.63, "tenants").

The business entity can hold billing-relevant information of your company or company subdivision, like address data or bank data. When using business entities, you can automatically assign a business entity to an invoice during the invoice creation. Consequently, the business entity information can be printed to the invoice via custom placeholders, like [BusinessEntityName] or [BusinessEntityIBAN].

Invoices and subscriptions can specify a business entity. If the information is available, JustOn automatically populates the Business Entity field on the invoice or subscription when creating these objects. You can, however, later override the business entity manually.

Info

Make sure to check that the spelling exactly matches the business entity name as defined in the custom setting. JustOn performs an exact match on the business entity name when retrieving the corresponding information.

When determining the business entity for an invoice, JustOn tries to retrieve the information in the following order:

  • Copy business entity from subscription
  • Determine business entity from account via business entity mapping
  • Use default business entity
  • Leave Business Entity field empty

Similarly, when determining the business entity for an invoice, JustOn proceeds as follows:

  • Determine business entity from account via business entity mapping
  • Use default business entity
  • Leave Business Entity field empty

Business Entity

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.

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

Discounts

JustOn supports three types of discounts:

Item-Based Discount

The item-based discount reduces the price of an invoice line item. This discount type is applied to an individual invoice line item before the invoice subtotal is calculated.

Info

Depending on the Gross Invoice setting (see Enabling Gross Invoicing), the item-based discount reduces either net prices or gross prices.

Two fields on the invoice line item can control this discount:

Field Data Type Default Value Description
Discount Percent(3,2) 0% Specifies a percentage discount rate used to calculate the discount amount that is applied to the invoice line item price.
Discount Amount Currency(16,2) Specifies the discount amount by which the invoice line item price is reduced. Is applied if the Discount field is empty.

There are various options to have the discount set for an invoice line item:

  • You can use the ON field mechanism, Salesforce processes or other automation tools to have the Discount or Discount Amount field set automatically when generating invoices and invoice line items.
  • You can set the Discount field on subscription items, as described in Defining Item Discount.
  • You can specify the discount percentage or discount amount manually for invoice line items of draft invoices, as described in Editing Invoice Line Items.

Order Discount

The order discount reduces to the subtotal net value of an invoice (which represents an order). That is, the order discount is applied to the sum of the invoice line item prices and, consequently, "distributed" equally to all invoice line items. Using this discount type also reduces the tax amount subsequently.

Order discount support is available as of JustOn 2.41.

Note

If you use deposit invoicing or pro forma invoicing, be aware that JustOn does not consider order discounts with the deposit or pro forma invoices, but only when generating the final invoices.

Examples

Example calculation for an invoice with 10% order discount and 19% tax rate

Pos Quantity Unit Price Pos Total
(net, no discount)
Pos Total
(net with prorated discount)
1 2 5,00 10,00 9,00
2 5 4,00 20,00 18,00
3 3 10,00 30,00 27,00
Subtotal (net) 60,00
Order Discount (10%) -6,00
Subtotal (discounted) 54,00
Tax (19%) 10,26
Grand Total 64,26

Example calculation for an invoice with 25% order discount and 19% tax rate

Pos Quantity Unit Price Pos Total
(net, no discount)
Pos Total
(net with prorated discount)
1 2 50,00 100,00 75,00
2 2 25,00 50,00 37,50
3 1 25,00 25,00 18,75
Subtotal (net) 175,00
Order Discount (25%) -43,75
Subtotal (discounted) 131,25
Tax (19%) 24,94
Grand Total 159,19

Order Discount

Invoice Discount

The invoice discount (temporarily) reduces the grand total of the invoice. It is applicable to the total gross value for a defined time frame - usually in order to motivate the buyer to make the payment within this specific time.

If JustOn registers a payment that covers the discounted grand total within the granted period, it generates two balances: one of the type Payment for the actually paid amount, and another one of the type Clearing for the difference (see Standard Balance Types). The two balances offset the grand total, which sets the invoice Paid.

The relevant fields on the invoice include:

Field Data Type Default Value Description
Discount Rate Percent(2,1) Specifies the discount percentage by which the grand total is to be reduced. Is the calculation base for all discount-related fields.
Discount Payment Due Number(3,0) 14 Specifies the time (in days) after which the discounted payment is due.

Info

JustOn determines the values for the related fields Discount Amount, Discount Payment Due Date and Discounted Grand Total when the discount rate and the discount payment due are set.

There are various options to have the discount set for an invoice:

  • You can use the ON field mechanism, Salesforce processes or other automation tools to have the Discount Rate and Discount Payment Due fields set automatically when generating invoices.
  • You can specify the discount percentage and discount payment due time manually for draft invoices, as described in Applying Invoice Discount.

Invoice Discount

Invoice Distribution

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

Info

You can also use the View functionality to display and print the invoice PDF documents individually, and then mail the hard copy.

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

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

Templates

The template is the model based on which the PDF copy of an invoice, dunning reminder or account statement is rendered. It defines its contents and layout. The produced PDF document is intended to be distributed via email or postal service to customers, and it can be exported and archived. JustOn provides default templates, based on which you can define your own templates.

JustOn supports two PDF rendering mechanisms, referred to as version 1 and version 2:

  • Salesforce's built-in PDF rendering service generates downloadable, printable PDF files of specifically prepared Visualforce pages - in JustOn, for invoices and statements. Using Visualforce PDF rendering is the standard approach on the Salesforce platform and works for the most use cases. There may, however, apply some limitations. For details, see Visualforce PDF Rendering Considerations and Limitations in the Salesforce Help.
  • JustOn 2.62 has added support for invoice and statement templates using the Liquid template language. To render the files and to produce the corresponding PDF output, JustOn uses a dedicated service based on the Chromium PDF engine. Use this approach if your business requires sophisticated PDF customizations that are difficult or impossible to implement with Visualforce PDF rendering.

Working With Templates

Placeholders

Placeholders are symbols for fields of Salesforce or JustOn objects (like address fields or invoice data), which are to be replaced with actual values upon text rendering. Placeholders are used, for example, in templates (v1), counters or booking texts.

Basically, there are two types of placeholders:

Built-in Placeholders

JustOn provides a set of generic, built-in placeholders. These placeholders are defined in the software package. They cannot be modified nor be found in the custom setting Custom Placeholders.

The current built-in placeholders include:

Placeholder Description
[CurrentMonth]
[InvoiceLink] Provides a link to the internal payment page (up to JustOn 2.48).
[PaymentLink] Provides a link to the payment page of the JustOn Self-Service Extension (as of JustOn 2.49).
[LastMonth]
[NextMonth]
[OfLabel]
[PageCounter]
[PageLabel]
[TaxRate] Can only be used in the tax label field at the template.
[Today]

Built-in Placeholders

Custom Placeholders

As opposed to the built-in placeholders, custom placeholders can be modified. If you need additional placeholders for any other custom fields you may have defined, like, for example, the Account object, you can create new custom placeholders.

Info

During the installation, JustOn creates placeholders for many standard and custom fields of JustOn objects. These placeholders, which are referred to as default placeholders, cover the most common fields required when compiling the invoice information to be printed.

JustOn can add new placeholders with every software update.

JustOn implements custom placeholders using the custom setting Custom Placeholders.

Custom Placeholders