Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

  1. Creation of Invoice Contacts:

    • New Invoice Contacts are created from Campaign Contacts if they do not already exist.

  2. Updating Invoice Contacts:

    • Existing Invoice Contacts are updated based on changes in the corresponding Campaign Contacts.

  3. Deletion of Invoice Contacts:

    • Invoice Contacts that are no longer needed (e.g., when a Campaign Contact is deleted) are removed.

  4. Field Mapping:

    • Campaign Contact fields are mapped to Invoice Contact fields using default mappings.

    • Users can override default mappings with custom settings.

Configuration

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

  1. Access Custom Settings:

    • Navigate to the custom settings section within the software.

    • Locate the Mapping BA settings.

  2. Override Default Mappings:

    • Leave the source field blank to override a default mapping.

    • Set the target Invoice Contact field as needed.

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

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

  2. Assigning Timesheet Activities:

    • The system automatically assigns the latest invoice items to the relevant timesheet activities.

  3. 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)

  4. 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​​.

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

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

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

  1. Handling Reviewed Status:

    • Reviewed pre-invoices are not updated, similar to invoiced invoices.

    • Draft pre-invoices can be updated or reassigned as needed.

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

  3. 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 - Parameters action = CreateInvoices, parameter = [media campaign id] or FlowInvocableProcess.cls - request action = 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

Campaign_Item__c.BillMe__c
==
false

items without bill me set will be ignored

/

PacketItem__r.BillMe__c
==
false

package components with bill me set will be ignored if the related package header doesn’t have bill me set

Note

Package are not supported at all yet in the delta pre-invoice generation, so no need to test this yet.

/

MediaCampaign__c.PaymentInterval__c
==
'weekly (1 week)'

AND

Campaign_Item__c.Billing_category__c
==
Budget'

First encountered budget item related to a weekly media campaign will throw an error

New
Pre-invoice generation is not supported for the Budget billing category with a weekly payment interval.

Info

Using the media campaign button with standard pre-invoice generation:
Weekly invoicing is not supported for Media Buying.

Info

The visualforce page on Preinvoice generation button on the Media Campaign has been deactivated when Delta is enabled on the admin settings so that we do not need to update this button to run Delta preinvoice when Delta is enabled.

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