The Delta Pre-Invoice Generation feature ensures that your invoicing process is accurate and up-to-date by comparing the latest invoiced amounts with new amounts and creating delta pre-invoice items for any differences. This feature handles various aspects of invoicing, including timesheet activities, flexible payment plans, packages, and invoice contacts, making your invoicing more efficient and reliable.
Delta Invoicing
When delta invoicing is activated, generating pre-invoices is based on comparing the latest invoiced amounts with the new amounts, which include the changes. When you generate a new pre-invoice, the system will fetch the latest invoiced items and compare them with the new amounts to identify any differences. The system will create delta pre-invoice items for any differences found between the latest invoiced amounts and the new amounts.
Assigning Timesheet Activities:
The system automatically assigns the latest invoice items to the relevant timesheet activities.
Flexible Payment Plans:
Pre-invoice items related to flexible payment plans are assigned to their respective plans and recalculated if any campaign item amounts change.
Flexible payment plan pre-invoice items are merged with normal and/or delta pre-invoice items if their invoice date matches the accounting period.
Multiple flexible payment plans can be merged if they belong to the same accounting period.
The feature ensures that flexible payment plan invoice items are handled correctly within the Delta Invoicing system. These items will not create technical reversals or delta invoice items. Instead, new flexible payment plans need to be created if the campaign item amount changes to cover the remaining balance. (AD-10938)
The flexible payment plan for delta work exactly the same way as that of version 2.170
The delta preinvoice are assigned to the flexible payment plan and percentage is recalculated if the campaign item amount has changed.
Managing Packages:
For campaigns involving packages, the system will display the package header and all included components, along with any changes. This ensures that all components are correctly invoiced.(Not part of beta will be part of next release)
Handling Invoice Contacts:
The system creates and updates invoice contacts based on the configured campaign contacts. If any contacts are no longer needed, they will be deleted.
Assigning Accounting Periods:
The Delta Pre-Invoice Generation process ensures that all pre-invoices have an assigned accounting period. If accounting periods are not yet created when the pre-invoices are generated, the accounting period field will remain empty and will be updated during the next pre-invoice generation once the accounting periods are created.
Threshold Feature
The threshold feature allows users to define a minimum percentage change in the calculated amounts which triggers the creation of a delta invoice item.
Pre invoice Status
The Delta Pre-Invoice Generation process now includes pre invoices with status "Reviewed." This ensures that reviewed pre-invoices are treated according to specific rules to prevent unwanted creation of additional delta pre-invoices.
Functionality of Status “Reviewed”:
Reviewed pre-invoices are not updated, similar to invoiced invoices.
Draft pre-invoices can be updated or reassigned as needed.
Resetting Status to Draft:
If any amounts (B3 → N3) change or new pre-invoice items match a reviewed pre-invoice, the status is reset to Draft.
Prevents creation of unnecessary additional delta pre-invoices.
Invoice Assignment Rules:
Ensures that pre-invoice assignments are managed efficiently without creating duplicate pre-invoices.
Batch Job Processing with Delta
When the delta invoicing is enabled on the Admin settings the new delta pre invoice generation is called during the following batch processes:
LWC pre-invoice generation wizard
Visual force pre-invoice generation wizard
Scheduled Pre-Invoice Batch Job
the global invocable method that calls the batch job →
GenerateInvoiceBatch.doGenerateInvoice
(can be called from everywhere, custom apex code and flows)the end campaign item feature for items based on actuals (triggered my the media campaign trigger)
the end campaign item feature for items based on linear distribution (triggered by the end campaign item feature)
the
FlowInvocableProcess
for flow executions (“CreateInvoicesBatchJob
")the optimizer activation triggered Process Builder flow →
ProcessCompleteEventOptimizingVersion.flow
Rounding of during delta preinvoice generation
All the following values during the Pre-Invoice Generation are rounded off before the invoice items are saved to the database.
InvoiceAmount__c
GrossAmountB3__c
GrossAmountB2__c
GrossAmountB1__c
InvoicedAmountNet1__c
InvoicedAmountNet2__c
InvoicedAmountNet3__c
InvoiceSurchargeB3Abs__c
InvoiceSurchargeB2Abs__c
RateDiscount1AbsCustom__c
RateDiscount2AbsCustom__c
RateDiscount3AbsCustom__c
RateDiscount4AbsCustom__c
InvoicedQuantity__c
SalesPrice__c
Validations relevant to Pre invoice Generation
Following validations are in place for Media champaign and Champaign items for when pre invoice generation is triggered
Media Champaign Conditions | Error Message |
---|---|
|
(field label list depends on which fields are not set) |
| |
| |
| |
| |
AND
|
|
Champaign item Condition | Error Message | |
---|---|---|
| items without bill me set will be ignored | / |
| package components with bill me set will be ignored if the related package header doesn’t have bill me set Package are not supported yet in the delta pre-invoice generation. | / |
AND
| First encountered budget item related to a weekly media campaign will throw an error |
Using the media campaign button with standard pre-invoice generation: |
Important: Customers can change unlimited invoicing
to true/false when the campaign items are partially or fully invoiced for the purpose of delta invoicing.
The visualforce page on Preinvoice generation button
on the Media Campaign has been deactivated when Delta is enabled on the admin settings
<<Add UI>>
“Update delivery data” button has been removed from the Invoice object and this action of updating the delivered quantity is included in the PreInvoice generation and Pre-invoice update stage is included in the old billing run