Automatic invoice reminders
Who is this module for?
Section titled “Who is this module for?”This module is primarily aimed at small businesses that have better things to do than chase unpaid invoices. That said, it works for companies of any size.
The main goal is to save you from stepping in manually, without calling on a specialised company, which nevertheless remains the last resort.
The deeper goal is to keep you from stepping in emotionally: for many people, asking again for an invoice to be paid is a thankless task, especially when wearing both an administrative and a technical hat.
Support and assistance
Section titled “Support and assistance”What is included in the purchase of the module
Section titled “What is included in the purchase of the module”Or in the renewal of the licence associated with the module:
- Downloads of new versions of the module including corrective updates (this is not a subscription), as long as your Dolibarr version is not too old (no more than three major versions behind: if the latest Dolibarr version is 21, the module is supported down to Dolibarr version 18).
- Downloads of new versions of the module including new features (evolutionary updates) for 1 year, if and only if your Dolibarr version is compatible with those new features.
What is not included
Section titled “What is not included”- Installation and configuration of the module (optional)
Contact
Section titled “Contact”Features
Section titled “Features”- Scheduling of automatic reminders for unpaid invoices or notifications for validated invoices, either before/after the payment due date, or before/after the invoice date.
- Multilanguage support.
- Should be compatible with the Multicompany module (not tested but should work).
- Option not to send notifications to some third parties, or to send them to the sales representative in charge of that third party.
Special cases
Section titled “Special cases”- Be careful not to schedule the automatic notifications for recurring invoices before the reminders triggered by the payment due date, otherwise in some situations a message could be sent, unfortunately, twice on the same day.
- The user running Dolibarr's scheduled jobs (CRON) must be able to access the email templates being sent: either the templates belong to this user (usually an administrator), or they are shared and not "private". In practice, the user running the scheduled jobs is a Dolibarr administrator, so the problem does not arise.
How to improve your chances of getting paid?
Section titled “How to improve your chances of getting paid?”Why do invoices remain unpaid?
Section titled “Why do invoices remain unpaid?”- The invoice is not large enough: some customers, because the price is too low, do not see paying it as a priority.
- They procrastinate (the number 1 reason, I think): once the problem is solved or the service delivered, they do not pay, they have moved on and keep forgetting to pay.
- They have no regard for you and hope not to pay you: they do not intend to use your services again, they put money above people, and you are nothing to them.
- The customer has an accounts department that works at its own pace. The idea is to make them understand that you are the one requiring payment according to what was agreed at the start.
- They are trying their luck, hoping you will not dare to keep asking.
- Those with a small invoice know that starting formal debt collection costs more than the invoice itself.
The two principles of the module
Section titled “The two principles of the module”- Keep reminding the customer until they pay or get in touch to dispute the invoice.
- The first messages they receive must clearly state that the message is automatic: it is absolutely important that they know they will get tired of receiving reminders long before the sending robot breaks down.
What to do, broadly?
Section titled “What to do, broadly?”- Depending on whether your customers read their emails regularly or not, space the reminders out more or less.
- Alternate different reminder sequences with different intervals.
- Have one specific, non-repeating reminder with a message that looks as if it was written by hand. In that one, do not say the message is automatic.
- Have a sequence that mentions the imminent transfer of the case to a debt collection officer and a lawyer.
My own sequences
Section titled “My own sequences”Invoice reminder D-8
Section titled “Invoice reminder D-8”- Send 8 days before the payment due date
- For 1 day (so only once)
- Every day at 7 am
- Note: the payment term is set either to 4 weeks or to 7 days, so that this alert is not triggered too early.
Invoice reminder H-24
Section titled “Invoice reminder H-24”- Send 1 day before the payment due date
- For 1 day (so only once)
- Every day at 7 am
Recurring invoice notification
Section titled “Recurring invoice notification”- Send 0 days after the invoice date of recurring invoices
- For 1 day (so only once)
- Every day at 4 pm
Unpaid invoice reminder 1
Section titled “Unpaid invoice reminder 1”- Send 2 days after the payment due date
- For 5 days
- Every 2 days at 8 am
One-off invoice notification
Section titled “One-off invoice notification”- Send 1 day after the invoice date of non-recurring invoices
- For 1 day
- Every day at 6 am
Unpaid invoice reminder 2
Section titled “Unpaid invoice reminder 2”- Send 8 days after the payment due date
- For 10 days
- Every 3 days at 9 am
Unpaid invoice reminder 3
Section titled “Unpaid invoice reminder 3”- Send 19 days after the payment due date
- For 10 days
- Every 2 days at 10 am
Unpaid invoice reminder 4
Section titled “Unpaid invoice reminder 4”- Send 32 days after the payment due date
- For 1 day
- Every day at 11 am
Unpaid invoice reminder 5
Section titled “Unpaid invoice reminder 5”- Send 42 days after the payment due date
- For 90 days
- Every 3 days at 10 am
- Note: these customers will be permanently banned from my services.
Administrator configuration of the module
Section titled “Administrator configuration of the module”Prerequisites
Section titled “Prerequisites”The scheduled jobs (CRON) module is normally enabled.
But you must remember to schedule its execution through your host's CRON system, otherwise no reminder will be sent.
The configuration page of the CRON/Scheduled jobs module shows which command to schedule at your host.
If this part makes no sense to you, I can take care of it as a one-off service.
Example of the scheduled jobs configuration page:

If some jobs are green, it works; otherwise check or set up their execution at your host: this is a technical operation that may require an expert.
Sending emails must work and go through a professional SMTP relay (so preferably not a consumer-grade provider).
Do not relay your emails through OVH's email service, as it is being blackmailed by a certain anti-spam vendor. And OVH refuses to pay.
I recommend having your own domain name to look professional.
If this part makes no sense to you, I can take care of it as a one-off service.
Fill in the default sender for emails:


1: to open the module's administrator configuration page, click at the top left on Home ➡ Setup ➡ Modules/Applications.
Administrator configuration page
Section titled “Administrator configuration page”There is normally nothing to set, but here is what can be changed.
Excerpt of the page:

- 1: this button disables/enables all scheduled reminders in one click.
These two settings only have a visual effect, not a functional one:
- 2: normally, your browser displays a small clickable colour banner (and not a code).
- 3: you can change the values to adjust the level at which alert levels change colour.
Then:
- 4: "Blank test" button, to redirect emails to the first administrator (if there are several administrators, the one with the lowest ID number is chosen).
- 5: default action for sending messages:
- Do not send anything
- Send to sales representatives only
- Send to sales representatives and the customer
- Send the reminder (normal mode)
Using the module
Section titled “Using the module”To open the module's page, click on 1 and then 2 (menu 3, built into Dolibarr, lists unpaid invoices):

Listing scheduled reminders
Section titled “Listing scheduled reminders”Excerpt of the page:

Double table
Section titled “Double table”- The table is two tables in one. I found it hard to do otherwise. Each main row is followed by a second row showing the setting visually, as a series of small boxes.
- The
icon represents the chosen reference date (the payment due date, for example). The
boxes on its left are alerts sent before the due date, and the boxes on its right are alerts sent after it. - The small table of boxes is placed at about 30% of the row width, from the left edge.
- The aim is to see the whole schedule by reading the rows from left to right, and to spot unwanted overlaps between reminder sequences.
Standard rows
Section titled “Standard rows”- Each main row represents a scheduled/suspended alert sequence.
- The status (2) shows whether the sequence is running properly.
- Button (4) edits the sequence.
- Button (5) suspends the sequence.
- Button (6) deletes the sequence.
- The small table (3) shows the sequence visually.
- Alert level colours only have a visual effect.
History of reminders already sent
Section titled “History of reminders already sent”Excerpt of the page:

- Link (1) opens the related invoice.
- Button (2) is clickable and opens the related sequence.
- Label (4) shows the sending result of the message.
- The rest of the row contains the details of the message sent, and you can view its content by hovering over box (3).
Adding (or editing) a sequence
Section titled “Adding (or editing) a sequence”
- Field (1) gives the sequence a name.
- Selection (2) chooses the email template. If the list is empty, go to Tools ➡ Email templates to add templates and link them to Customer invoices. Careful: the template must either belong to a Dolibarr administrator or not be private.
- Field (3) sets the interval of the first reminder relative to the reference date.
- Selection 4/5/6/7 chooses the reference date.
- Field (8) sets the duration of the sequence.
- Fields (9) and (10) set the frequency. Careful: if Dolibarr is in "DEBUG" mode, "minutes" and "hours" can be selected, which is meant for testing only.
- Field (11) filters the payment method the sequence applies to.
- Field (12) bypasses the normal recipient and sends the message to a specific person.
- The next reminder date (13) is useful to set the time of the reminder.
- Field (14) has no effect, you can use it for a private note.
Demo video
Section titled “Demo video”Disabling notifications for one or more third parties
Section titled “Disabling notifications for one or more third parties”On a third party's card, a new field dedicated to automatic invoice reminder notifications lets you disable notifications or send them to the sales representative instead.
Sales contacts are edited on that same page.
Maintenance
Section titled “Maintenance”Updating the module (two steps)
Section titled “Updating the module (two steps)”1. Update the module files
Section titled “1. Update the module files”To update the module:
- log in to Dolibarr;
- go to the module management page: Home ➡ Setup ➡ Modules/Applications;
- open the "Deploy/install external app/module" tab;
- click "Choose file" and "SEND FILE".
2. Update the module data
Section titled “2. Update the module data”This step is not automatic so far (a Dolibarr limitation). Go to the module's administration page:
- go to the module management page: Home ➡ Setup ➡ Modules/Applications;
- click the module's cog icon to open its administration page (careful not to disable the module, or the scheduled reminders will be lost);
- click the new update tab at the top right;
- click the "Update the database" button.
Troubleshooting
Section titled “Troubleshooting”Finding the PHP version
Section titled “Finding the PHP version”
Enabling DEBUG mode
Section titled “Enabling DEBUG mode”In the module activation menu (at the very bottom), enable the Syslog module:

To help track down problems with a module (or with Dolibarr), set the logging level to "LOG_DEBUG":

After a few attempts, send the dolibarr.log file and if possible the dolibarr_cron.log file too (only reachable through FTP/SSH), both located in the documents directory.
Reminders are in error (red/burgundy background)
Section titled “Reminders are in error (red/burgundy background)”
Check that the recipients have an email address:
- If sending to sales representatives, check that they have an email address.
- If sending to the third party, check that an email address is present:
- either on the third party itself;
- or on at least one billing contact.

