Skip to main content

Batch Processing

Contract Billing

You must schedule Codeunit 58764 ContractBillingMgt_CB_TSL to automatically create Contract Invoices. This codeunit creates invoices for all contracts with a Next Billing Date either on or before the run date. This batch job creates the invoices and can send them for approval but does not post them.

This batch job does the following:

  • Creates contract invoices without posting them and updates the contracts
  • Creates credit memos relating to any back-dated contract changes.
  • Updates prices if you have set contracts to increase by a percentage —this only happens during the period specified on the contract.
  • Send documents for approval or releases them.

The Contract Setup includes fields influencing the billing process.

Billing Reminders

Business Value

Some organisations require the salesperson to contact customers to confirm ongoing subscriptions before invoices are raised. Other recurring billing could be linked to a back-to-back vendor contract, which requires coordination between the salesperson and the vendor.

Feature Details

Billing Reminders allow you to specify notification rules per contract group. This allows you to trigger notifications for some types of contracts and not for others. The notifications can be User Tasks that show up in Business Central or email notifications. Below is an example of a notification email.

Email Notification

Billing Reminder Templates

This page allows you to set up different notification templates that specify when the notification is first triggered, the frequency of the reminders and to whom the app should send the reminders.

CodeSpecifies the Code.
DescriptionSpecifies the description, which can also be part of the notification subject.
Reminder TypeSpecifies whether to create a User Task or Email reminder.
Notify Customer SalespersonSpecifies that the email notification should go to the salesperson linked to the customer.
Include Salesperson ApproverSpecifies that the email notification should also go to the salesperson's approver.
User Task Group CodeSpecifies the User Task Group to use when creating a notification, which allows you to notify a group of users.
Specific UserSpecifies that you want to notify a specific user.
Calculate FromSpecifies whether to determine the reminder date from the Next Billing Date or the Next Contract Starting Date.
First Reminder FormulaSpecifies the formula used to determine the first reminder date for either the Next Billing Date or the Next Contract Start Date. The value here should be negative to calculate a date earlier than the billing date. Enter values such as -1M, -2M, etc.
Email RecurrenceSpecifies the date formula used to determine the email reminder recurrence. For example, you could send out the first reminder two months before and then send out a reminder every week after that. Enter values such as 1W, 2W, etc.
Notification SubjectSpecifies the subject of the notification. The text can include placeholders, which get replaced by actual values. %1 = Billing Template Description, %2 = Contract No., %3 = Customer Name and %4 = Next Billing Date.


The billing reminders get sent using a batch job that you must configure in the job queue. To do this, create a job queue entry for codeunit 58769 BillingReminderMgt_CB_TSL. You should configure the job to run once daily (on weekdays).

Stop Reminders for a Contract

You can stop billing reminders for a specific contract. There are two ways to do this:

  • You can do this manually on the contract header.
  • You can also follow a link in the email notification that opens Business Central to update the value (see below).

Stop Billing

Update the Email Notification

The app uses a report called Contract Billing Reminder as the body for the email notifications. This report is specified on Report Selections - Sales. You can use standard Business Central functionality to modify the wording and layout of the report and change the email.

See Also