Make non-required rating fields optional

If any data fields are displayed on the UI but aren’t required for rating, you can make them optional in two ways:

  • Change the Field Settings.
  • Use the bc.optional function.

Note: You can make a field optional only if it isn’t required for rating.

Field Settings

To make a rating field option in Field Settings:

  1. In the BriteCore menu, select Lines.
  2. In the Lines of Business list, select the applicable line of business.
  3. On the Line Overview screen, in the Products menu, navigate to and select the applicable product.
  4. On the Product Overview screen, in the Risk Types section, select the applicable risk type.
  5. In the Data Fields section, select the applicable data field.
  6. On the Edit Data Field screen, in the Field Settings section, under Required, select No.
  7. In the bottom-left corner of the screen, select Save Field.


This function marks data fields, rate tables, and items as optional. If a rate table is marked as optional, then BriteLines will determine which fields the rate table uses as sources and mark them as optional.

To use bc.optional(), wrap the data field, rate table, or item reference names in the function.

bc.optional with Rate Tables


bc.min(primaryDriverRateTable, bc.optional(secondaryDriverRateTable))

By wrapping secondaryDriverRateTable as bc.optional, all of the data fields that secondaryDriverRateTable points to will be optional during quoting.

If secondaryDriverRateTable has no default value set or you want to override the default value, then you can pass a default value to the bc.optional function.

Note: The default value must be a number.

bc.min(primaryDriverRateTable, bc.optional(secondaryDriverRateTable, default=1))

bc.optional with Items


mandatoryItem.premium.term.value + bc.optional(optionalItem.premium.term.value, default=0)

In this example, we add a mandatory item’s premium to an optional item’s premium.

  • If the mandatory item’s premium is 50 and the optional item exists on the policy and has a premium of 50, then this calculation will return 100.
  • If the mandatory item’s premium is 50 and the optional item hasn’t been enabled for the policy, then this calculation will return 50.
  • If the mandatory item’s premium is 50 and the optional item exists on the policy but can’t be resolved yet, then this calculation will return 50.

Optional fields in quoting

During quoting, a field will only be considered optional if:

  1. All calculations that refer directly to the field are wrapped in bc.optional().
  2. All rate tables that refer to the field are wrapped in bc.optional().

This means a field can be optional or required depending on the items selected for a risk.


  • If a quote has Item 1 enabled, then all Item 1 calculations mark the additionalDriver field as optional. It’s optional on the quote.
  • If Item 2 is enabled on the quote and it has calculations that refer to additionalDriver, which aren’t wrapped in bc.optional(), then Additional Driver becomes a required field (because it’s not filled out, then Item 2 couldn’t rate).