--- title: Configure the invoice quantity validation extension point description: Implement the invoice quantity check extension point to enable the invoice dispute intake assistant AI agent to validate a customer's quantity dispute claim by reconciling it with delivered quantity data from your Enterprise Resource Planning \(ERP\) or inventory system. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/order-management/configure-invoice-quantity-check-ep.html release: australia topic_type: task last_updated: "2026-02-27" reading_time_minutes: 3 keywords: [ServiceNow Otto, AI Agents, generative AI, agentic AI] breadcrumb: [Configuring the Manage Invoice Operations application, Business Portal, Configure, Sales Customer Relationship Management] --- # Configure the invoice quantity validation extension point Implement the invoice quantity check extension point to enable the invoice dispute intake assistant AI agent to validate a customer's quantity dispute claim by reconciling it with delivered quantity data from your Enterprise Resource Planning \(ERP\) or inventory system. ## Before you begin The application scope must be set to Manage Invoice Operations. You can change the application scope using the application picker \[Omitted image "globe-outline-24.svg"\] Alt text: in the Unified Navigation bar. Role required: admin ## About this task The demo data for the Manage Invoice Operations application includes a sample implementation called invoiceQuantityCheckDemo as part of the sn\_inv\_ops\_aias.invoiceQuantityCheckEP extension point. To enable real-world validation of quantity disputes against your external ERP system or inventory delivery records, replace the demo implementation with your own custom logic. The demo implementation also illustrates a fallback pattern. When sold product information is unavailable on an invoice line, the function validates the disputed quantity against the corresponding sales order line quantity instead. You can mirror this pattern in your custom implementation when applicable. ## Procedure 1. Log in to the ServiceNow instance. 2. Navigate to **All** > **System Extension Points** > **Scripted Extension Points**. 3. Search for the sn\_inv\_ops\_aias.invoiceQuantityCheckEP scripted extension point in the **API Name** field. 4. View the sample script included in the demo data by selecting **sn\_inv\_ops\_aias.invoiceQuantityCheckEP**. 5. Create your own implementation of the extension point by selecting the **Create implementation** related link. 6. On the Script Include form, fill in the fields. For a description of the Script Include form fields, see [Script includes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/scripts/c_ScriptIncludes.md). 7. Override the functions in the script to implement your logic for validating the customer's quantity dispute claim. - **checkInvoiceQuantityWithInvoiceCase** Placeholder function meant to be overridden. Use this placeholder to implement the logic to validate quantity disputes across multiple invoice lines associated with an invoice case. Input: ``` { "invoiceNumber": , "verifiedInvoiceLineDetails": ``` Output: ``` { “invoiceLineNumber”: , “disputedQuantity”: } ``` - **checkInvoiceQuantity** Placeholder function meant to be overridden. Use this placeholder to implement the logic to validate a quantity dispute by reconciling the customer's claimed quantity against your ERP or inventory delivery records. Input: ``` { "invoiceNumber": , "invoiceLineNumber": , "userEnteredQty": } ``` Output: ``` { "invoiceLineNumber": , "invoiceQty": , "deliveredQty": , "qtyMatch": , "isError": , "errorMessage": } ``` 8. Select **Update**. 9. Validate your implementation by submitting an invoice dispute from the Business Portal using the ServiceNow Otto Virtual Agent. For more information, see [Dispute invoice issues using ServiceNow Otto Virtual Agent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/dispute-invoice-issues-now-assist.md). **Parent Topic:**[Configuring the Manage Invoice Operations application](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/order-management/configuring-manage-invoice-operations.md) **Related topics** [Using extension points to extend application functionality](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/extension-points.md) [Creating and adding a scripted extension point](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/web-services/impl-scripted-ext-pts-base-code.md)