Welcome to Zuora Product Documentation

Explore our rich library of product information

Validation of invoice line items for amount and usage variances

Validate invoice line items by comparing charge amounts and usage quantities against the most recent billing period, using variance rules and configurable thresholds.

The invoice line variance validator compares each invoice item's charge amount and usage quantity against the most recent posted billing period for the same charge.

Detection rules

The validator checks for the following conditions:

Rule

Trigger condition

Default threshold

Amount VarianceCharge amount change exceeds threshold2%
Usage VarianceUsage quantity change exceeds threshold50%
First-Time BillingNo historical invoice items exist for this charge
Zero Baseline - AmountHistorical baseline amount is zero
Zero Baseline - QuantityHistorical baseline quantity is zero

Run a line variance validation

To validate a bill run or invoice, describe your request to Zuora AI in plain language and include the bill run number or invoice number. You can also provide threshold overrides or custom field names. If you omit optional parameters, the agent prompts you to confirm the defaults before processing begins.

Examples:

  • Validate bill run BR-00019597 for amount and usage variances

  • Validate bill run BR-00008774 for amount and usage variances, use 10% amount threshold and 80% usage threshold

  • Validate invoice INV00049470 for amount and usage variances, saving validation status to my_status__c and validation reason to my_reason__c

After you confirm the parameters, the agent fetches the invoice data, runs the variance checks, and writes the result to each InvoiceItem in Zuora.

Configuration parameters

Parameter

Description

Default

amount_variance_thresholdMaximum fractional change in charge amount before flagging (e.g. 0.05 = 5%)0.02 (2%)
usage_variance_thresholdMaximum fractional change in usage quantity before flagging0.50 (50%)
validation_status_fieldInvoiceItem custom field to store the validation outcomevalidation_status__c
validation_reason_fieldInvoiceItem custom field to store the anomaly reasonvalidation_reason__c
Note: Threshold values must be greater than zero, custom fields must already exist in the tenant, and persistence is skipped if the custom fields do not exist.