Rules are part of your company configuration, alongside your fields, pages, and
option sets. To add or change one, contact your AI Insurance team — tell them
which form, when it should be added, and where it belongs in the order. Once the
configuration is applied, the rules run automatically during the quote flow.
Auto-added forms apply to the quote flow. Rules may reference Quote
forms and Policy forms (the two form categories used in quoting) — both are
added to the quote as it is built. Claim/Incident forms are attached by hand on
an event and can’t be auto-added.
How a rule is configured
Each rule is one entry in theformLogicRules section of your company’s
configuration, with three properties:
Only the forms you want auto-added are listed.
formLogicRules holds
auto-add rules, not your forms. Every form template you’ve uploaded is available
for the user to add by hand on the Forms step whether or not it has a rule —
so a form that doesn’t need any logic simply isn’t listed. (A rule with an empty
addCondition is allowed, but it behaves exactly like having no rule — the form
isn’t auto-added — while still using up a rank. There’s no reason to add one.)1
Upload the form template first
A rule references a form by its form number, so the form template must
already exist for the company. If a rule references a form that hasn’t been
uploaded, the configuration is rejected. See
Form templates for how templates are uploaded and
managed.
2
Add a rule for each form you want auto-added
A form gets at most one rule. Set its
formNumber, give it a unique rank,
and write its addCondition. Forms that don’t need auto-add logic are left
out of formLogicRules entirely.3
Apply the configuration
The rules are validated along with the rest of the configuration; any problem
with a rule is reported before anything is saved. An export returns the rules
back out, so you can always see exactly what’s configured.
Writing conditions
addCondition is a Jexl expression —
the same kind you already use for field display and required conditions.
It is evaluated against the quote’s field values, and the form is added only when
the expression is true.
- Reference fields by their bare reference ID (no
quote.prefix), exactly as in display/required conditions — e.g.state == 'CA'orvehicleCount > 5. - Field references are type-checked when the configuration is applied, so a misspelled field name is caught before anything is saved. At runtime, a condition that can’t be resolved (for example, a field with no value yet) is treated as false — the form simply isn’t added.
Rules and limits
Validation enforces a few constraints so the rule set stays unambiguous:- One rule per form. Two rules referencing the same form number are rejected (“each form may have at most one rule”).
- Unique ranks. Two rules with the same rank are rejected (“ranks must be unique”).
- Eligible forms only. A rule may reference a Quote or Policy form. Referencing a Claim/Incident form is rejected (“Forms logic can only add Quote or Policy forms”).
- The form must exist. Referencing a form number with no uploaded template is rejected (“…does not exist for this company. Upload the form template first, then re-import.”).
How it behaves in the quote flow
When someone builds a quote, the rules run once and stage the matching forms onto the quote — you’ll see them appear under Selected Forms on the Forms step.Runs once per quote
Auto-add happens once, while the quote is still a draft — either when the
Forms step is opened, or at the first save if that step was skipped. A quote
that’s already been saved is never re-evaluated.
Respects your changes
Because it never re-runs, anything you do afterward sticks. Remove an
auto-added form and it stays removed when you reopen the quote; the rules
won’t put it back.
Because rules evaluate only once, changing an answer after the forms have
been added won’t update the form set on its own. Use the Add Recommended
Forms button (below) to re-apply the rules.
The “Add Recommended Forms” button
The Forms step’s Selected Forms card has an Add Recommended Forms button (the icon). It’s the manual escape hatch for the cases auto-add doesn’t cover on its own:- A quote that was saved before the form set was complete (auto-add only runs on a fresh draft).
- Re-applying the rules after you’ve changed an answer that a condition depends on.
- Pulling in recommended forms on a quote where they were never added.
The button only adds forms — it never removes one you’ve taken off. It
de-duplicates against what’s currently shown, so a form you removed and want
back will be re-added, while forms still in the list aren’t duplicated.
Re-added forms land at the end of the list rather than back in their
original positions — but among themselves they keep rank order.
