RelancesAutomatiques batch
The RelancesAutomatiques batch enables you to automatically send dunning emails to customers when they have not paid an invoice.
It fetches the sales invoices that need to be dunned then sends dunning emails based on the setup. It allows you to automate a recovery process, especially thanks to planning options.
Before setting up the batch:
- Prepare the customers and customer invoices (see Preparing the customers or the invoices to dun).
- Each dunning level must be set up (see Dunning levels).
Important
When the RELCLI_BORNEREL management rule is disabled, the batch is based on the due date of the invoices but there is a risk the batch sends a large number of dunning emails at once if many invoices have already been dunned manually. To avoid sending a large number of dunning emails at once, consider enabling the RELCLI_BORNEREL management rule so that the batch is based on the last dunning date rather than on the due date of the invoices.
Example
For the first level of dunning, the lower limit is set up to -5 and the upper limit is set up to 10. A company has issued sales invoices which due date is on July 7. Level 1 is used between July 2 and July 17. Before setting up the batch, the company manually dunned customers for those invoices on July 17.
In the context of those invoices:
- If the
RELCLI_BORNERELmanagement rule is disabled, the batch will send level 2 dunning emails directly from July 18 even if dunning emails were sent only on July 17, one day earlier. - If the
RELCLI_BORNERELmanagement rule is enabled, a minimum period is defined between level 1 dunning emails and the next level 2 dunning emails. Therefore, the batch does not send level 2 dunning emails shortly after level 1 dunning emails.
- Set up the dunning options (refer to Dunning options).
When creating the batch, select RelancesAutomatiques in the Batch template drop-down list.
For each unpaid invoice, the batch sends or does not send a dunning email depending on the dunning options and levels. If the batch sends a dunning email, the dunning level applied is determined from the dunning level setup.
If the RELCLI_BORNEREL management rule is enabled, the first dunning email is always level 1 because it is impossible to skip dunning levels under this rule. If the RELCLI_BORNEREL management rule is disabled, dunning levels can be skipped (refer to Dunning levels).
Customers for which automatic dunning is disabled cannot be dunned. In the same way, no dunning is made for the invoices that cannot be automatically dunned (see Preparing the customers or the invoices to dun).
Dunning recipients
The recipients of the dunning emails are determined in the following order:
| Priority | Recipient |
|---|---|
| 1 |
Contacts checked Dunning and possibly Dunning for all sites in the Recipient of section in the contact record sheets of the customer. If Dunning for all sites is unchecked, the contact receives the dunning email only if it is linked to the billing site specified on the invoice. Otherwise, they will not receive the dunning email. If Dunning for all sites is checked, the contact receives the dunning email regardless of the billing site specified on the invoice. Note If the rule |
| 2 |
Recipients specified in the Recipients tab on the invoice. |
| 3 |
Contacts checked Invoice Sales in the Recipient of section in the contact record sheets of the customer. |
| 4 |
Email address specified in the Contact details section on the billing customer site. |
The batch first checks if there are recipients in rule 1 and sends a dunning email to possibly found recipients. If the batch did not find any recipient in priority rule 1, the batch scales each following rule in order until it finds one or more recipients. As soon as a recipient is found, all the following rules are ignored.
Example
A sales invoice was issued to the customer Company A:
- The
FC_CONTACT_CLI_FACTrule is disabled. - No contact is checked Dunning or Dunning for all sites in the Recipient of section in the contact record sheets of Company A.
- No recipient is specified in the Recipients section of the sales invoice.
- Mr Smith is checked Invoice Sales in the Recipient of section in his contact record sheet.
- The email address of Ms. Martin is specified on the billing site of Company A.
I start dunning:
No recipient is found after checking the rules 1 and 2, no dunning email is sent. However, the batch finds Mr Smith in rule 3. A dunning email is sent to Mr Smith. No dunning email is sent to Ms. Martin, recipient from rule 4.
- If no recipient is found after checking all the priority rules, no dunning email is sent.
When dunning, an email is sent for each invoice. However, only one email is sent for multiple invoices if every following element is identical in each of those invoices:
- Billed customer,
- Recipient(s) in the customer sheet,
- Cc recipient(s),
- Dunning level.
When the dunning email is sent, the following information is displayed in the Due dates tab of the invoice:
- The dunning level is displayed in the Dunning level column,
- The date of the last dunning email in the Dunned on column,
- The comment including the sentence Relancé automatiquement par mail le DD/MM/YYYY in the Status section.
Simulation
Thanks to the SIMULATION parameter, the batch can be run in simulation mode in order to ensurer the batch runs well before its execution in real conditions.
When simulation is enabled, the batch does not send dunning emails to customers and dunning levels of invoices are not updated. Instead, the batch sends a summary email to the desired recipients. This email contains an Excel spreadsheet that corresponds to the list of invoices for which a dunning email would have been sent to the customer if simulation had been disabled.
The parameters in the following table correspond only to the parameters specific to the RelancesAutomatiques batch.
Reference
To view the parameters common among batches, refer to Setting up the common parameters.
| Code | Description | Type | Required |
|---|---|---|---|
|
|
Enables the batch to always send log emails even if no error occurred. Log emails will be sent to the email address entered in the |
Boolean |
No |
CODE_NIVEAUX
|
Codes of the dunning levels to take into account. To select multiple dunning levels, separate the codes with / characters. Reference For more information about dunning levels, refer to Dunning levels. If level 5 is the formal notice, it is recommended to dun manually and not to include this level. |
String Ex: N1/N2/N3/N4/N5 |
No |
EXPEDITEUR_EN_COPIE
|
When the parameter is set to True, the sender of the dunning email is added as blind carbon copy (Bcc). |
Boolean |
No |
NIV1_CC
|
Email address added as copy for the first level of dunning emails. Enter the email addresses directly and/or enter the following codes:
If the invoice is multi-project, the projects taken into account for the To select multiple recipients, separate the email addresses and codes with ; characters. |
String Ex: RESP_COM_AFF;RESP_PRO;RESP_FIN;RESP_AFF;RESP_COM_CLI;RESP_COMPTE_CLI |
No |
NIV2_CC
|
Email address added as copy for the second level of dunning emails. This parameter is entered in the same way as for the |
String |
No |
NIV3_CC
|
Email address added as copy for the third level of dunning emails. This parameter is entered in the same way as for the |
String |
No |
NIV4_CC
|
Email address added as copy for the fourth level of dunning emails. This parameter is entered in the same way as for the |
String |
No |
NIV5_CC
|
Email address added as copy for the fifth level of dunning emails. This parameter is entered in the same way as for the |
String |
No |
SIMU_CORPS_MAIL
|
Code of the keywords corresponding to the body of the email sent when simulation is enabled (see the This parameter is required when |
String | No |
SIMU_MAIL_RESPONSABLE
|
Email addresses of recipients of summary emails when simulating (see the This parameter is required when Enter the email addresses directly and/or enter the following codes:
If the invoice is multi-project, the projects taken into account for the To select multiple recipients, separate the email addresses and codes with ; characters. |
String Ex: RESP_COM_AFF;RESP_PRO;RESP_FIN;RESP_AFF;RESP_COM_CLI;RESP_COMPTE_CLI |
No |
SIMULATION
|
When the parameter is set to True, the batch runs in simulation mode. Thus, when the batch runs:
When the parameter is set to False, simulation mode is disabled thus the batch runs normally and dunning emails are really sent. |
Boolean | Yes |
SOCIETES
|
Codes of the companies to take into account. To select multiple companies, separate the company codes with / characters. Important To dun several companies, it is necessary to specify a user from the ***** company in the |
String Ex: COM1/COM2/COM3 |
No |