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 Variance | Charge amount change exceeds threshold | 2% |
| Usage Variance | Usage quantity change exceeds threshold | 50% |
| First-Time Billing | No historical invoice items exist for this charge | — |
| Zero Baseline - Amount | Historical baseline amount is zero | — |
| Zero Baseline - Quantity | Historical 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 variancesValidate bill run BR-00008774 for amount and usage variances, use 10% amount threshold and 80% usage thresholdValidate 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_threshold | Maximum fractional change in charge amount before flagging (e.g. 0.05 = 5%) | 0.02 (2%) |
usage_variance_threshold | Maximum fractional change in usage quantity before flagging | 0.50 (50%) |
validation_status_field | InvoiceItem custom field to store the validation outcome | validation_status__c |
validation_reason_field | InvoiceItem custom field to store the anomaly reason | validation_reason__c |