---
sourceDocument: Australia Finance and Supply Chain
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/source-to-pay-operations

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Finance and Supply Chain

ft:clusterId :

    - stpop

bundleId :

    - stpop

workflow :

    - Employee


---

# Post upgrade tasks for APO

# Post upgrade tasks for APO {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read  
Review and complete required post-upgrade tasks after upgrading Accounts Payable Operations.

## Upgrade configuration for Accounts Payable Operations integration with Document Intelligence {#ariaid-title2}

Complete post-upgrade tasks after upgrading Accounts Payable Operations, including upgrading copied use cases to the latest Document Intelligence model.

### Before you begin

Role required: admin

Install the Document Intelligence for Accounts Payable Operations Content Pack from the ServiceNow® Store.

### Procedure

1. Select the DO NOT USE- Invoice processing V7 use case as source.
2. Navigate to AllDocument Data Extraction AdministrationUse Cases.
3. Search for DO NOT USE- Invoice processing V7 and create a duplicate copy using the ![duplicate icon]() icon.
4. Save the copied use case.  
   Use the copied use case in flows and task definitions.
5. To upgrade the copied use case to the latest Document Intelligence model, perform the following steps:
   1. Navigate to AllFix Scripts.
   2. Search for Update DocIntel base_trained_model and select Run Fix Script.  
      The existing copied use case is updated to the latest DI base model.
   {#upgrade-apo-di__substeps_krl_2by_dfc}

## Restructured Invoice table {#ariaid-title3}

The invoice and invoice line tables are restructured in the Xanadu release.  
Before Washington DC release, invoice and invoice line tables were standalone tables. With Xanadu release, the following changes are done:

* The invoice table \[sn_shop_invoice\] extends the base invoice table \[sn_fin_base_invoice\].
* The invoice line table \[sn_shop_invoice_line\] extends the base invoice line table \[sn_fin_base_invoice_line\].
{#restructured-apo-invoice-table__ul_gjx_xlw_dcc}
Figure 1. Invoice Table structure

After you upgrade from Washington DC to Australia release, verify that your existing invoice and invoice line data has been migrated correctly. If you notice that your invoice and invoice line tables didn't migrate properly, use the [Now Support Portal](https://support.servicenow.com/now) to raise a case with the Technical Support team.

## Run glide fix script to migrate existing data {#ariaid-title4}

When you upgrade the instance from Washington DC to Australia release, you must manually run the glide fix to update the invoice and invoice line tables to their respective base tables.

### Before you begin

Note:  
Run this fix script only if you upgraded from the Washington DC release or earlier. If your instance was provisioned on Xanadu or later, the invoice and invoice line tables already extend their base tables and no action is required. The script detects this and exits without making changes, writing `No reparenting required` to the system log. This result is expected and does not indicate a failure.

Role required: admin

### About this task

The base invoice and base invoice line tables were introduced in Xanadu. This one-time migration brings invoice data created before the
upgrade into line with the current table structure. For more information, see [Restructured Invoice table](https://www.servicenow.com/docs/9zO2xGenf7UogyWjymIoIg#restructured-apo-invoice-table "The invoice and invoice line tables are restructured in the Xanadu release.").

### Procedure

1. Navigate to AllSystem DefinitionFix Scripts.
2. Select New.  
   A new Fix script record opens.
3. Open the fix script record.
4. Enter Name as re-parent invoice table.
5. Deselect the Record for rollback check box.
6. In the Script field, add the following code for the invoice line:  

       (function() {
                   const invoiceLinetableToReparent = "sn_shop_invoice_line";
                   const invoiceLineNewExtends = "sn_fin_base_invoice_line";
                   const oldExtends = "";
       var invoiceLineGr = new GlideRecord("sys_db_object");
               invoiceLineGr.get("name", invoiceLinetableToReparent);
               if(invoiceLineGr.super_class.name == invoiceLineNewExtends) {
                   gs.info("{0} table already reparented to {1}. No reparenting required.", invoiceLinetableToReparent, invoiceLineNewExtends);
                   return;
               }
       try {
                   
                   var invoiceLinetpc = new GlideTableParentChange(invoiceLinetableToReparent);
                   var reparentInvoiceLineResult = invoiceLinetpc.change(oldExtends, invoiceLineNewExtends);

               } catch (e) {
                   gs.warn("Table parent change for sn_shop_invoice_line did not complete. Error: {0}", e);
               } 
       })();

7. In the Script field, add the following code for invoice:  

        (function() {
               const invoiceTableToReparent = "sn_shop_invoice";
               const oldExtends = "";
               const invoiceNewExtends = "sn_fin_base_invoice";
       var invoiceGr = new GlideRecord("sys_db_object");
               invoiceGr.get("name", invoiceTableToReparent);
               if(invoiceGr.super_class.name == invoiceNewExtends){
                   gs.info("{0} table already reparented to {1}. No reparenting required.", invoiceTableToReparent, invoiceNewExtends);
                   return;
               }
        try {
                   var tpc = new GlideTableParentChange(invoiceTableToReparent);
                   var reparentResult = tpc.change(oldExtends, invoiceNewExtends);
               } catch (e) {
                   gs.warn("Table parent change for sn_shop_invoice did not complete. Error: {0}", e);
               } 
        })();

8. SelectSave.
9. Select Submit.  
   The Fix script is created.
10. Select Run Fix Script.
11. Verify that the re-parenting succeeded. Navigate to AllSystem DefinitionTables, open `sn_shop_invoice`, and confirm that Extends table shows `sn_fin_base_invoice`. Repeat for `sn_shop_invoice_line`, which must extend `sn_fin_base_invoice_line`.  
    If either table still shows no parent table, check the system log for warnings from this fix script. For guidance on unmigrated invoice data, see [Restructured Invoice table](https://www.servicenow.com/docs/9zO2xGenf7UogyWjymIoIg#restructured-apo-invoice-table "The invoice and invoice line tables are restructured in the Xanadu release.").

### Result

The parent invoice and invoice line tables are changed to respective base tables.
**Related tasks**   

* [Run the fix script for Accounts Payable Operations](https://www.servicenow.com/docs/GclfnZmKRjyosfFy42RYJA "Run the fix script for the successful installation of Accounts Payable Operations.")

## Run fix script for exceptions {#ariaid-title5}

Run the fix script after upgrading to the Australia to recalculate amounts and quantities for in-process invoices with Insufficient Goods Receipt and amount line and header variance conditions.

### Before you begin

Role required: AP admin

### Procedure

1. Navigate to Source-to-Pay WorkspaceAllsysauto_script.LIST table.  
   The Scheduled Script Executions page appears.
2. Search for script "APM - Recalculate In-Process Invoice Amounts and Quantity".
3. Select Execute Now to run the fix script.

### Result

The script ensures invoices that are in-process state are re-calculated against amount and quantity as per the logic of Insufficient goods receipt, Insufficient line and header amount variance.
**Related concepts**   

* [Invoice exceptions](https://www.servicenow.com/docs/TUubLhOZ4Vi39YOMAHNJ3w "Invoice exceptions are discrepancies during invoice processing that must be resolved before payment, such as missing data, tax variances, or supplier issues.")

## Run scheduled job for cost allocation {#ariaid-title6}

Run a scheduled job to copy cost allocations from invoice line to purchase order line when upgrading Accounts Payable Operations from lower to higher version.

### Before you begin

Role required: admin

### Procedure

1. Navigate to AllScheduled JobsUpdate Cost Allocation for the invoice.
2. Select the Active check box.
3. In the script, add the following encodedQuery:  

       var encodedQuery = sn_shop.InvoiceLine.ORDER_LINE + 'ISNOTEMPTY^' + sn_shop.InvoiceLine.INVOICE + '.' + sn_shop.Invoice.STATE + 'IN' + sn_shop.Invoice.STATE_DRAFT + ',' + sn_shop.Invoice.STATE_PO_MAPPING_ERROR + "," + sn_shop.Invoice.STATE_SUSPECTED_DUPLICATE;

4. Select Save and Execute Now.  
   During the upgrade Accounts Payable Operations, cost allocation is auto-updated when purchase order lines are mapped to invoice lines.

*[\>]: and then


