Wiki/Documents & Evidence/Document Templates: Different Boilerplate for Different Outbound Types
02Documents & Evidence4 min read

Document Templates: Different Boilerplate for Different Outbound Types

How the J5 templates system surfaces a different BOL for a sale versus an internal transfer, without copy-pasting from last month.

A bill of lading for a sale is not the same as a bill of lading for a recycling shipment. The legal language differs, the required fields differ, the destination party differs. Using one template for both means somebody has to remember to redact the parts that don’t apply, and somebody eventually forgets.

Per-type templates

/settings/core/templates is the platform’s template library. Each template is scoped to a document type (BOL, packing slip, loading report, recycling certificate, evidence package summary, disposal certificate, etc.). Outbound print documents also use the outbound type context (sale, recycling, internal-transfer, return-to-client, donation). The template is selected automatically when the operator prints a document or generates an evidence package.

Output stamp

Printable documents and evidence summary PDFs show the template name and version used for that output. If no active tenant template exists, the output says it used the platform default. That gives auditors a source trail without asking an operator to reconstruct settings later.

Variables

Templates are HTML with mustache-style variables: {{client.name}}, {{outbound.id}}, {{contract.terms}}. The variable resolver runs server-side at generation time, pulling from the relevant entity rows. Custom variables (per-tenant) can be defined in the template configuration, useful for region-specific legal text.

Versioning

Each template carries a version. Saving a new version doesn’t overwrite the previous one — historical documents reference the version that was active when they were generated, so a BOL re-rendered six months later looks the same as it did at generation time.

Default vs. tenant-custom

The platform ships with a default template for each document type — generic, legally adequate boilerplate. Tenants can override with custom templates that include their letterhead, their specific terms, their region’s required disclosures. The override is per tenant, so the platform default stays as the fallback for new tenants who haven’t customized yet.