Peppol module - Scheduled task

Overview

The Peppol scheduled task performs three main operations:

  1. Receiving: Retrieval of supplier invoices from the access point
  2. Automatic sending: Sending of validated customer invoices to the Peppol network
  3. 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:

  1. Status: Validated or classified
  2. Not yet sent: No Peppol identifier recorded
  3. Eligible customer: The customer is not an individual (type "Individual" excluded)
  4. Customer Peppol identifier: The customer has a valid Peppol identifier
  5. XML file present: The Peppol XML file exists for this invoice
  6. 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:

  1. Check of the customer's Peppol identifier
  2. Check of the existence of the XML file ({ref}_peppol.xml)
  3. Sending to the access point
  4. 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:

  1. Query of the access point to get the current status
  2. 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

  1. Check that the task is enabled in Dolibarr
  2. Check that the Dolibarr cron is correctly configured on your server
  3. See the Dolibarr logs

No invoice is sent

  1. Check that automatic sending is enabled in the configuration
  2. Check that there are validated invoices meeting the criteria
  3. Check the configured time range
  4. See the execution report to identify the ignored invoices and their reason

Sending errors

  1. Check the access point configuration
  2. Check the network connectivity
  3. See the access point logs
  4. Check that the XML file is valid

Missing XML file

The Peppol XML file must be generated before sending. Check:

  1. That the ODT/PDF template with XML generation is configured
  2. That the invoice has been regenerated after configuring the template