You are here:
Add Optional Coverage Validation Rules
To validate whether an optional coverage can be selected in a quote or policy, create optional coverage validation rules. These rules can display custom error messages that tell your users how to fix a problem that keeps them from adding an optional coverage. For example, a rule can ensure that a certain optional coverage isn't selected if a different optional coverage is already selected.
The following services used in OmniScripts and Integration Procedures run optional coverage validation rules.
-
InsProductService:getRatedProducts
Set
validateCoverageSelectiontotrueto run optional coverage validation rules. -
InsProductService:repriceProduct
Set
validateCoverageSelectiontotrueto run optional coverage validation rules. -
Set
validateCoverageSelection=trueto run optional coverage validation rules.
- Go to the Coverages tab on the policy Product page.
- On the coverage marked Optional, click the Rules icon.
-
Enter the following:
-
Expression
The conditions under which Vlocity triggers this rule.
You can use root product, coverage, and insured item attribute values in optional coverage validation rules.
NoteIf you use
isSelectedin the expressions for validation rules, the rules are evaluated by the following services: -
Severity
How serious this issue is.
Use an Error if you want to stop OmniScript users from proceeding with tasks for optional coverage validation rules. When a user triggers an Error message, they see the message text and are blocked from continuing with the task until they go back and fix the error.
For example, if you set a rule that triggers an Error if a user enters a Policy Deductible > $5000, a user who enters $6000 must go back and enter $5000 or less in the Policy Deductible field before they can move forward.
NoteAll Severity settings display messages in the same color and position.
-
Message
A well-formed message that tells your users what the problem is and how to fix it (for an error) or what's going on (for information only).
Here's an example of the syntax:
-
-
Update OmniScripts that use the validation rules and run tests.
-
In an OmniScript, for any remote action or selectable item that uses the
InsPolicyService:
repriceProduct service and needs these rules to trigger, set the
remote option
validateCoverageSelectiontotrue. - Go through the preview of the OmniScript.
- Select optional coverages that have validation rules defined.
- Verify that the message you set appears when you meet conditions of the validation rules.
-
In an OmniScript, for any remote action or selectable item that uses the
InsPolicyService:
repriceProduct service and needs these rules to trigger, set the
remote option

