action.skip

Best Practice: Setting Up Billing and Invoicing Solution

This article gives a step-by-step instruction on configuring JustOn Billing & Invoice Management. It is aimed at enabling partners or customers to completely set up two major business scenarios in one go: contract-based recurring billing or one-time sales (see Modeling Billing and Invoicing).

This article describes a proven, best-practice approach:

Step 1: Business Entity
↳ Step 2: Tax Handling
     ↳ Step 3: Templates
          ↳ Step 4: Modeling Billing and Invoicing
               ↳ Step 5: Invoice Run
                    ↳ Step 6: Finalization
                         ↳ Step 7: Accounting Support

Info

Your business requirements may vary, so you may not need to complete all tasks, or not necessarily proceed in the outlined order.

For details on how to install and set up JustOn Billing & Invoice Management to make it usable for users in your Salesforce org, see JustOn Installation.

Step 1: Business Entity

howto_config_step1

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

alt text

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

Info

Although a business entity is, technically, optional for automating your billing and invoicing process, you are very likely to need one – to hold invoicing and accounting relevant data like a VAT ID, SEPA ID, etc.

Depending on your organization's requirements, you must create individual business entities for specific regions, customers or other criteria.

bus_entity_edit
Creating a business entity

Defining business entity
  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 Business Entity.

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

    Specify your company's or company subdivision's information in the corresponding fields as necessary.

    Custom settings names must not exceed 38 ASCII characters.

    Selecting the Default checkbox makes JustOn use the current business entity for all invoices.

  5. Click Save.

    This creates the new business entity and makes it available for subscriptions and invoices.

For details, see Business Entities.

Next steps:

Step 2: Tax Handling
Step 3: Templates
Step 4: Modeling Billing and Invoicing
Step 5: Invoice Run
Step 6: Finalization
Step 7: Accounting Support

Step 2: Tax Handling

howto_config_step2

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 – usually a dedicated tax rule for every applicable tax rate, including one for reverse charge.

Assume the following example: There are four tax situations, for which you need individual tax rules that yield a specific tax rate.

Tax Situation Tax Rule Tax Rate Invoice Region
Germany, tax ID available or not available DE-VAT 19% DE
EU country, tax ID not available EU-VAT 19% EU
Reverse charge applicable, tax ID available RC 0% RC
Non-EU country, tax ID not available NON-EU 0% NON-EU

tax_rule_19vat
Defining a tax rule to apply 19% VAT for customers in Germany

Defining tax rules
  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 Tax Rules.

  3. Click New.
  4. Specify the details for each required tax rule as necessary.

    # Name Business Entity Invoice Region Tax Rate
    1 DE-VAT as created under Business Entity DE 19%
    2 EU-VAT as created under Business Entity EU 19%
    3 RC as created under Business Entity RC 0%
    4 NON-EU as created under Business Entity NON-EU 0%
  5. Click Save.

Now, the invoice region determines the tax rule to apply for an account. So you must identify the region based on the account's billing country.

To this end, you create the formula field ON_Region on the Account object.

Creating region formula for a B2B scenario
  1. Navigate to the fields list for the Account object.
  2. Create the following new field.

    API Name Data Type Description
    ON_Region Formula (Text) Determines the invoice region. The produced value will be copied to the field Region on the invoice.

In B2B scenarios, you can use the following formula to determine the invoice region (given that ONB2__TaxNumber__c specifies the tax ID).

With respect to taxation rules and depending on your type of business, you may handle Switzerland or the United Kingdom like EU countries, adding "CH","EU" or "GB","EU" to the country list in the formula.

Be aware that this formula is an example. You may have to adjust it according to your business use case.

IF(ISPICKVAL(BillingCountryCode,"DE"), "DE",
    IF(CASE(TEXT(BillingCountryCode),
        "AT","EU",
        "BE","EU",
        "BG","EU",
        "CY","EU",
        "CZ","EU",
        "DK","EU",
        "EE","EU",
        "ES","EU",
        "FI","EU",
        "FR","EU",
        "GR","EU",
        "HU","EU",
        "IE","EU",
        "IT","EU",
        "HR","EU",
        "LT","EU",
        "LU","EU",
        "LV","EU",
        "MT","EU",
        "NL","EU",
        "PL","EU",
        "PT","EU",
        "RO","EU",
        "SE","EU",
        "SI","EU",
        "SK","EU",
        "SM","EU",
        "NON-EU")
        = "NON-EU", "NON-EU",
        IF(ISBLANK(ONB2__TaxNumber__c), "EU", "RC")
    )
)

Based on the billing country as defined for the account, this formula produces either DE, EU, RC or NON-EU as the value for the region.

For details, see

Next steps:

Step 3: Templates
Step 4: Modeling Billing and Invoicing
Step 5: Invoice Run
Step 6: Finalization
Step 7: Accounting Support

Step 3: Templates

howto_config_step3

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. Produced PDF documents are intended to be distributed via email or postal service to customers, and can be exported and archived.

template
Combining data with a template to produce an output

In addition to the fields that are printed to the PDF, the templates also include texts for the email that JustOn sends to distribute the rendered PDF documents.

You usually create a dedicated template for each language you want to support (and, possibly, other criteria), as well as the associated template details to cover your use cases.

How to specify which template to use?

Depending on your business scenarios, you may have to use dedicated templates to support, for example,

  • different locales (languages),
  • specific customer groups,
  • individual business entities.

So if there are multiple templates, what is the best way to specify which one to use – for a specific use case or as a fallback?

This is how JustOn Billing & Invoice Management looks for a template:

ON_Template field on the invoice source records
ON_Template field on the account
     ↳ Template field on the business entity
          ↳ Default template

(1) To predefine a specific template for your standard use cases, you usually set it via the ON field ON_Template on your source records for the invoice generation.

Generally, ON_Template is a formula field. In the simplest use case, you just name the template to use. If necessary, however, you use a formula that returns a dedicated template according to your specific criteria – target region, business entity, product group, etc.

(2) As a more general setting, you can define a dedicated template per customer – using an ON_Template field on the account. If the source record does not specify a template, JustOn uses the one set on the account.

(3) In addition, you can set a template per business entity. If there is no template defined on the source record or the account, it is retrieved from the Template field on the business entity that is related to the target record (invoice or statement).

(4) If neither the source record, the account nor the business entity specify a template to use, JustOn Billing & Invoice Management falls back to the Default template. Note that you can leave the Default template shipped with the package untouched and use this as your fallback, or create a custom template according to your needs and name it Default.

Info

As long as an invoice has the status Draft, you can assign another template to the invoice.

Preparing templates usually involves the following tasks:

Creating template

To cover multiple targets, like different locales or specific customer groups, you need to create new templates.

JustOn recommends to create one or more custom templates and to leave the default template (named Default) untouched.

  1. Open the Templates tab.
  2. Click New.
  3. Specify at least the template name and the template language.

    You can edit the other information later as required.

  4. Click Save.

    This generates the new template, copying the contents of the default template.

Creating template details

Generally, JustOn recommends to use template details to customize specific template parts for different purposes, for example, invoice, credit, cancellation. To create a new template detail:

  1. Open the template to be edited.
  2. In the Template Details section, click New Template Detail.
  3. Specify at least the template detail name and the parent template assignment.

    The template detail name must correspond to an existing invoice type or invoice class or, respectively, to an existing dunning level.

    You can edit all other information later as required.

  4. Click Save.

Populating common template fields

Usually, your organization has defined a layout model for printed documents. When customizing a template, you must provide information to fields (text blocks) that are empty by default in order to comply with your organization's design specifications. Common header and footer fields to be populated with your custom information include

  • Header
  • Sender Address
  • Footer

For an overview of other fields that are to be filled, their placement etc., see Template Structure and Building Blocks.

To edit header and footer:

  1. Open the template to be edited.
  2. In the Header & Footer section, double-click the Header, Sender Address or Footer field and specify the information as required.

    Alternatively, you can click Edit in the detail view and edit all fields at once.

  3. Click Save.

Template text blocks can contain plain text, placeholders and HTML code for tables, lists and links. If you use HTML code in template text blocks, make sure to write all code in a single line to avoid line breaks being converted to <br/> tags.

Editing standard text blocks

In the main content area, the template includes three generic text blocks that you can use for any running text to be rendered in the final document.

  • Text 1: Text to be rendered above the invoice line item table, can be used, for example, to edit a letter-like text introducing the invoice that follows.
  • Text 2: Text to be rendered below the invoice line item table, can be used, for example, to add payment terms.
  • Text 3: Additional text to be rendered below the Text 2 block.

To edit the generic text blocks:

  1. Open the template to be edited.
  2. In the Texts section, double-click the Text 1, Text 2 or Text 3 field and specify the information as required.

    Alternatively, you can click Edit in the detail view and edit all fields at once.

  3. Click Save.

Template text blocks can contain plain text, placeholders and HTML code for tables, lists and links. If you use HTML code in template text blocks, make sure to write all code in a single line to avoid line breaks being converted to <br/> tags.

Modifying email texts

In addition to the fields that are printed to the PDF, the invoice template also includes texts for the email that JustOn can send to distribute the rendered PDF documents. These fields include:

Template Section Field Description
Email Text PDF Name Specifies the name for the generated PDF file. It can contain placeholders, the default is [InvoiceDate]_[InvoiceNo]_[AccountName].pdf.
Attach Files To Outgoing Email (checkbox) Controls whether attached files are included in any outgoing email.
Email File Types Defines which file types will be attached to emails (comma separated list of file extensions). For example, pdf,csv sends all PDF and CSV files; if empty (default), all files files are attached except for transaction table HTMLs.
Email Sender Defines an email sender address. Note that this address must be available as an organization-wide email address.
Email Subject Defines the default email subject. Can include placeholders, like Invoice: [InvoiceNo] (default).
Email Body Defines the plain text (or HTML source code) body for the email. Can include placeholders, and line breaks are considered.
Make sure that the email text includes the placeholder [PaymentPageURL|no-persist] for the recipients to be able to access the payment page of JustOn Cash Management
Email HTML Body Defines a rich HTML body text for the email. The editing area of this field includes an inline HTML editor.
Must not include HTML source code. If you want to use HTML source code for preparing the email body, you use the field Email Body.
Make sure that the email text includes the placeholder [PaymentPageURL|no-persist] for the recipients to be able to access the payment page of JustOn Cash Management

Be aware of the following specifics:

  • Email Body is ignored if there is content in Email HTML Body.
  • You must use either Email Body or Email HTML Body in both the template and its associated template details.
  • Email HTML Body must not include HTML source code. If you want to use HTML source code for preparing the email body, you use the field Email Body.

To edit the email contents:

  1. Open the template or template detail to be edited.
  2. Click Edit.
  3. In the Email Text section, modify the fields as required.
  4. Click Save.
Specifying counter

Invoices, credits, cancellations and dunnings must have unique numbers to comply with legal regulations. In Draft status, these numbers are temporary and of no legal relevance. When setting them to Open, however, JustOn creates the unique and unalterable numbers for invoices, credits, cancellations and dunnings based on defined counters. For details, see Counters and Number Ranges.

Customizing templates therefore involves specifying the counter to be used. To do so:

  1. Open the template or template detail to be edited.
  2. In the Information section, double-click the Counter field and specify the counter as required.

    Alternatively, you can click Edit in the detail view to edit the field.

  3. Click Save.

Counters defined on templates overwrite counters defined for business entities.

Additional options

Additional options for configuring templates include:

For details, see Working With Templates.

Next steps:

Step 4: Modeling Billing and Invoicing
Step 5: Invoice Run
Step 6: Finalization
Step 7: Accounting Support

Step 4: Modeling Billing and Invoicing

howto_config_step4

Generally, your business model and the nature of your products determine how to set up the billing engine of JustOn Billing & Invoice Management:

If you want to bill recurring items, usage data, etc. on a contractual, regular basis, we recommend to create subscriptions and, consequently, to produce invoices based on them.

IR_model_subscr

For details, see Contract-Based Recurring Billing.

If you sell one-time products, however, you do not need subscriptions – you can directly create invoices from arbitrary objects using the generic invoice run.

IR_model_GIR

For details, see One-Time Sales: Generic Invoice Run.

Contract-Based Recurring Billing

Many business models base on contracts that allow the periodic use or access to a product or service and have customers pay a recurring price – examples include media publishers, phone companies, internet providers, software manufacturers.

Enter subscriptions: vendors use them to combine the contracted conditions – products, prices, terms, renewals, etc. In this sense, subscriptions make up the billing plans for contracts.

Subscriptions

JustOn implements subscriptions using a dedicated object that represents the periodic billing plan for a contracted product use. See the subscription as a "blueprint" for the future invoice: It combines the account information (buyer name, address, etc.) with the details of the products to be charged, like product name and description, price, price model, applicable discounts, etc.

IR_sub
Creating invoices from subscriptions

The regular, subscription invoice run is always active. That is, JustOn creates draft invoices from all subscriptions within the scope. To limit the scope of subscriptions that are subject to an invoice run, you use subscription filters.

Automatic subscription build

Automatic subscription building helps managing subscriptions if your business requires to deal with a large or variable – read: increasing – number of subscriptions.

alt text

The way to set up the subscription builder depends on the nature of your products, your sales use cases and the representation of your source data in Salesforce:

Typical Situation

The way to set up the subscription builder depends on the nature of your products, your sales use cases and the representation of your source data in Salesforce.

Used to bill an account-specific set of products under some account-specific conditions

To allow for individually configured items when building subscriptions, you can use objects that are in a parent-child relationship, like orders with order products. If set up accordingly, the subscription builder takes the parent object ( order) to produce the subscription, and the child objects ( order products) to produce the subscription items.

subscr_build_ON_field_no_ptiers
Building subscriptions based on accordingly configured objects

Used to bill identical products on equal conditions to multiple accounts

A master subscriptions is a subscription "model" that is copied for each target. The target is the object whose records are the basis for subscriptions, like accounts, contracts, cases, quotes, etc. If set up accordingly, the subscription builder can generate an individual subscription for each new account, contract, case, quote, etc. that you create.

subscr_build_master_subscr
Building subscriptions based on a master subscription

Configuring Automatic Subscription Build

The subscription builder requires a number of ON fields on the source objects as well as a subscription build filter. Building subscriptions based on master subscriptions requires, in addition, the master subscription.

The typical configuration tasks include:

Configuring parent object
  1. Navigate to the fields list of the parent object.
  2. Create the following new fields.

    API Name Data Type Description
    ON_Account Formula (Text) Specifies the Salesforce account ID or external ID.
    The formula uses the API name of the field that links the object to the account, for example, AccountId.
    ON_Subscription Lookup (Subscription) Links to the related subscription.
    With Salesforce CPQ installed, make sure to relate to the correct Subscription object. For details, see this article.
    ON_SubscriptionBuildError Text (255) Shows the error message in case the subscription creation has failed.
    ON_CurrencyIsoCode Formula (Text) Sets the subscription currency to the source object currency if
    a) you use multiple currencies and
    b) the account currency differs from the source object currency.
    The formula is TEXT(CurrencyIsoCode).

Depending on your use case and its requirements, you can add more fields to have them copied to the generated subscriptions, for example, ON_StartDate. For details, see ON Fields on Objects. For an overview of typically used fields, see Best Practice: Subscription Builder Source Data.

Configuring child object
  1. Navigate to the fields list of the child object.
  2. Create the following new fields.

    API Name Data Type Description
    ON_OrderNo Formula (Text) Key to match source data to a subscription item, must be unique for each detail of the same master.
    ON_Price Formula (Currency) The net sales price of the item, required if the detail object is defined in a subscription build filter.
    ON_Quantity Formula (Number) The quantity of the item to be invoiced, required if the detail object is defined in a subscription build filter.
    ON_Title Formula (Text) The name or title of the item, required if the detail object is defined in a subscription build filter.

Depending on your use case and its requirements, you can add more fields to have them copied to the generated subscription items. For details, see ON Fields on Objects. For an overview of typically used fields, see Best Practice: Subscription Builder Source Data.

Creating master subscription and items

Basically, a master subscription is a usual subscription that is not assigned to an account. That is, you just create a subscription, add all items and define any required conditions to be cloned, but do not assign it to an account.

  1. Open the Subscriptions tab.
  2. Click New.
  3. Specify the details as required.

    Do not assign the subscription to an account. The field Account may be set as required, however. In this case, navigate to the Subscription page layout, open the field properties for the Account field and deselect the Required checkbox.

    The subscription name will be used as an input parameter when configuring the target object. JustOn recommends to prefix the master subscription name with MASTER.

  4. Click Save.

    For details, see Creating Subscriptions.

  5. In the Items section of the new subscription, click New.

  6. Specify the details as required.

    Mandatory parameters include

    • Title
    • Billing Type: Recurring, One-Time or Transactional, see General Billing Settings
    • Order No.: Key to match source data to a subscription item
  7. Click Save.

    This generates the new item. Repeat this step for every item to be cloned.

    For details, see Adding Items.

Configuring target object
  1. Navigate to the fields list of the target object.
  2. Create the following new fields.

    API Name Data Type Description
    ON_Account Formula (Text) Specifies the Salesforce account ID or external ID.
    The formula uses the API name of the field that links the object to the account, for example, AccountId.
    ON_Subscription Lookup (Subscription) Links to the related subscription.
    With Salesforce CPQ installed, make sure to relate to the correct Subscription object. For details, see this article.
    ON_SubscriptionBuildError Text (255) Shows the error message in case the subscription creation has failed.
    ON_MasterSubscription Text (255)
    or
    Formula
    Specifies the name of the master subscription (which serves as a template and will be cloned).
    If configured as a formula field, the master subscription name is used for every record.

Depending on your use case and its requirements, you can add more fields to have them copied to the generated subscriptions, for example, ON_StartDate. For details, see ON Fields on Objects. For an overview of typically used fields, see Best Practice: Subscription Builder Source Data.

Creating subscription build filter

To define which objects and records to include in the subscription build process, you create a new custom filter.

The subscription build job always processes all available subscription build filters. Be aware that this may, consequently, produce multiple subscriptions for an account.

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

  3. Create the following filter for the subscription build.

    Field Required Description Example Value
    Name Specifies the filter name, will be available as an option picklist value when triggering the operation
    Target Specifies the API name of the target object Order
    Opportunity
    MyObject__c
    Child Relation () Specifies the name of the child object ( plural form). Required if you create items based on the child records.
    For master-detail relations, use the API name of the detail object. In case of standard Salesforce objects, you can use Workbench to find the correct name.
    For lookup relations, use the relationship name of the child object.
    OrderItems
    CO_Order_Line_Items__r
    Subchild Relation () Specifies the name of the subchild object. Required if you create item price tiers based on custom subchild records.
    For master-detail relations, use the API name of the detail object.
    For lookup relations, use the relationship name of the child object.
    CO_Price_Tiers__r
    Use Case Specifies the filter use case, must be SubscriptionBuilder SubscriptionBuilder
    Condition Specifies a condition expression as used in an SOQL WHERE clause to restrict the set of included records
    For details, see SOQL WHERE clause in the Salesforce Help.
    Starting with JustOn 2.74, the SOQL expressions in filter conditions must not contain line breaks.
    Status = 'Activated'

    For help about creating filters, see Filters.

Enabling subscription generation

Once set up, there are various ways to invoke the subscription building process:

Next steps:

Step 5: Invoice Run
Step 6: Finalization
Step 7: Accounting Support

One-Time Sales: Generic Invoice Run

You can create invoices from arbitrary objects that are configured accordingly. Using the generic invoice run, you can completely bypass subscriptions – if you do not need them to model any contractual relations or conditions.

To this end, JustOn allows for configuring virtually any Salesforce object ( except for Line Item Schedule) to hold the required invoicing data. This may include orders, contracts, opportunities or custom objects. Using custom filters, you then define which objects and records to include in the invoice run.

IR_gen
Creating invoices from arbitrary objects

Typical Situation

The way to set up the generic invoice run depends on the representation of your source data in Salesforce.

Assume the following scenario as an example: You have integrated Salesforce with your back-end or marketplace system. In this environment, there are generated orders, typically with multiple order products. These order products now need to be invoiced without any contractual situation.

Following the example, your source data may be stored in objects that are in a parent-child relationship, like orders and order products. In this case, you set up these objects to hold the invoicing data using the ON field mechanism. JustOn can then produce the invoices based on the parent object and the invoice line items out of its child objects.

ir_ON_field
Creating invoices based on accordingly configured parent-child objects

Configuring Generic Invoice Run

The invoicing process requires a number of ON fields on both the parent and the corresponding child object as well as an invoice run filter. The typical configuration steps include:

Configuring the parent object
  1. Navigate to the fields list of the parent object.
  2. Create the following mandatory fields.

    API Name Data Type Description
    ON_Account Formula (Text) Specifies the Salesforce account ID or external ID.
    The formula uses the API name of the field that links the object to the account, for example, AccountId.
    ON_Template Formula (Text) Specifies the Salesforce ID or name of the related template.
    The formula can return a dedicated template according to specific criteria – target region, business entity, product group, etc.
    ON_ServiceDate Formula (Date)
    Formula (Date/Time)
    The record will be invoiced when the date is null or within the service period of the invoice run.
    The formula return type depends on the source field.
    ON_Invoice Lookup (Invoice) The invoice that resulted from this record.
    If the produced invoice is canceled, the object records become subject to the invoice run again.
    ON_LastInvoiceRun Lookup (Invoice Run) Shows the last invoice run that has processed this object.
    ON_InvoiceBuildError Text (255) Shows errors that occurred during the last invoice run.

According to your actual requirements, you may have to create additional fields. For details, see Configuring Parent Object.

Configuring the child object
  1. Navigate to the fields list of the child object.
  2. Create the following mandatory fields.

    API Name Data Type Description
    ON_Title Formula (Text) The name or short description of the invoice line item.
    ON_Quantity Formula (Number) The quantity to be billed for this invoice line item.
    Using a formula, you can, if required, set the quantity 0 to exclude records from being invoiced if certain conditions are true.
    Assume, for example, a checkbox Billable - to exclude records where the checkbox is not selected, you can use a formula like: IF(Billable = 'false', 0 , Quantity)
    ON_UnitPrice Formula (Currency) Either the net or gross price of one unit of this item.

According to your actual requirements, you may have to create additional fields. For details, see Configuring Child Object.

Creating the invoice run filter

To define which records to include in the invoice run, you create a custom filter.

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

  3. Create the filter as required.

    Field Description Example Value
    Name Specifies the filter name, will be available as an option value when triggering the operation. Must be unique. Orders
    Target Specifies the API name of the target object.
    For JustOn objects, do not append the namespace prefix ONB2__ when specifying the target.
    Order
    Child Relation Specifies the name of the child object ( plural form).
    For master-detail relations, use the API name of the detail object. In case of standard Salesforce objects, you can use Workbench to find the correct name.
    For parent-child relations, use the relationship name of the child object.
    OrderItems
    Use Case Specifies the specific filter use case. Generic

According to your actual requirements, you may have to set additional filter fields. For details, see Creating Invoice Run Filter and Filters Information.

Additional options

Additional options for setting up the generic invoice run include:

Next steps:

Step 5: Invoice Run
Step 6: Finalization
Step 7: Accounting Support

Step 5: Invoice Run

howto_config_step5

The invoice run is the core concept of JustOn Billing & Invoice Management: it is the operation that creates invoices based on your configured source data, which may include

There are two ways to trigger an invoice run:

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

For details, see Invoice Run.

Executing an invoice run
  1. Open the Invoice Runs tab.
  2. Click New.
  3. Specify the configuration details as necessary.

    • Period Start/Period End: Specifies the period for the invoice run.
    • Invoice Date: Specifies the date of issue for all invoices. If left empty, JustOn uses the current date.
  4. Select the invoice run filter as required.

    To limit the scope of subscriptions that are subject to an invoice run, you can use subscription filters. Subscription filters are presented as radio buttons. If there is one subscription filter, it is always selected. If there are multiple subscription filters, you are prompted to select one of them for the invoice run.

    To define which records to include in the invoice run, select one or more generic filters, as described in Configuring Generic Invoice Run. Generic filters are presented as checkboxes. You can select multiple (or no) generic filters.

  5. Click Start.

    This creates draft invoices from all subscriptions that are set Active and that are associated with an active account, as well as from all objects that match the criteria of the selected filters.

For details on scheduling the invoice run, see Scheduling Invoice Run.

Next steps:

Step 6: Finalization
Step 7: Accounting Support

Step 6: Finalization

howto_config_step6

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

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.

Invoice finalization steps

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.

Manually finalizing invoices

To finalize a single invoice individually from its detail view:

  1. Navigate to the Invoices list in the invoice run view or open the Invoices tab.
  2. Click the invoice number to open the invoice's detail view.
  3. Click Finalize.

    This launches a screen flow for the finalization.

    Users who finalize single invoices individually from their detail view must be allowed to execute flows via a permission set or a profile (see Enabling Access for New Users).

  4. Click Finalize to confirm and start the operation.

    This executes the finalization process, setting the status Open for the current invoice and generating the corresponding PDF document. Find the produced file on Salesforce's Files tab in the group Owned by me, if not configured otherwise (see File Distribution).

    The screen flow shows the operation progress. After completion, clicking Close & Refresh returns you to the updated detail view of the current invoice.

To finalize invoices from the invoice list view:

  1. Navigate to the Invoices list in the invoice run view, or open the Invoices tab and select an appropriate list view.

    The list view Recently Viewed does not display the Finalize button.

  2. On the Invoices tab, select the checkboxes next to the invoices you want to finalize, or leave all checkboxes unmarked to include all listed invoices.

  3. Click to open the action menu, then select Finalize.
  4. Click Continue to confirm and complete the operation.

    Depending on your selection, this sets the status Open for the selected or all invoices and generates the corresponding PDF documents.

Automatically finalizing invoices

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

For details, see

Next steps:

Step 7: Accounting Support

Step 7: Accounting Support

howto_config_step7

JustOn Billing & Invoice Management allows for writing bookkeeping data for revenues and taxes from finalized invoices as well as for payment balances. These records can then be transferred to accounting systems like DATEV, SAP or Microsoft Dynamics.

Booking Account Allocation

Accounting systems allocate booking data to dedicated bookkeeping accounts. To facilitate the initial account allocation, JustOn supports various mechanisms to assign account numbers to booking details.

G/L account or center

Accounting systems usually assign generated revenues to general ledger accounts (G/L accounts, structures that record value movements in defined contexts) or cost centers or profit centers (business subdivisions to which costs or profits are allocated). To support these assignments, JustOn can add G/L account or center information to invoice line items. When generating the bookkeeping data, this information is then populated to the booking details accordingly.

Contra account

In double-entry bookkeeping, every entry to an account requires a corresponding opposite entry to a contra account (also known as offsetting account), which is credited to offset a debit or debited to offset a credit. To support this scenario, JustOn can set the contra account number in the Booking Detail field Business Partner Account Number. In this context, the business partner represents a debtor or creditor, and hence, the contra account.

The way to set Business Partner Account Number depends on your business use cases:

  • For customer-specific debtor numbers, you use the optional Account field ON_DebtorNo.
  • To support collective debtors, you use the optional Invoice field DebtorNo.

When creating booking details, the Invoice field DebtorNo takes precedence over the Account field ON_DebtorNo. If the Invoice field DebtorNo is empty or does not exist, JustOn uses the Account field ON_DebtorNo to set Business Partner Account Number in the booking detail.

Collective account

Depending on your business processes, you may create specific bookkeeping data that is not assigned to a revenue-related G/L account. Accounting systems, however, still require an account number. To handle these scenarios, you can use collective accounts. They define account numbers for booking details without dedicated account numbers – primarily, for taxes or deferred revenues, but also for other use cases like payment bookkeeping data.

Typical Situation

As always, the way to set up your booking accounts may vary considerably. For a start, however, the following basic setup can cover the minimum requirements:

Booking Account Booking Detail Field Configuration Example Value
Revenues G/L Account Number G/L account 8400
Taxes G/L Account Number Collective account 1776
Receivables/Debtors Business Partner Account Number Contra account 11400
Bank G/L Account Number Collective account 1200

Configuring Account Allocation

Configuring the accounts for the outlined approach involves:

G/L account rule for revenues
  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 Assignment Rules - G/L Account.

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

    Following the example, the mandatory information includes:

    • Name
    • G/L Account (8400)
    • Matching rule criteria according to your use case, like Product Group, Tax Rule or Tax Code

    g-l_acc_edit
    Creating G/L account assignment rule based on product group and business entity

  5. Click Save.

    This creates the new G/L account assignment rule. Consequently, JustOn will assign the G/L account to the invoice line item based on your criteria (fields and values to match).

For details, see Assignment Rules - G/L Account.

Collective account for taxes
  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 Collective Accounts.

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

    Following the example, the mandatory information includes:

    • Name
    • Account (1776)
    • Business Partner Account (11400)
    • Matching rule criteria according to your use case, at least Type (Tax)

    coll_acc_tax
    Creating booking account setting for taxes

  5. Click Save.

    This creates the new collective account setting. Consequently, JustOn will assign the specified account number to the booking details of the type Tax.

For details, see Collective Accounts.

Contra account for receivables/debtors

For customer-specific debtor numbers, you use the Account field ON_DebtorNo.

  1. Navigate to the fields list of the Account object.
  2. Create the following new field.

    API Name Data Type Description Example Value
    ON_DebtorNo Text (255)
    or
    Formula
    Specifies the contra account number for booking details. If configured as a formula, it can determine the value based on other fields. 11400

To support collective debtors, you use the Invoice field DebtorNo.

  1. Navigate to the fields list of the Invoice object.
  2. Create the following new field.

    API Name Data Type Description Example Value
    DebtorNo Text (255)
    or
    Formula
    Specifies the contra account number for booking details. If configured as a formula, it can determine the value based on other fields. 11400

For details, see Enabling Contra Accounts.

Collective account for payments
  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 Collective Accounts.

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

    Following the example, the mandatory information includes:

    • Name
    • Account (1200)
    • Business Partner Account (11400)
    • Matching rule criteria according to your use case, at least Type (Payment)

    coll_acc_bank
    Creating booking account setting for payments

  5. Click Save.

    This creates the new collective account setting. Consequently, JustOn will assign the specified account number to the booking details of the type Payment.

For details, see Collective Accounts.

Example scenario

This example invoice is the base for the accounting scenarios below:

Pos. Title Tax Rate Net Price
1 Some Goods 19% 1000
Subtotal Net 1000
Tax Amount 190
Grand Total 1190

Now assume these use cases:

(1) The business issues the invoice.

(2) The customer pays the invoice, the business receives the payment.

Expected posting records
From an accounting perspective, these uses cases make the following posting records:
# Debit to Account Amount Credit to Account
1 Trade Receivables (Debtors) 1190,00 €
1000,00 € Revenues
190,00 € Taxes
2 Bank 1190,00 €
1190,00 € Trade Receivables (Debtors)
Expected account bookings
With respect to the individual accounts, the example produces the following bookings:
Receivables (Debtors)
Debit Credit
1190,00 €
1190,00 €

Revenues

Debit Credit
1000,00 €

Taxes

Debit Credit
190,00 €

Bank

Debit Credit
1190,00 €

The common method to handle revenues is to split the net amount from the taxes and to book them to separate accounts. This is why JustOn creates two booking details from the invoice data by default: one for the net revenue, and one for the taxes. A third booking detail is created when the payment is registered.

Produced booking details
According to the example, JustOn creates three booking details:
# Amount Debit/Credit Flag Account Contra Account
1 1000,00 H (Credit) Revenues
G/L Account Number 8400
Trade Receivables (Debtors)
Business Partner Account Number 11400
2 190,00 H (Credit) Taxes
G/L Account Number 1776
Trade Receivables (Debtors)
Business Partner Account Number 11400
3 -1190,00 S (Debit) Bank
G/L Account Number 1200
Trade Receivables (Debtors)
Business Partner Account Number 11400