Skip to content

Template Config

The template config file links each operation name to an HTML template file. It also controls date validity (evaluated against the risk's inception date) and how the template is uploaded to the system.

File location

document-template/config/{bc}/{placing-type}.json

For example: document-template/config/property/open-market.json

Fields

Field Description
businessClassTypeCode The LOB type code this template applies to
placingType OPEN_MARKET, MASTER, DEC, etc.
riskType NEW, MTA, RENEWAL
operationNames Array of operation names this template is available to (e.g. ["document_creation", "quote_document_generation"]). Must match the operation names in the risk action config exactly
startDate / endDate Date range during which this template is valid. Evaluated against the risk's inception date.
fileName The HTML file name within document-template/files/{bc}/
uploadSource DEPLOYMENT: uploaded from the repository on deployment. ADMIN_UI: uploaded through the admin interface.
sortOrder Determines template ordering where multiple templates match the same criteria
clientSpecificSearchCriteria Optional. Enables custom Java rules in the client microservice to select the template
supportingDocument true to mark this as a supporting document (appendix). Not shown in the preview tab.

Example config file

[
  {
    "businessClassTypeCode": "PROPERTY",
    "placingType": "OPEN_MARKET",
    "riskType": "NEW",
    "operationNames": ["document_creation", "quote_document_generation"],
    "startDate": "2024-01-01T00:00:00Z",
    "endDate": "2099-12-31T23:59:59Z",
    "fileName": "property-quote-slip.html",
    "uploadSource": "DEPLOYMENT",
    "sortOrder": 1
  },
  {
    "businessClassTypeCode": "PROPERTY",
    "placingType": "OPEN_MARKET",
    "riskType": "NEW",
    "operationNames": ["document_creation", "quote_document_generation"],
    "startDate": "2024-01-01T00:00:00Z",
    "endDate": "2099-12-31T23:59:59Z",
    "fileName": "property-schedule.html",
    "uploadSource": "DEPLOYMENT",
    "sortOrder": 2,
    "supportingDocument": true
  }
]

Date validity

startDate and endDate define when a template is valid, evaluated against the risk's inception date (not today's date). This allows you to maintain multiple template versions simultaneously:

  • Templates valid for older risks (using the old design)
  • Templates valid for new risks (using the new design)

When a document is generated, Workbench selects the template whose date range covers the risk's inception date. If multiple templates match, sortOrder determines which is used.

uploadSource

Value Behaviour
DEPLOYMENT Template file is uploaded from the repository on deployment. A new deployment overwrites the previous version.
ADMIN_UI Template was uploaded through the admin interface. Not overwritten on deployment. Use when a client manages their own template content outside the repo.

clientSpecificSearchCriteria

When a single operation can produce different documents depending on risk data (e.g. different templates for different industry sectors), clientSpecificSearchCriteria allows the client microservice to make the selection decision.

When this flag is set, Workbench calls the client microservice's DocumentTemplateSelectionService implementation, passing the risk context, and uses the returned template code.

Note

clientSpecificSearchCriteria requires Java development in the client microservice. It is an advanced pattern — use it only when date-based template switching is insufficient.