Skip to content

Setting Up Dunning Process Management

To help tracking and claiming outstanding payments, JustOn supports dunning processes. With this respect, the following objects are important:

Dunnings represent the statements that document outstanding payments, based on which you generate dunning reminders to be sent out to the corresponding accounts. The object holds the relevant account data and payment information.

Dunning details represent the items to which the dunning refers. The object holds information about the invoices, the balances of an account and dunning fees. Dunning details are in a master-detail relationship to a dunning.

For more details, see the Dunning and Dunning Detail object references.

Setting up dunning processes involves the following tasks:

In addition, you can schedule the dunning run job to produce dunning reminders automatically at regular intervals.

Configuring Dunning Levels

Dunning levels control your dunning processes. They determine for which invoices, at what times and, optionally, at what costs you want to notify your customers about outstanding payments. Using multiple dunning levels you can build your individual dunning escalation scenario, which may progress from friendly reminders to firm warning letters.

Example dunning procedure using three dunning level configurations (First Reminder, Second Reminder, Final Reminder) with a fix dunning fee:

Dunning Characteristic First Reminder Second Reminder Final Reminder
friendly reminder about an outstanding payment firm reminder of the overdue amount, adding a late payment charge last request to pay before legal action is taken and the service is terminated
Grace Period 30 days 60 days 90 days
Dunning Fee 0,00 5,00 10,00

Info

If you apply fix dunning fees, JustOn recommends to include the corresponding information in the dunning detail table of templates for higher dunning levels.

Example dunning procedure using three dunning level configurations (First Reminder, Second Reminder, Final Reminder) with a percentage late fee:

Dunning Characteristic First Reminder Second Reminder Final Reminder
friendly reminder about an outstanding payment firm reminder of the overdue amount, adding a late payment charge last request to pay before legal action is taken and the service is terminated
Grace Period 30 days 60 days 90 days
Late Fee Rate 0% 2% 5%

Dunning Levels Information

JustOn implements dunning levels using the custom setting Dunning Levels. It includes the following information:

Label Type Description
Name Text (255) A unique name for the custom setting record.
Condition Text (255) A custom SOQL condition to determine to which invoices this dunning level applies. If empty, JustOn uses the following default condition:
DaysOverdue__c >= :gracePeriod AND (DunningLevel__c = null OR DunningLevel__c < :level)
Create Notification Tasks Text (255) If set, creates notification tasks. Specifies the object on which the task should be created. Allowed values include Dunning, Invoice, Account or empty. If empty, no task is created.
Dunning Due Number (3,0) The due terms of the dunning in days, defaults to zero if left empty.
This value is copied to the field Payment Due of the dunning.
Dunning Fee Currency (16,2) A fixed amount that is added to the dunning record as a separate dunning detail. Is always calculated without tax.
JustOn recommends to include the fix dunning fee information in the dunning detail table of templates for higher dunning levels.
You can define different dunning fees for various currencies. To do so, add the number field ON_DunningFee<CurrencyIsoCode> to the Dunning Levels custom setting, like ON_DunningFeeUSD.
Dunning Level Number (18,0) The dunning level determines which invoices are in the scope of this setting (see Condition).
Grace Period Number (18,0) The number of days after the invoice payment due.
Include Standard Condition Checkbox If checked, the resulting condition is a combination of the default condition and the one defined with the current dunning level.
Late Fee Rate Percent (3,3) Defines the monthly interest rate for calculating the late fees for invoices. Falls back to the late fee rate defined the Global Settings if not set. If neither is set, no late fee occurs.

Info

Both the dunning fee (fix amount per dunning level) and the late fee (calculated for the overdue invoice using the late fee rate) show up as balance records on the open invoice.

Creating Dunning Levels Configuration

To cover your (possibly complex) dunning process requirements, you may have to create different dunning level configurations.

  1. In Setup, 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 Dunning Levels.

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

    The mandatory information include Name and Dunning Level.

    For more details, see Dunning Levels Information.

  5. Click Save.

    This creates the dunning level configuration, making it immediately available for dunning runs or individual dunning reminders.

How to exclude accounts or invoices from the dunning run?

Your business may require to exclude specific accounts or specific invoices from being subject to the dunning process. Broadly speaking, this involves the following steps:

(1) Create a custom checkbox, like, for example, ON_PreventDunning, on the Account or Invoice object that defines whether to exclude (if true) a given record from the dunning run. Depending on your requirements, you can have this checkbox selected manually by a user, or automatically via a formula, for example, that can check a record for certain criteria and consequently select (or not select) this checkbox.

(2) In each dunning level configuration that you intend to apply, define a condition that evaluates this checkbox and consequently determines whether to exclude the current record:

ON_PreventDunning__c = false

Following the example, JustOn excludes an invoice from the dunning run if the checkbox is selected (true) and the condition therefore yields false.

Customizing Dunning Reminders

JustOn ships a default template detail Reminder, intended to overwrite certain template fields when generating dunning reminders and when printing them to PDF files.

Note

You need a separate dunning template detail for each dunning level configuration you set up. The name of a template detail must match the name of the corresponding dunning level setting.

Use the Reminder template detail as a model when creating your custom template details.

Customizing the template details for dunning reminders according to your organization's requirements usually involves:

Configuring Dunning Counter

Dunning reminders must have unique numbers to comply with legal regulations. When setting them to Closed, JustOn creates the unique and unalterable numbers for dunnings based on defined counters.

Your business may require an individual number pattern for dunning reminders, or even multiple ones for different dunning levels. In this case, you must configure the dunning counters and assign them to the corresponding template details.

  1. Create dunning counters as necessary.

    For details, see Creating New Counter.

  2. Open the template detail to be edited.

  3. In the Information section, double-click the Counter field and specify the counter to be used.
  4. Click Save.

Info

If there are no specific dunning counters configured and assigned to the corresponding dunning template details, JustOn uses the configured invoice counter for dunning reminders.

Adjusting Dunning Detail Table

The Table Columns field determines the contents of the dunning detail table on the printed dunning reminder. This field contains a list of dunning detail fields, separated by semicolon, which determines the visible table columns and their sequence.

The default setting in the Reminder template detail is:

PosNo;Title;PaymentDueDate;DaysOverdue;Amount;LateFee;DunningAmount

This produces the following dunning detail information:

  • Position number
  • Dunning detail title or short description
  • Original payment due date
  • Days overdue
  • Open amount
  • Included late fee
  • Dunning detail total

Depending on your organization's requirements, you must remove columns you do not need or add new columns. To do so:

  1. Open the template detail to be edited.
  2. In the Information section, double-click the Table Columns field and specify the information as required.
  3. Click Save.

Info

You can use any dunning detail field. Remember that the specified order defines the column sequence.

If your business applies fix dunning fees, JustOn recommends to show the dunning fees that have occurred in previous dunning levels. To this end, add the field Previous Fees to the table configuration in templates that you use for subsequent dunning levels:

PosNo;Title;GrandTotal;Amount;DaysOverdue;PreviousFees;LateFee;DunningAmount

This produces the following dunning detail information:

  • Position number
  • Dunning detail title or short description
  • Original invoice total
  • Open invoice amount (minus received payments)
  • Days overdue
  • Sum of previously occurred fixed dunning fees
  • Included late fee
  • Dunning detail total

Modifying Dunning Reminder Texts

Depending on your organization's requirements, you must modify the text building blocks for the dunning reminders.

  1. Open the template detail to be edited.
  2. Double-click the intended field and specify the corresponding text as required.

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

  3. Click Save.

Info

Repeat this step for each dunning level-specific template detail. Feel free to adjust the texts to the intended dunning escalation scenario (see Configuring Dunning Levels).

Separating or Combining Invoices

The dunning run combines invoices on one dunning reminder if the following criteria are met:

  • the invoices belong to the same account
  • the invoices use the same template
  • the invoices use the same currency
  • the invoices are subject to the same dunning level

Separating Invoices Based on Criteria

Certain uses cases require to distribute invoices to separate dunning reminders. To this end, add the custom formula field ON_DunningCriterion to the Invoice object, and use it to specify your separation criterion.

The following table lists example uses cases for the invoice separation and the corresponding configurations for the ON_DunningCriterion field.

Use Case Field Configuration Formula Value
Force an individual invoice per dunning Formula (Text) Name
Separate by subscription Formula (Text) Subscription__c
Separate by year Formula (Number) YEAR(Date__c)
  1. Navigate to the fields list of the Invoice object.
  2. Create the new field as required.

    For example configurations, see the table above.

    For help about creating fields, see Managing Object Fields.

Combining Invoices Based on Account-Specific Template

Usually, JustOn creates dunning reminders for each invoice template that an account uses. Thus, if a company (an account) uses different templates, they get as many dunning reminders as they use invoice templates. An account may, however, require to get a combined dunning reminder that includes all open invoices, irrespective of the template used.

To support this scenario, you add the custom field ON_DunningTemplate to the Account object. This field must specify the template to be used for dunning reminders - either by its name or its ID.

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

    API Name Data Type Description
    ON_DunningTemplate Text
    Formula (Text)
    Specifies the template by name or ID.

    For help about creating fields, see Managing Object Fields.

    Once set, this produces one dunning reminder for the account, even if the invoices are based on several templates.

Adding Custom Dunning Fields

Depending on your business requirements, you may need additional information on your dunning reminders. Using the ON field mechanism, you can copy any custom invoice fields to these targets.

Info

Remember that the names of the ON fields must match the names of the dunning fields.

Example custom fields to be copied:

Invoice ON Field Target Field (Dunning/Dunning Detail)
ON_SAPNumber SAPNumber
ON_CustomerNumber ON_CustomerNumber

Scheduling Dunning Run Job

If your business produces large numbers of invoices, you may require to start the dunning run automatically on a regular basis. To this end, you set up a corresponding job to produce dunning reminders at regular intervals.

Info

JustOn recommends to have the dunning run job executed after the payment entry import to avoid inapplicable dunning reminders.

Handling recommendations

Once the dunning run job is scheduled, it executes at the specified time, creating a new dunning run and new dunning reminders for all configured dunning levels.

Make sure to check the produced dunning reminders on a regular base, too. JustOn recommends to finish or delete new dunning reminders as soon as possible. There should be no draft dunning reminders left at the end of the job's execution interval.

The dunning run job does not require additional parameters. That is, you can set up the job directly for the corresponding Apex class ScheduledDunningRun. For details, see Scheduling Concepts.

To schedule the dunning run job, 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/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 (App Launcher > JustOn Configuration > Jobs Setup).

  2. From the Apex Job drop-down list, select Dunning Run Job.

    The Job Name field is automatically set to ScheduledDunningRun.

  3. From the Start Time drop-down list, select the preferred execution time.

  4. Optionally, edit the displayed cron expression to adjust the execution time.
  5. Click Schedule.

    This sets up the dunning reminder generation to be executed at the specified time.

Info

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

Via Salesforce's Schedule Apex functionality:

  1. In Setup, 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
    • Apex Class: ScheduledDunningRun
    • 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 dunning reminder generation 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.