Dunning is the process of methodically communicating with customers to ensure the collection of accounts receivable. It is a formalized notification process to follow up and collect the money owed by the customer. You can send multiple reminders to the customer with different email templates depending on your organization's dunning policy. For example, you can set a Dunning Policy which will auto send 3 emails to your customer if they missed the Invoice Due Date. You can also include the invoice PDF in your email.
Dunning Policy batch job can be scheduled to run on daily basis. It scans all the invoices present in your Salesforce Org to identify the invoices that qualify for dunning process.
An invoice is picked for dunning policy if it fulfills all the three condition:
- Invoice Due Date is less than system date
- Payment status of the invoice is unpaid or partially paid
- The invoice is approved
Setting up a Dunning Policy
- From the Billing Console, Click Dunning Policies under Invoices.
- Click New.
Enter Values for the following fields.
Fields Description Dunning Policy Name Name of your Dunning Policy No. of Reminders The number of email reminders to send if the payment is delayed. Active Whether the Dunning Policy is Active or not. By default, it is set to true. Default Select the checkbox to make it the default dunning policy.
- Click Next.Based on the number of Reminders, Dunning Policy Line Items are created.
Enter values for the following fields:
Field Description Dunning Policy Line Item Name The name of the Dunning Policy Line Item Interval Value A numerical value depicting the number of days. For the first dunning line item policy, it is the numbers of days to wait before the first email reminder. For the remaining dunning policy line items, it is the number of days to the wait between each reminder or the number of days to wait after the Invoice Due Date. Interval Type Select Day(s) from the picklist. Base Line
The baseline for sending the reminder emails. You can select from the following values:
- From Invoice Due Date: Email reminder is sent when the system date crosses the invoice due date by the number of days mentioned in the interval value.
- From Previous Reminder: This value is not supported for the first dunning policy line item. An email reminder is sent when the system date crosses the previous reminder date by the number of days mentioned in the interval value.
Email Template The API name of the email template. For more details on Dunning Invoice Email Templates, refer to Dunning Policy Templates. Attach Invoice PDF Select this check box to attach the invoice in a PDF format in the reminder email.
- Click Save.
Scheduling the Dunning Policy Batch Job
You can schedule the Dunning Policy Batch Job to runs daily.
To schedule the Dunning Policy Batch Job,
- Go to Setup → Apex Classes.
- Click Schedule Apex.
- Enter a Job Name and Select DunningPolicyExecutionSchedular from the Apex Class lookup.
- Set Weekly frequency and select all days to run the dunning policy daily.
- Enter Start Date, End Date and Preferred Start Time.
- Click Save.
Your dunning policy is now scheduled to run daily.
To manually run the dunning policy batch job, execute the following apex code from your developer console:
Apttus_Billing.DunningPolicyExecutionBatchJob obj = new Apttus_Billing.DunningPolicyExecutionBatchJob(); database.executeBatch(obj);
Associating a Dunning Policy
The administrator can create a dunning policy and mark it as default. This default dunning policy will be used for all customer accounts and account locations.
Users can also override the Dunning Policy on the Account or Account Location. If dunning policies associated with the Account and Account Location are different, the dunning policy set at the Account Location takes precedence. If dunning policy is not associated with the account or account location, then the default dunning policy is used.
You can also exclude a specific account or an account location from dunning notifications. To disable dunning for a specific account or an account location, select Exclude from Dunning field on the account or account location object.
Dunning Reminder Log
Each time a dunning notification is sent to a customer, an entry is created in the Dunning Reminder Log object.
Dunning Reminder Log captures the following information:
- Dunning Reminder Log Id
- Reminder Sequence
- Reminder Date
- Link to the Invoice
- Link to the Dunning Policy Line Item