Skip to main content

Batch Processing

Contract Billing

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 release them.

Manual Processing

You can run the batch job manually from the Contract List page by selecting the Create Contract Invoices action. When choosing this action, you can specify filters to process only contracts that meet specific criteria. At a minimum, you will need to specify a value for the date filter—the value here will be the billing date.

Contract Billing Filters

FieldPurpose
Options
Run Per Bill-to CustomerSpecifies that you want the batch job to run per bill-to customer. This option is recommended if you want to run the billing during business hours, as it will cause fewer locking issues for other users.
Auto Set Billing DateSpecifies that you want to set the billing date automatically using the advanced automatic billing rules defined in the setup. You usually use this option when you schedule this job in the job queue. You must not specify a date filter if you select the Auto Set Billing Date option.
Filters
Date FilterSpecify the billing date as the date filter. You only need to specify a single date as per the image above. The app automatically bills all contracts due to be billed up to and including this date.
Important

When you run the batch job per bill-to customer, the app will save the changes (commit) after completing each customer. This reduces the total time the tables are locked and allows other users to continue working. However, it also means that if the job fails due to an error, it only rolls back the current customer. The benefit is that after you fix the error, the job continues from where it left off.

tip

We recommend scheduling large billing runs in the job queue to run automatically outside office hours.

Scheduled Processing

You must schedule Report 58761 Contract Billing to automatically create Contract Invoices from the job queue.

tip

The Contract Setup includes fields influencing the billing process. The option Auto Set Billing Date works with this setup to determine the billing date.

Billing Reminders

Business Value

Some organisations require the salesperson to contact customers to confirm ongoing subscriptions before raising invoices. 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.

FieldPurpose
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.

Scheduling

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