Peppol module - Scheduled task
Overview
The Peppol scheduled task performs three main operations:
- Receiving: Retrieval of supplier invoices from the access point
- Automatic sending: Sending of validated customer invoices to the Peppol network
- Status check: Updating the status of recently sent documents
Activation
1. Enable the task in Dolibarr
Go to Home > Setup > Modules/Applications > Scheduled tasks.
Search for the task "PEPPOL automatic processing (import/export)" and enable it.
By default, the task is configured to run daily.
2. Configure the module
Go to Setup > Modules > Peppol > Automatic sending to set the task's behavior.
Configuration
General settings
| Parameter | Description |
|---|---|
| Enable automatic sending | Enables/disables automatic sending of invoices. Receiving supplier invoices remains active even if this parameter is disabled. |
| Report email | Email address receiving the execution report after each run. |
| Report only on error | If enabled, the report is only sent if errors occur. |
Sending filters
| Parameter | Description | Default value |
|---|---|---|
| Minimum date | Only invoices validated from this date onward will be sent (format YYYY-MM-DD). | No restriction |
| Exclude paid invoices | Invoices already paid will not be sent. | No |
| Delay after validation | Number of hours to wait after an invoice is validated before sending it. Allows time for possible corrections. | 24 hours |
Limits and performance
| Parameter | Description | Default value |
|---|---|---|
| Maximum number of invoices | Maximum number of invoices to process per execution. Avoids system overload. | 50 |
Execution time range
| Parameter | Description |
|---|---|
| Start time | Time from which sending is allowed (0-23). |
| End time | Time until which sending is allowed (0-23). |
Night-time ranges are supported. For example, to allow sending only between 10 PM and 6 AM, configure:
- Start time: 22
- End time: 6
If no time is configured, sending is allowed at any time.
Invoice selection criteria
A customer invoice is selected for automatic sending if it meets all the following criteria:
- Status: Validated or classified
- Not yet sent: No Peppol identifier recorded
- Eligible customer: The customer is not an individual (type "Individual" excluded)
- Customer Peppol identifier: The customer has a valid Peppol identifier
- XML file present: The Peppol XML file exists for this invoice
- Filters respected: Respects the configured filters (date, delay, payment, time range)
Execution report
After each execution, a report is sent by email (if configured) containing:
Receiving
- Number of supplier invoices imported
- Possible errors
Sending
- Success: List of successfully sent invoices
- Errors: List of invoices in error with the error message
- Ignored: Invoices not sent, classified by reason:
- Customer without a Peppol identifier
- Missing XML file
- Individual customer
- Delay not elapsed
- Already paid
- Before minimum date
- Outside the time range
Status check
- Number of documents checked
- Number of statuses updated
Detailed operation
1. Receiving supplier invoices
The task queries the configured access point to retrieve new supplier invoices. These invoices are imported into Dolibarr and available in the Peppol import list.
2. Automatic sending of customer invoices
For each invoice meeting the criteria:
- Check of the customer's Peppol identifier
- Check of the existence of the XML file (
{ref}_peppol.xml) - Sending to the access point
- Recording of the status and the Peppol identifier returned
3. Status check
For invoices sent in the last 7 days whose status is not final:
- Query of the access point to get the current status
- Status update in Dolibarr
This feature is only available if the access point supports it.
Best practices
Delay after validation
It is recommended to keep a delay of 24 hours after validation. This allows:
- Correcting possible errors before sending
- Cancelling an invoice validated by mistake
- Checking the customer's information
Time range
If your access point has throughput or availability limitations, configure a time range outside peak hours.
Maximum number of invoices
Adjust this parameter according to:
- The capacity of your access point
- The volume of invoices to process
- The execution frequency of the task
Monitoring
Configure the report email to be alerted of errors. Regularly check the ignored invoices to identify possible configuration problems (customers without a Peppol identifier, missing XML files).
Troubleshooting
The task does not run
- Check that the task is enabled in Dolibarr
- Check that the Dolibarr cron is correctly configured on your server
- See the Dolibarr logs
No invoice is sent
- Check that automatic sending is enabled in the configuration
- Check that there are validated invoices meeting the criteria
- Check the configured time range
- See the execution report to identify the ignored invoices and their reason
Sending errors
- Check the access point configuration
- Check the network connectivity
- See the access point logs
- Check that the XML file is valid
Missing XML file
The Peppol XML file must be generated before sending. Check:
- That the ODT/PDF template with XML generation is configured
- That the invoice has been regenerated after configuring the template