Skip to content

Handling Existing Invoices When Switching to SEPA Order Transfer

Once the integration of JustOn Billing & Invoice Management with JustOn Cash Management is active, every newly finalized invoice produces an entry, and JustOn Cash Management takes over collection, payment matching and chargeback handling.

Invoices that were finalized before the integration was active have no entries, and their payments exist as balances only, without corresponding payment records. This causes follow-up errors:

  • A cancellation invoice for such an invoice cannot be finalized, because the original invoice has no entry to cancel.
  • Open invoices cannot be collected using SEPA orders in JustOn Cash Management, because there is no entry from which to create the order.
  • Incoming payments and chargebacks for these invoices are not matched automatically.

Summary

JustOn recommends to enter the switch with as few old open invoices as possible. For most orgs, very few are left once the last collection run via the SEPA order export has been processed – in this case, no data migration is necessary.

First, assess the volume of invoices that still need attention. Depending on the result, you choose one of two options:

  • For small volumes, you collect the remaining invoices outside JustOn and register the incoming payments manually. The invoices never enter JustOn Cash Management.

    For details, see Collecting Payments Outside JustOn.

  • For larger volumes, you generate the missing entries and payments using the invoice fix. JustOn Cash Management then takes the invoices over.

    For details, see Migrating Invoices Using Invoice Fix.

Both options require you to check the payment booking details afterwards.

Many orgs combine both: they migrate the uncomplicated invoices and handle the special cases manually.

Planning Transition

Banks stop accepting the XML files produced by the SEPA order export. Plan the switch for November 1, 2026 at the latest, and use the remaining time to reduce the number of affected invoices.

Phase When What to do
Prepare until the end of October 2026 Assess the volume as described below.
Collect as much as possible using the SEPA order export, while your bank still accepts the XML files, and register the incoming payments as usual.
Complete the JustOn Cash Management configuration.
Switch November 1, 2026 Activate the integration.
From this point, all newly finalized invoices produce entries.
Clean up after the switch Handle the remaining invoices using one of the two options
Collecting Payments Outside JustOn
Migrating Invoices Using Invoice Fix

Note

Complete the JustOn Cash Management configuration before you activate the integration. For the configuration steps, see How to transition from SEPA order export to SEPA order transfer via EBICS? and Enabling Billing and Cash Management Integration.

To activate the integration, you select the checkbox Enable JustOn Cash Management in the global settings, as described in Activating Integration.

Note

Activating the integration does not switch off the SEPA order export. The export remains available and still produces XML files – only your bank will no longer accept them.

Starting on the transition date, make sure that you collect newly finalized invoices through JustOn Cash Management, and use the export only if you have agreed with your bank to use a different channel that employs the outdated XML format.

Assessing Volume

An invoice needs attention if it was finalized before the integration was activated and

  • has the status Open, or
  • has the status Paid with a payment date within the last four months.

Chargebacks can still arrive several weeks after a direct debit has been collected – for SEPA Core direct debits, up to eight weeks. Four months allow for a safe buffer. Older paid invoices do not require any action.

Focus on invoices with the payment method Direct Debit, and on Bank Transfer if you have used the SEPA credit export.

Info

You can determine the counts using a Salesforce report or a list view with the same filter criteria.

Example query: volume overview
SELECT ONB2__Status__c, ONB2__PaymentMethod__c, COUNT(Id)
FROM ONB2__Invoice__c
WHERE (ONB2__Status__c = 'Open'
       OR (ONB2__Status__c = 'Paid' AND ONB2__PaymentDate__c = LAST_N_DAYS:120))
GROUP BY ONB2__Status__c, ONB2__PaymentMethod__c

If the org has been finalizing invoices for some time after the activation, these invoices already have entries and must be left out. The reliable criterion is the absence of a related entry:

AND Id NOT IN (SELECT Invoice__c FROM JPAY1__Entry__c WHERE Invoice__c != null)

Invoice__c is the Entry lookup field that you create during the integration setup, see Enabling Entry Lookups.

SOQL allows at most two semi-joins or anti-joins per query. The classification queries below already use two, so determine the working set in a separate step and reuse the resulting record IDs.

Collecting Payments Outside JustOn

Use this option for small volumes – as a rule of thumb, up to 20 invoices; up to 50 is still manageable. The invoices are settled in JustOn Billing & Invoice Management and never enter JustOn Cash Management, so no data is migrated.

  1. Collect the remaining direct debits directly with your bank, for example using its online banking, rather than through JustOn.
  2. When a payment arrives, open the invoice and click Register Payment to record it.

    For details, see Manually Assigning Balance to Invoice.

    Registering a payment on an invoice without an entry has no effect on JustOn Cash Management, even while the integration is active.

  3. Write off small remaining amounts, like chargeback fees, as required.

Migrating Invoices Using Invoice Fix

Use this option for larger volumes. The invoice fix generates the missing entries and payments, which makes the invoices available to JustOn Cash Management.

Info

Solution preconditions:

  • The integration is active. The relevant invoice fix tasks are available only afterwards.
  • The invoice fix is enabled: the Fix Invoices button is available on the invoices list view, and the Invoice field CM_IntegrationError exists.
  • A business entity is set on all involved invoices and balances.
  • Bookkeeping data has been generated for the involved balances, see Checking Payment Booking Details.

JustOn recommends to test the migration in a sandbox, or with a small batch of invoices, before processing the complete working set.

Classifying In-Scope Invoices

Certain balance types prevent the invoice fix from producing correct results. Before migrating, split the invoices into the following groups.

Group Criteria How to handle
1 – Special balances The invoice has a balance of the type Chargeback, Chargeback Fee, Dunning Fee, Dunning Income or Write-off Cannot be migrated. The task Create or Fix Entries either fails or produces entries with incorrect amounts.
Use Collecting Payments Outside JustOn, or cancel and recreate the invoice.
2 – Special balances and settlement A group 1 invoice that has a Settlement balance in addition Handle each invoice individually. JustOn recommends Collecting Payments Outside JustOn. If in doubt, contact JustOn Support.
3 – Settlement only The invoice has a Settlement balance, but no special balances Can be migrated. The invoice and its related credit – as specified in the field Related Invoice of the settlement balance – must be processed in the same run, otherwise the entry settlement or entry reduction is incomplete on both sides.
4 – Migration-ready The invoice has neither special balances nor a settlement balance Can be migrated.

Note

Only the values Payment, Refund, Prepayment, Payout, Clearing, Dunning Income, Chargeback and Chargeback Fee are defined as picklist values of the Balance field Type. The values Settlement, Dunning Fee and Write-off are written by the software without being declared, so they may not be offered in a list view filter – but they are matched by a query. Mind the exact spelling, in particular Write-off.

Example queries: classifying the invoices

The following queries use this in-scope filter:

(ONB2__Status__c = 'Open'
 OR (ONB2__Status__c = 'Paid' AND ONB2__PaymentDate__c = LAST_N_DAYS:120))

Group 1 – special balances

SELECT Id, Name, ONB2__Account__c, ONB2__Status__c
FROM ONB2__Invoice__c
WHERE (ONB2__Status__c = 'Open'
       OR (ONB2__Status__c = 'Paid' AND ONB2__PaymentDate__c = LAST_N_DAYS:120))
AND Id IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c
           WHERE ONB2__Type__c IN ('Chargeback','Chargeback Fee','Dunning Fee','Dunning Income','Write-off'))

Group 2 – special balances and settlement

SELECT Id, Name, ONB2__Account__c, ONB2__Status__c
FROM ONB2__Invoice__c
WHERE (ONB2__Status__c = 'Open'
       OR (ONB2__Status__c = 'Paid' AND ONB2__PaymentDate__c = LAST_N_DAYS:120))
AND Id IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c
           WHERE ONB2__Type__c IN ('Chargeback','Chargeback Fee','Dunning Fee','Dunning Income','Write-off'))
AND Id IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c WHERE ONB2__Type__c = 'Settlement')

Group 3 – settlement only

SELECT Id, Name, ONB2__Account__c, ONB2__Status__c
FROM ONB2__Invoice__c
WHERE (ONB2__Status__c = 'Open'
       OR (ONB2__Status__c = 'Paid' AND ONB2__PaymentDate__c = LAST_N_DAYS:120))
AND Id IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c WHERE ONB2__Type__c = 'Settlement')
AND Id NOT IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c
               WHERE ONB2__Type__c IN ('Chargeback','Chargeback Fee','Dunning Fee','Dunning Income','Write-off'))

To retrieve the related credits, so that you can process each pair in the same run:

SELECT ONB2__Invoice__r.Name, ONB2__RelatedInvoice__r.Name, ONB2__Account__r.Name
FROM ONB2__Balance__c
WHERE ONB2__Type__c = 'Settlement' AND ONB2__Invoice__c IN (<group 3 invoice IDs>)

Group 4 – migration-ready

SELECT Id, Name, ONB2__Account__c, ONB2__Status__c
FROM ONB2__Invoice__c
WHERE (ONB2__Status__c = 'Open'
       OR (ONB2__Status__c = 'Paid' AND ONB2__PaymentDate__c = LAST_N_DAYS:120))
AND Id NOT IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c
               WHERE ONB2__Type__c IN ('Chargeback','Chargeback Fee','Dunning Fee','Dunning Income','Write-off'))
AND Id NOT IN (SELECT ONB2__Invoice__c FROM ONB2__Balance__c WHERE ONB2__Type__c = 'Settlement')

Running Migration

Migrate the invoices of the groups 3 and 4.

  1. Create a list view that displays the invoices to be migrated.

    Work in subsets, grouped by account. If a balance is split across multiple invoices, these invoices are affected together anyway.

  2. For group 3 invoices, make sure that each invoice and its related credit are part of the same selection.

  3. Select the invoices, then click Fix Invoices.
  4. Select both tasks, Create or Fix Entries and Create Payments and Migrate Balances.

    Task Description
    Create or Fix Entries (Re)generates outdated or missing entries.
    See Create or Fix Entries
    Create Payments and Migrate Balances Creates missing payments from existing balances and makes the balances subject to JustOn Cash Management.
    See Create Payments and Migrate Balances

    Execute both tasks in the same run. Running them separately leaves entries without the corresponding payments.

  5. Click Continue.

For details, see Fixing Invoices.

Canceling and Recreating Invoices With Special Balances

For group 1 and group 2 invoices, you can issue a new invoice instead of collecting the original one outside JustOn.

Note

This is an exception procedure. It requires you to deactivate the integration for a short period, which affects the whole org: while Enable JustOn Cash Management is deselected, invoices finalized in the org do not produce entries, and they will need the same treatment afterwards.

Carry out this procedure at a time when no invoice runs or finalizations take place, and reactivate the integration immediately.

  1. Cancel the original invoice.

    Finalizing the cancellation invoice fails while the integration is active, because the original invoice has no entry to cancel. To finalize it, deselect the checkbox Enable JustOn Cash Management in the global settings, finalize the cancellation invoice, then select the checkbox again.

  2. Create a new invoice.

    On finalization, it produces an entry and can be collected through JustOn Cash Management.

  3. Write off the chargeback fees that belonged to the original invoice.

Checking Migration Result

After the migration, verify the following:

  • The Invoice field CM_IntegrationError is empty on the processed invoices. If the migration of a balance fails, the error message is written to this field.
  • The migrated invoices have entries, and the open amounts match the invoice balance.
  • A list view or report of balances with an empty Origin field shows what has not been migrated yet. Migrated balances carry the value JPAY1.

Checking Payment Booking Details

The integration changes how payment booking details are produced. Check the configuration before and after the switch, so that every payment is booked exactly once.

Workflow How booking details are produced
With the integration JustOn Billing & Invoice Management writes booking details directly from JustOn Cash Management payments as soon as a money flow is registered – settlement, reassignment, refund or chargeback. These booking details carry the Origin value JPAY1 and are linked to the payment.
Balance-based, without the integration The Export Balances Job produces booking details from payment-related balances. Balances with the Origin value JPAY1 are excluded from this job.

For details, see Payment Bookings With JustOn Cash Management and Balance-Based Workflow.

  1. Make sure that the booking data creation for payments is set up.

    The bookkeeping data creation must be globally enabled, and the Booking Detail lookup fields CM_Payment and CM_EntryItem must exist and be writable. For details, see Enabling Booking Data Creation for Payments.

  2. Before migrating invoices, run the Export Balances Job for all existing payment balances.

    This makes sure that their booking details exist before the balances receive the Origin value JPAY1 and are consequently no longer picked up by the balance-based job. It is also the precondition for the payment hash, which the invoice fix uses to detect split balances. Without it, one original payment produces several payment records.

  3. If you register payments manually, keep the Export Balances Job scheduled.

    Such payments produce regular balances without the Origin value JPAY1, which are still booked by the balance-based job.

  4. After the migration, compare the payment booking details with the payments for a sample of migrated invoices.

    Make sure that nothing is missing or duplicated before the next export to your accounting system.