ServiceCortex
Documents

Document Templates

Building document templates with the form builder

Document templates let you define structured forms that your team fills in on the job -- safety checklists, inspection reports, site assessments, and more. Templates use a versioned schema so you can evolve forms over time without breaking documents that have already been completed.

Creating a template

Navigate to Documents > Templates and click New Template. Fill in the following details:

  1. Name -- a descriptive name such as "Site Safety Assessment" or "Vehicle Inspection Report". A URL-friendly slug is generated automatically.
  2. Description -- an optional summary of what the template is used for.
  3. Entity types -- choose which entities (jobs, clients, properties) can use this template.
  4. Category -- assign an existing document category to group generated documents.
  5. Signing order -- choose whether signers sign in sequential order or in parallel (any order).
  6. Expiry days -- optionally set a default number of days before generated documents expire.

Click Create to save the template. It starts in a Draft status and is not available for use until you publish a version.

Template statuses

StatusDescription
DraftThe template is being built. Not available for document generation.
PublishedAt least one version has been published. The template is live.
ArchivedThe template has been retired. Existing documents are unaffected.

Archived templates cannot be edited or published. To bring a template back, you would need to create a new one.

Building the form schema

Each template version contains a fields schema that defines the form layout. The schema is organised into sections, and each section contains fields.

Sections

Sections group related fields together. Each section has:

  • Title -- displayed as a heading in the form.
  • Description -- optional helper text below the heading.
  • Order -- controls the display sequence.
  • Collapsible -- allows the section to be collapsed in the UI.
  • Conditional visibility -- show or hide the section based on the value of another field.

Field types

Field TypeDescription
TEXTSingle-line text input.
TEXTAREAMulti-line text input for longer descriptions.
NUMBERNumeric input with optional min/max validation.
CURRENCYMonetary amount input.
DATEDate picker.
DATETIMEDate and time picker.
SELECTDropdown with predefined options.
MULTISELECTDropdown allowing multiple selections.
BOOLEANYes/No toggle or checkbox.
HAZARD_LISTSpecialised list for recording hazards and risk levels.
TABLETabular data entry with configurable columns.
HEADINGDisplay-only heading for visual structure (not a data field).
PARAGRAPHDisplay-only text block for instructions or context.

Field configuration

Every field supports the following properties:

  • Key -- a unique identifier used for data binding and conditional logic. Must be unique across the entire template.
  • Label -- the display label shown in the form.
  • Placeholder -- hint text shown when the field is empty.
  • Help text -- additional guidance displayed below the field.
  • Required -- whether the field must be filled in before submission.
  • Validation rules -- optional rules such as minimum/maximum length, numeric ranges, or regex patterns.
  • PDF config -- controls PDF rendering, including width (full or half) and page break behaviour.
  • Conditional visibility -- show or hide the field based on the value of another field.

Conditional visibility

Both sections and fields can be shown or hidden based on form data. Conditions use an AND/OR operator with one or more rules:

  • equals / notEquals -- exact value match.
  • contains -- partial string match or array inclusion.
  • gt / lt -- numeric greater-than or less-than comparisons.
  • isEmpty / isNotEmpty -- checks whether the field has a value.
  • in -- checks whether the value is in a predefined list.

Template versioning

Templates support multiple versions. This lets you update form fields without affecting documents already generated from an earlier version.

  1. Navigate to the template and click New Version.
  2. Edit the fields schema, conditions schema, and layout schema.
  3. Optionally add change notes to describe what changed.
  4. Click Save to create the version as a draft.

The version number increments automatically. Only one version can be active at a time.

Publishing a version

Before a template can be used to generate documents, you must publish a version:

  1. Open the template and navigate to the Versions tab.
  2. Click Publish next to the version you want to make active.
  3. The system validates that the template has at least one signer role defined. If not, you must add one first.

Publishing deactivates any previously active version. Existing documents generated from the old version continue to use their original schema.

Signer roles

Signer roles define who needs to sign documents generated from the template. Navigate to the Signer Roles tab on a template to manage them.

  1. Click Add Signer Role and provide:
    • Role name -- a display name such as "Site Supervisor" or "Client".
    • Role key -- a unique identifier used in the system (e.g., site_supervisor).
    • Role type -- the category of signer (e.g., internal team member or external client).
    • Required -- whether this signer must sign for the document to be complete.
    • Assignment rule -- optional logic for auto-assigning the signer.
  2. Use Reorder to change the signing sequence when the template uses sequential signing.
  3. Signer roles that are already in use by generated documents cannot be deleted.

What's next

On this page