action.skip

Setting Up Balance Management Options

JustOn creates balances for invoices, credits, payments, refunds, dunning fees, etc. Setting up balance management options involves the following tasks:

Enabling Balance Overpayment

In order to enable balance overpayment, the feature has to be activated in the global settings.

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

  3. Click Edit in the Default row.
  4. Select the checkbox Allow Overpayments.
  5. Click Save.

Enabling Automatic Write-Off

Write-off is an accounting procedure for reducing or completely removing the value of an asset or receivable – for example, an uncollectible payment for an invoice.

JustOn supports writing off invoices using specific balances that count against the invoice balance.

In order to enable the automatic write-off, the feature has to be activated in the global settings.

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

  3. Click Edit in the Default row.
  4. Specify the write-off settings as required.

    The following global settings control the behavior of the automatic write off:

    Field Type Description
    Write-Off Threshold Percent (13,5) Defines a percentage for the threshold that triggers the automatic creation of a write-off balance when a payment is registered.
    Write-Off Cap Amount Number (13,5) Defines an amount for the threshold that triggers the automatic creation of a write-off balance when a payment is registered.
    Requires Write-Off Currency to be set.
    Finalization Write-Off Amount Number (13,5) Defines an amount for the threshold that triggers the automatic creation of a write-off balance when an invoice is finalized.
    Requires Write-Off Currency to be set.
    Write-Off Currency Text (3) Specifies the ISO code of the currency to be used for a threshold amount.

    Info

    For creating write-off balances after payment, you can combine the percentage and the absolute amount. In this case, JustOn limits the calculated threshold to the specified amount.

    Creating write-off balances on finalization supports absolute amounts only.

  5. Click Save.

Modifying Write-Off Reasons

Depending on your business requirements, you may have to modify the reasons for the (manual) write-off. To this end, you edit the value picklist for the Write-Off Reason field of the Balance object.

  1. Navigate to the Write-Off Reason field of the Balance object.
  2. In the Values section, modify the picklist values as necessary.

    • To create a new value, click New.
    • To edit an existing value, click Edit in the row of the value to be edited.

    Note

    Do not modify the picklist values Missing amount below threshold and Invoice below threshold because JustOn uses them when automatically creating write-off balances.

  3. Specify the details as required, then click Save.

  4. To delete a value, click Del in the row of the value to be removed, and confirm the operation.

Configuring Balance Table on Invoices

With an existing invoice balance, JustOn automatically prints the balance to the invoice PDF.

Balance Table Concepts

An existing balance on the invoice usually alters the payment amount – this is why the balance records are not printed as a separate table but as part of the invoice table between the invoice grand total and the final payment amount, like illustrated below:

Pos Title Quantity Tax Rate Unit Price Pos Total
1 Product 1 0,00% 25,00 25,00
Subtotal (net) 25,00
Tax (0,00%) 0,00
Grand Total 25,00
Prepayment 2017-03-02 -10,00
Payment Amount 15,00

There are two template fields that control the display of the corresponding balance information:

Template Field Description
Balance Columns Defines the columns for the balance table. The definition must be a list of balance field API names separated by semicolons. If BalanceTitle is used, the column will display the text defined in the field Balance Types.
The default definition is BalanceTitle;Date__c;Amount__c
Balance Types Specifies a mapping (in JSON notation) of the values defined in the Type field of the Balance object to the display text or, for locale-specific templates, the corresponding translation (which can include placeholders).
Types that are not specified in the mapping are not displayed on the invoice.

The default balance type mapping is

[ {
"type" : "Payment",
"title" : "Payment"
}, {
"type" : "Refund",
"title" : "Refund"
}, {
"type" : "Prepayment",
"title" : "Prepayment"
}, {
"type" : "Payout",
"title" : "Payout"
}, {
"type" : "Clearing",
"title" : "Clearing"
}, {
"type" : "Settlement",
"title" : "Settlement for Invoice [RelatedInvoiceNo]"
}, {
"type" : "Dunning Fee",
"title" : "Dunning Fee"
} ]

If you use locale-specific templates, you provide the balance title translations in the corresponding balance type mapping. In a template used for German-speaking customers, for example, the balance type mapping may look like

[ {
"type" : "Payment",
"title" : "Zahlung"
}, {
"type" : "Refund",
"title" : "Rückerstattung"
}, {
"type" : "Prepayment",
"title" : "Vorkasse"
}, {
"type" : "Payout",
"title" : "Auszahlung"
}, {
"type" : "Clearing",
"title" : "Auszifferung"
}, {
"type" : "Settlement",
"title" : "Ausgleich für [RelatedInvoiceNo]"
}, {
"type" : "Dunning Fee",
"title" : "Mahngebühr"
} ]

Modifying Balance Table Columns

Depending on your organization's requirements, you must add or remove columns or change their sequence.

  1. Open the template to be edited.
  2. In the Information section, double-click the Balance Columns field and specify the balance column configuration as required.

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

  3. Click Save.

Info

You can use any balance field. Note that the specified order defines the column sequence.

Modifying Balance Type Display

You can configure which balance types are to be displayed in the balance table and modify their display names.

  1. Open the template to be edited.
  2. In the Information section, double-click the Balance Types field and specify the balance type configuration as required.

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

  3. Click Save.

Hiding Balance Table

Depending on your business requirements, you may need to prevent the balance table from being printed. There are two ways to hide the balance table:

  • emptying the Balance Types field,
  • using a custom CSS rule.

Hiding Balance Table Clearing Balance Types

You can prevent the balance table from being printed, clearing the field contents. This takes advantage of the fact that balance types that are not specified in the Balance Types field are not displayed on the invoice.

  1. Open the template to be edited.
  2. In the Information section, double-click the Balance Types field and clear its contents.

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

  3. Click Save.

Hiding Balance Table Using CSS

Alternatively, you can apply a custom CSS rule that hides the balance table:

  1. Open the template to be edited.
  2. In the Layout & Design section, double-click the Custom CSS field and specify the following CSS code:

    tr.balances {
        display: none;
    }
    
  3. Click Save.

Scheduling Balance Assignment

You can set up a job in order to have balances automatically assigned to open invoices on a regular basis.

The balance assignment job does not require additional parameters. That is, you can set up the job directly for the corresponding batch chain AssignBalancesChain. For details, see Scheduling Concepts.

To schedule the balance assignment batch chain, you can use either JustOn's Scheduled Jobs page or Salesforce's Schedule Apex functionality. For details, see Scheduling a Job.

Via JustOn's Scheduled Jobs page:

  1. Open the Scheduled Jobs page.

    Use the following URL https://login.salesforce.com/apex/ONB2__JobsSetup, or, if you are already logged in, append apex/ONB2__JobsSetup to your org's domain name.

    As of JustOn 2.52, you can access the Scheduled Jobs page via the JustOn configuration app ( > JustOn Configuration > Jobs Setup).

  2. From the Apex Job drop-down list, select Batch Chain Job.

  3. In the Job Name field, specify AssignBalancesChain.
  4. From the Start Time drop-down list, select the preferred execution time.
  5. Optionally, edit the displayed cron expression to adjust the execution time.
  6. Click Schedule.

    This sets up the balance assignment to be executed at the specified time.

Info

From the Scheduled Jobs page, you can also run the batch chain immediately.

Via Salesforce's Schedule Apex functionality:

  1. Click to enter Setup, then open Apex Classes.

    In Salesforce Lightning, navigate to Custom Code > Apex Classes.

    In Salesforce Classic, navigate to Develop > Apex Classes.

  2. Click Schedule Apex on top of the list.

  3. Specify the details as required.

    • Job Name: AssignBalancesChain
    • Apex Class: ScheduledBatchChain
    • Frequency: Weekly or Monthly (with an according weekday or day of month setting)
    • Start
    • End
    • Preferred Start Time
  4. Click Save.

    This sets up the balance assignment to be executed at the specified time.

For more details about job scheduling, see Scheduling a Job in the JustOn documentation and Schedule Apex in the Salesforce Help.

Enabling Balance Tab Access

JustOn 2.61 has introduced the tab Balances. If you have upgraded JustOn from an earlier version, you must specifically allow accessing the new tab.

  1. Open the permission set for which you want to allow access to the Balances tab.
  2. Click Object Settings > Balances > Edit.
  3. In the Tab Settings section, select Available and Visible as intended.
  4. Click Save.

    For details, see View and Edit Tab Settings in Permission Sets and Profiles in the Salesforce Help.

Enabling Balance Export

Your business may require to export SEPA Credit orders for account balances that are not assigned to invoices.

SEPA XML export

Your organization's business may want to export bank transfer orders for invoices or account balances – a common means for collecting payments. These payment orders can then directly be used by banks for triggering the corresponding payment operations.

JustOn supports two common implementations of (interchangeable) bank transfer orders:

For open invoices whose payment method is SEPA, you use the invoice export mechanism to produce SEPA XML files for debits or credits (depending on whether the invoice states a positive or a negative amount).

Invoice export history

In addition to the actual export file (CSV or SEPA XML, according to the applied export setting), the export operation produces an Invoice Export History record for each exported invoice. The history holds the following information:

  • Export time
  • Effective payment due date (for installment invoices)
  • File name and link to the exported file
  • Flag stating whether a payment balance has been created
  • Flag that controls whether to prevent repeated exports
  • Flag stating whether an invoice has been exported more than once (forced export)

    The Times Exported field on the invoice shows the export count.

You can also export SEPA Credit orders from account balances of the types Payment or Prepayment that are not assigned to an invoice. When exporting account balances, the exported balances as well as generated reverse balances (if set up to do so) are locked. Locked balances are exempt from certain business processes like (further) exports or automatic balance assignment.

Info

Generally, JustOn recommends to export SEPA bank transfer orders on a regular base.

Enabling this functionality involves these tasks:

Info

For information about configuring the SEPA XML export, see Configuring SEPA Credit Export.

Enabling Balance List Display

You enable the display of related balance records on the account detail page using Salesforce's related list functionality (see Work with Related Lists on Records in the Salesforce Help).

  1. Navigate to the object management settings of the Account object.
  2. Click Page Layouts.
  3. In the Account Layout row, click to open the action menu, then select Edit.
  4. Select the Related Lists palette.
  5. Drag the Balances list to the Related Lists section.
  6. Click Save to save the modified page layout.

    This displays the related balance records on the account detail page.

Adding Export Button

To add the Export button the Balances related list:

  1. Navigate to the object management settings of the Account object.
  2. Click Page Layouts.
  3. In the Account Layout row, click to open the action menu, then select Edit.
  4. Scroll to the Balances list in the Related Lists section, and click to open the list properties.
  5. Open the Buttons section.
  6. Under Custom Buttons, move Export to the Selected Buttons column.

    rel_list_prop
    Adding a custom button to a related list

  7. Click OK to save the list properties.

  8. Click Save to save the modified page layout.

    This makes the Export button available on the Balances related list of the account.

Enabling Custom Collective Account Rule

Collective accounts

Depending on your business processes, you may create specific invoice bookkeeping data, payment bookkeeping data or subscription bookkeeping data that are not assigned to a revenue-related G/L account. Accounting systems like DATEV or SAP, 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.

By default, JustOn determines the best matching collective account based on available criteria like Business Entity, Payment Provider, etc. (see Collective Account Concepts). In addition, you can use a custom rule, which takes precedence over other criteria. To this end, you create the custom formula field CollectiveAccountRule__c on the Balance object. This way, you can apply certain logic to determine the criterion by which a collective account is associated to a balance and, consequently, to the exported booking detail.

  1. Navigate to the fields list of the Balance object.
  2. Create the following new field as required.

    Field API Name Data Type Description
    CollectiveAccountRule Formula (Text) Determines the criterion by which a collective account is associated to a balance.

    For help about creating fields, see Managing Object Fields.

Enabling Payment Balance Collection

JustOn Billing & Invoice Management supports collecting out-of-statute payments by creating write-off balances.

Depending on your intended use cases, you enable your users to invoke the payment balance collection from the relevant user interface. That is, you add the Collect button to

Adding Collect Button to Balance Detail View

To enable the collection of individual payment balances, you add the Collect button to the Balance detail view. To do so:

  1. Navigate to the object management settings of the Balance object.
  2. Click Page Layouts.
  3. In the Balance Layout row, click to open the action menu, then select Edit.
  4. Add the Collect button to the page layout.

    In Salesforce Lightning, drag the button from the Mobile & Lightning Actions palette to the Salesforce Mobile and Lightning Experience Actions section.

    In Salesforce Classic, drag the button from the Buttons palette to the Custom Buttons area.

  5. Click Save to save the modified page layout.

    This makes the Collect button available on the Balance detail view to collect individual payments.

Adding Collect Button to Balances List View

To enable the collection of multiple payment balances, you add the Collect button to the Balances list view. To do so:

  1. Navigate to the object management settings of the Balance object.
  2. Click List View Button Layout.
  3. In the List View row, click to open the action menu, then select Edit.
  4. Under Custom Buttons, move Collect to the Selected Buttons column.

    rel_list_prop
    Adding a custom button to a related list

  5. Click Save to save the modified page layout.

    This makes the Collect button available on the Balances list view to collect multiple payments at once.

Note

Make sure to also create a dedicated filtered balances list view that shows the relevant records. Relevant balance records must

  • relate to the same business entity,
  • be of the types Payment or Prepayment,
  • not be related to invoices,
  • not be locked,
  • have passed the statute of limitations applicable in your jurisdiction.

For details on creating a custom list view, see Create or Clone a List View in the Salesforce Help.

To enable the collection of payment balances from their account context, you add the Collect button to the Balances related list on the Account detail view.

You enable the display of related balance records on the account detail page using Salesforce's related list functionality (see Work with Related Lists on Records in the Salesforce Help).

  1. Navigate to the object management settings of the Account object.
  2. Click Page Layouts.
  3. In the Account Layout row, click to open the action menu, then select Edit.
  4. Select the Related Lists palette.
  5. Drag the Balances list to the Related Lists section.
  6. Click Save to save the modified page layout.

    This displays the related balance records on the account detail page.

Adding Collect Button

To add the Collect button the Balances related list:

  1. Navigate to the object management settings of the Account object.
  2. Click Page Layouts.
  3. In the Account Layout row, click to open the action menu, then select Edit.
  4. Scroll to the Balances list in the Related Lists section, and click to open the list properties.
  5. Open the Buttons section.
  6. Under Custom Buttons, move Collect to the Selected Buttons column.

    rel_list_prop
    Adding a custom button to a related list

  7. Click OK to save the list properties.

  8. Click Save to save the modified page layout.

    This makes the Collect button available on the Balances related list of the account.