action.skip

Configuring Counters and Number Ranges

← Configuring Invoice Numbering

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 Billing & Invoice Management creates the unique and unalterable numbers based on defined counters.

The following concepts are important:

Counter
Custom setting that defines how the unique numbers for invoices, dunning reminders, subscriptions or SEPA mandate references are produced, including the pattern, reset interval, etc.
Number range
Custom object whose records represent the groups of produced unique numbers for invoices, dunning reminders, subscriptions or SEPA mandate references.

JustOn Billing & Invoice Management 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.
Some legal or fiscal systems do not allow invoice number ranges to restart on a monthly or daily base (for example, in France). Make sure you clarify this question before operating in a new market.
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.
If you need the start count for a specific period (→ reset period) only, make sure to delete it after the first unique numbers in the relevant period have been produced.

Depending on your organization's requirements, you must create individual counters for business entities or for invoices, credits, cancellations or dunning reminders via corresponding templates.

For more details, see Counter and Number Range Implementation.

Info

When defining counters, be aware of the following considerations:

  • Special characters like -, ;, : etc. are likely to be removed from the reference string upon transaction processing by the banks. JustOn therefore recommends not to include these characters when defining the number pattern for the produced invoices in the field Template of the counter.
  • Account counters consume additional storage space in your org and may become difficult to handle with large numbers of accounts. JustOn therefore recommends to avoid using account counters, leaving the checkbox Use Account Counters of the counter unselected.

To create a new counter:

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Counters.

  3. Click New.
  4. Specify the details as necessary.

    The mandatory fields include Name and Template.

    Optionally, set Reset, Use Account Counters or Start Count as necessary.

    Using Reset, you can define an interval after which the counter is reset (YEARLY, MONTHLY, DAILY). Be aware, however, that some legal or fiscal systems do not allow invoice number ranges to restart on a monthly or daily base (for example, in France). Make sure you clarify this question before operating in a new market.

  5. Click Save.

    This creates the new counter and makes it available in business entities or templates.

Note

Modifying existing counters immediately affects the current numbering.