Commerce Validation Rules
Overview
Validation Rules verify attribute or field values. Rules are linked to an action and only run when a specific action is clicked by the user.
For example, the user must populate Quote Description [quoteDescription_quote] with something before they click Submit. If the validation fails, show the user a message next to the attribute: 'Quote Description must be populated prior to quote submission'.
Validation rules will validate the attribute values in the context of the current document, and its associated parent/child, when the user clicks an action button. For example: You can write a rule to validate that the user has entered something into the Quote Description.
A validation rule has a condition and an action. When the condition is met, the validation runs on the action attribute value(s). Any constrained values will show up as a message to the user. Validations can be written and/or run on attributes in the main document or sub-document. For example: An attribute value on the main document could constrain a value in the line item grid and vice-versa.
Administration
Notes
- NULL and blank Integer values are treated as separate values:
- NULL= 0
- Blank = ""
- Using NULL as an attribute value is strongly discouraged.
- If you use logic that tests for NULL values in rule conditions or BML, confirm that the logic takes this difference into account.
Custom Variable Name Conventions
In Oracle CPQ 23D, CPQ adopted Oracle CX Sales variable naming conventions for custom items. When an administrator creates a new custom Commerce item, the "_c" suffix is appended to the variable name. The new naming convention for custom variable names provides more consistency for integrations with Oracle Sales.
Beginning in Oracle CPQ 24C, customers can submit a service request to disable the "_c" suffix on variable names for custom Commerce entities (Actions, Analytics, Attributes, Data Columns, Integrations, Library Functions, Rules, Steps, etc.). The "_c" suffix is enabled by default for standard and legacy Commerce processes.
- Customers can submit a Service Request (SR) on My Oracle Support to disable the "_c" suffix on variable names for custom Commerce entities
- When the "_c" is disabled, the "_c" variable name suffix will not be required for newly created custom Commerce entities.
- Disabling the "_c" variable name suffix for custom Commerce entities will not change existing variable names.
- The "_c" suffix setting will not impact existing variable names when cloning a Commerce process or migrating Commerce items. Target variable names will be the same as the variable names from the source Commerce process.
Notes:
- Oracle CPQ Standard Process provide a converged set of generic rules sourced from existing Oracle CPQ reference applications. The Standard Process rules cannot be deleted or modified, but they can be inactivated. For Validation type rules Linked Actions can be updated. Refer to Standard Process Rules to rules that are provided in the Standard Process.
- Use validation rules instead of advanced validations in actions. All validations will be written from the Commerce Rule Editor page. However, if you are upgrading from an earlier version of BigMachines or CPQ, your current advanced validations will remain in place, until you migrate to the new commerce validation rules.
- Test performance early and often – AJAX enabled constraint and access rules might make the Transaction page slow depending on the number of attributes, rules, use of advanced function, and so on. Performance tests are a must!