---
id: CON-ACC-BKS-004
name: Document Template
feature: FEAT-ACC-BKS-05
product_area: accounting
module: books
revision: 1
status: draft
product_intent: confirmed
implementation_evidence: partially-observed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
definition: >-
  A document template combines fixed content and kind-specific merge fields for
  Accounting documents or software downloads.
owned_by: MOD-ACC-BKS
synonyms:
  - invoice template
  - statement template
  - batch download format
not_to_be_confused_with:
  - Billing reminder and collection content.
  - Platform record-entry forms and layouts.
  - CRM message templates.
facets:
  - name: Permanent kind
    meaning: The document kind defines applicable fields and template parts.
    used_for: Selecting the appropriate document content.
  - name: Protected starting content
    meaning: >-
      Rhythm-provided content can be inspected and copied but cannot be altered
      in place.
    used_for: Starting customer templates from built-ins.
  - name: Message content
    meaning: E-mail sources and addressing choices accompany applicable document kinds.
    used_for: Preparing document delivery.
  - name: Statement audience
    meaning: >-
      Statement mode selects all customer contacts or contacts through chosen
      roles.
    used_for: Choosing statement recipients.
  - name: Merge vocabulary
    meaning: >-
      Kind-specific fields and formatting filters supply supported dynamic
      content.
    used_for: Authoring valid Liquid.
  - name: Draft rendering
    meaning: Sample output makes unsaved content and its problems inspectable.
    used_for: Reviewing a template before saving.
  - name: Content selection
    meaning: >-
      Explicit requests, unit choices and the statement default feed template
      resolution.
    used_for: Producing the chosen document kind.
relationships:
  - to: CON-ACC-BKS-001
    statement: Unit template selections create usage that protects their chosen content.
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      409 to deleting the business unit’s template, naming the unit
  - to: CON-ACC-BKS-006
    statement: The workspace setting supplies the default statement selection.
    provenance: test
    source: >-
      services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js#answers
      the settings with their default statement template at version 1
lifecycle:
  - state: active
    meaning: Eligible for selection and rendering.
    how_it_changes: Authorized staff deactivate it once usage allows.
  - state: inactive
    meaning: Retained without use by the shared resolver.
    how_it_changes: Authorized staff restore active standing.
acted_on_by:
  - CAP-ACC-BKS-014
  - CAP-ACC-BKS-015
  - CAP-ACC-BKS-017
visible_to:
  - ACT-ACC-001
  - ACT-ACC-002
  - ACT-ACC-004
evidence:
  - >-
    Verified source file:
    services-accounting:modules/books/db/business-units.table.ts
  - >-
    Verified source file:
    services-accounting:modules/books/db/document-templates.table.ts
  - >-
    Verified source file:
    services-accounting:modules/books/tests/e2e/document-templates.e2e.spec.js
supersedes: []
---

# Document Template

## What It Is

A document template supplies the content and formatting used for an Accounting document or accounting-software download. It combines fixed wording with merge fields appropriate to a particular document kind. The customer can prepare invoice, receipt, statement and batch-download content without making every business unit maintain its own copy. Units select templates separately from editing their content.

Rhythm provides protected built-ins that staff can inspect and duplicate. A copied template becomes customer-maintained content with its own identity and active standing. Staff edit Liquid sources and preview them against sample data before saving. A template’s kind determines the variables and parts it may carry, so changing content does not turn an invoice template into a statement or software export.

## What It Is Not

Accounting templates are distinct from console layouts and forms, which define record presentation and entry. Billing reminders and dunning content serve separate workflows, and a CRM communication template has a different purpose. A preview is a draft rendering against sample information; it neither saves the template nor proves that every producing workflow adopts the shared resolver.

## How It Is Used

The controller opens the relevant kind tab and starts a customer template from a built-in copy or new content. They insert available merge fields, review the preview and correct any validation problems. Once the content is ready, they select it on a unit or as the workspace’s statement default. Readers can inspect the same editor without changing sources.

Staff should check usage before removing obsolete content. Configuration prevents removal or deactivation when a unit or default still depends on the template. Clearing those selections releases it for later cleanup. Explicit unusable choices produce a refusal rather than quietly substituting another document.

## Its Facets

**Kind.** The permanent kind separates the document purposes and supplies their allowed fields. It also determines where staff can select the template.

**Built-in content.** Protected templates provide a reusable starting point. The invoice built-in’s limited content means customers should inspect its output rather than assume it already contains every desired detail.

**E-mail parts.** Subject, body and related addressing choices accompany documents where applicable. A statement requires e-mail content, while a batch download uses file output instead.

**Statement recipients.** Recipient mode distinguishes all customer contacts from contacts selected through named roles. It expresses delivery selection rather than a new template kind.

**Merge vocabulary.** Variables carry descriptions, types and examples, while formatting filters convert their values for readable output.

**Preview.** Draft rendering helps staff see problems and empty fields before a save. Document and export rendering use the escaping appropriate to their output.

**Selections.** Explicit choices, unit configuration and defaults supply the resolver’s alternatives. These links connect content to production and create the dependencies staff inspect before deletion.

## How It Relates

Business units select their document templates, and workspace settings select the statement default. Producing workflows in Transactions, Billing and batch processing consume or are expected to consume those choices. This module owns the content and resolver; each producer remains responsible for using them correctly.

## What It Could Become

The product should verify resolver adoption in every document-producing module before design promises consistent selection everywhere. It should confirm the inactive-template treatment and decide whether language-specific content is needed. Those decisions can extend the template concept while preserving the distinction between prepared content and an actual delivered document.
