Skip to content

Class Constants, LOI & Retentions

Business constants are the shared lookup dictionaries that power dropdowns, labels, and classification fields across Workbench. This page covers how to define them, how to scope them to a specific LOB, and how to configure Limits of Indemnity and Retentions.

Business constants

Each business constant is a JSON array in config/{client}/business-constants/{name}.json. The filename must match the typeCode of the items inside it.

[
  { "typeCode": "currency", "itemCode": "GBP", "value": "British Pound Sterling" },
  { "typeCode": "currency", "itemCode": "USD", "value": "US Dollar" }
]
Field Description
typeCode Must equal the filename (without .json). Groups items of the same type.
itemCode Unique key within this type. Used in code references.
value Display label shown to users.
status Set to DELETED to suppress an inherited core constant item.
alt1, alt2, alt3 Supplementary values (usage varies by constant type).
additionalProperties Arbitrary key-value pairs for extended lookups (e.g. productCode, parent for hierarchy).

Overriding core constants

Workbench ships with a set of core business constants. Client config overrides are applied on top:

  • To suppress a core item: add an entry with the same itemCode and status: "DELETED".
  • To extend with new items: add new entries. Workbench merges core constants first, then applies client overrides.

LOB-specific constants (classConstantLists)

If you need to restrict which values from a business constant are visible for a specific LOB (e.g. only certain MTA reasons apply to Property), use classConstantLists in the business class file.

Step 1: Define the items in the relevant business-constants/ file:

// business-constants/mta_reason.json
[
  { "typeCode": "mta_reason", "itemCode": "ADDITIONAL_COVER", "value": "Additional Cover Required" },
  { "typeCode": "mta_reason", "itemCode": "CHANGE_OF_ADDRESS", "value": "Change of Address" }
]

Step 2: Cross-reference the allowed items in the business class file:

// business-class/property.json
{
  "classConstantLists": [
    {
      "type": "mta_reason",
      "constants": [
        { "code": "ADDITIONAL_COVER" }
      ]
    }
  ]
}

Note

classConstantLists is a filter, not a standalone definition. Items must still exist in the global business-constants/ files. Only items listed in classConstantLists will appear for this LOB.

Limits of Indemnity

LOIs available for a LOB must be defined in business constants first, then declared in the business class file.

LOI codes describe the type of limit (e.g. Per Person, Per Event, Aggregate), not the monetary amount. The actual monetary value is captured on the risk itself.

Step 1: Define LOI values in business-constants/limit_of_indemnity.json:

[
  { "typeCode": "limit_of_indemnity", "itemCode": "LOI_PERSON", "value": "Per Person Limit" },
  { "typeCode": "limit_of_indemnity", "itemCode": "LOI_EVENT", "value": "Per Event Limit" },
  { "typeCode": "limit_of_indemnity", "itemCode": "LOI_AGG_LIMIT", "value": "Aggregate Limit" }
]

Step 2: Declare the applicable LOIs in the business class file:

{
  "limitOfIndemnities": [
    { "loiCode": "LOI_PERSON" },
    { "loiCode": "LOI_EVENT" },
    { "loiCode": "LOI_AGG_LIMIT" }
  ]
}

Retentions

The same pattern applies for retentions.

Step 1: Define retention values in business-constants/retention.json:

[
  { "typeCode": "retention", "itemCode": "RET_10K", "value": "GBP 10,000 Each and Every Loss" },
  { "typeCode": "retention", "itemCode": "RET_25K", "value": "GBP 25,000 Each and Every Loss" }
]

Step 2: Declare the applicable retentions in the business class file:

{
  "retentions": [
    { "retentionCode": "RET_10K" },
    { "retentionCode": "RET_25K" }
  ]
}

Tips

  • Business constant itemCode values are case-sensitive throughout.
  • If a dropdown shows raw codes instead of display labels (e.g. LOI_1M instead of GBP 1,000,000), the most common cause is a missing or mismatched typeCode in the business constants file.
  • The alt1, alt2, alt3 fields are used by some core constant types — for example, alt1 = FORM or alt1 = SUBJECTIVITY on doc_clause_sub_category items to classify clause types.