The Delta Pre-Invoice Generation process is designed to create, update, and delete Invoice Contacts based on configured Campaign Contacts. This process ensures that each Pre-Invoice contains feature ensures that your invoicing process is accurate and up-to-date invoicing information, similar to the Standard Pre-Invoice Generation process.
Key Features
Creation of Invoice Contacts:
New Invoice Contacts are created from Campaign Contacts if they do not already exist.
Updating Invoice Contacts:
Existing Invoice Contacts are updated based on changes in the corresponding Campaign Contacts.
Deletion of Invoice Contacts:
Invoice Contacts that are no longer needed (e.g., when a Campaign Contact is deleted) are removed.
Field Mapping:
Campaign Contact fields are mapped to Invoice Contact fields using default mappings.
Users can override default mappings with custom settings.
Configuration
Field Mapping Configuration:
Default field mappings are hard-coded but can be overridden using custom settings.
To override, leave the source field blank and set only the target field in the custom settings.
Custom Field Mapping
Access Custom Settings:
Navigate to the custom settings section within the software.
Locate the Mapping BA settings.
Override Default Mappings:
Leave the source field blank to override a default mapping.
Set the target Invoice Contact field as needed.
Adding New Field Mappings:
Add new field mappings by specifying both source and target fields in the custom settings.
Ensure new mappings are saved and validated.
Common Issues and Solutions
...
Invoice Contacts Not Created:
Ensure Campaign Contacts are correctly configured and linked to the appropriate campaigns.
Verify that the Delta Pre-Invoice Generation process was triggered successfully.
...
Invoice Contacts Not Updated:
Check if the Campaign Contacts have the latest information.
Ensure there are no conflicts in the custom field mappings.
Invoice Contacts Not Deleted:
...
Confirm that the Campaign Contacts have been removed if the corresponding Invoice Contacts are not needed.
...
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)
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.
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.
The Delta Pre-Invoice Generation process now includes functionality to handle pre-invoices with the status of "Reviewed." This ensures that reviewed pre-invoices are treated according to specific rules to prevent unwanted creation of additional delta pre-invoices.
Handling Reviewed Status:
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 preinvoice generation is called during the following processes:
Batch Job
LWC pre-invoice generation wizard
VF 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
...
the global invocable call
WebServiceCenter.cls
- Parametersaction = CreateInvoices
,parameter = [media campaign id]
orFlowInvocableProcess.cls
- requestaction
=CreateInvoices
(can be called from everywhere, custom apex code and flows)the self service component →
flowInvoiceGenerator
the
FlowInvocableProcess
for flow executions (“CreateInvoices
")
All the following values during the Pre-Invoice Generation are rounded off before the invoice items are saved to the database.
...
Condition | Handling | 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
| / | ||
AND
| First encountered budget item related to a weekly media campaign will throw an error | New
|
Info |
---|
The visualforce page on <<Add UI>> |
Info |
---|
“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 |
AD-10508
Validation rule to prevent changes to the "unlimited invoicing" setting for invoiced campaign items, please be aware that this restriction is not compatible with the Delta Invoicing feature