Guide Fixing errors

Billing Central contract line errors and what they mean

Updated 4 min read By the BAFO team

Short answer: When Billing Central refuses a contract line, the message usually names the rule: a line needs a product or service, the same currency as the contract, a charge term only on Recurring Fixed lines, a start date on or before the contract's end date, a usage date inside the line. When lines are sent in one request that must succeed as a whole, one bad line makes every other line report ALL_OR_NONE_OPERATION_ROLLED_BACK, so find the one line that carries the real message. These are the messages, with what each means.

A note on where the messages come from

These are messages Billing Central can return when a contract or its lines are created through the API. Some come from rules in the Billing Central package, and some are FIELD_CUSTOM_VALIDATION_EXCEPTIONs, which means a validation rule: your org may add its own, or not have these. Treat the list as a map of the kinds of mistake, not a complete catalogue, and check each against your org.

The messages

MessageWhat it meansThe fix
FIELD_CUSTOM_VALIDATION_EXCEPTION: Enter a product or serviceA line has no Product or ServiceSet ffbc__ProductService__c on every line
FIELD_CUSTOM_VALIDATION_EXCEPTION: Enter the same Currency as the contractA line's currency differs from the contract'sGive each line the contract's currency
FIELD_CUSTOM_VALIDATION_EXCEPTION: Charge Term is only allowed on lines where the billing type is Recurring FixedA charge term was set on a One-off or Recurring Variable lineClear the charge term, or change the billing type
Enter a Start Date that falls on or before the contract End DateA line starts after the contract endsCorrect the line's start date, or extend the contract's end date
ALL_OR_NONE_OPERATION_ROLLED_BACKAnother line in the same insert failed, so this one was undoneFind the line with the real message and fix it
The date of the usage record must fall between the start and end dates of the contract line itemA usage record is dated outside the lineMove the date inside the line, or extend the line
NOT_FOUND: The requested resource does not existThe object name is wrong or not visible to the userCheck that Billing Central is installed and the user can see it

"Enter a product or service"

The line has no Product or Service, and Billing Central refuses it. Where the contract names a product that exists in your catalogue, use it; where it does not, someone has to choose.

"Enter the same Currency as the contract"

In a multi-currency org, each line carries a currency, and it has to equal the contract's. A contract is in one currency; so are all its lines. A contract that bills in two currencies is two contracts. See also the currency rule for discounts in discounts on contract lines: on the enhanced contract page a discount must be in the contract's currency too.

"Charge Term is only allowed on lines where the billing type is Recurring Fixed"

The charge term sets the period over which a line is charged when that differs from how often it is billed, and Certinia's help limits it to Recurring Fixed lines. It appears when a column for it is filled on a line of another type. See billing types explained.

"Enter a Start Date that falls on or before the contract End Date"

A line cannot start after the contract has ended. A common cause is a later phase, such as an annual uplift, on a contract that is only a year long: the second phase would start after the end.

"ALL_OR_NONE_OPERATION_ROLLED_BACK"

When lines are inserted in one request that succeeds only if every line does, a single bad line fails the request and every other line comes back with this code. It looks as if every line is wrong. It is the opposite: only one is, and the rest were undone with it. Look for the one row whose message is something else.

"The date of the usage record must fall between the start and end dates"

Usage is billed from records dated inside the billing schedules of its line, and Billing Central refuses a record dated before the line starts. A record dated after the line ends is accepted and never billed. See usage billing.

"NOT_FOUND: The requested resource does not exist"

Salesforce is saying that the object name in the request does not exist for this user. In practice: the Billing Central package is not installed in the org, or the connected user cannot see its objects.

A way to work through a failed batch

  1. Read the batch result and find the one line whose message is not ALL_OR_NONE_OPERATION_ROLLED_BACK.
  2. Fix that line's cause from the table.
  3. Send the batch again once the cause is fixed. If several lines failed for different reasons, fix them all first; the next attempt would otherwise show the next one.

Frequently asked questions

Why does every line say it was rolled back?

When lines are sent together in one request that must succeed as a whole, one failed line causes the whole request to be undone, and the others report the rollback.

Does a validation message mean the package is broken?

No. Most of these come from validation rules, and they protect data the package needs. Customers can also add their own rules, so a message you do not recognise may be yours.

Can I turn the validations off?

You can change your own rules with your administrator. The package's rules are there because billing breaks without what they check.

Sources and further reading

Where this page leans on someone else's documentation or standard, it is listed here. Check the release or edition your org runs: official pages change.

Keep reading