Document templates

Customise the wording behind each document, with fields, conditions and repeats, and publish it as a new version.

Every document is generated from a template. Until you change one, it is CISO Doc's own template, so improvements reach your workspace as soon as they are published. The first time you edit a template, your workspace keeps its own copy of it. Editing a template changes how future documents are written, for all clients, without touching documents already generated.

Edit a template

  1. Open the Document templates page and pick a template from the list, filtering by domain if you like. A "draft" tag marks one with unpublished changes.
  2. Edit it in the editor. Your work saves as a draft automatically ("Saving draft…", then "Draft saved").
  3. Check the Sample preview (draft), which fills the template with example data and lists the "Unresolved fields".
  4. Optionally choose View diff vs. published to see what changed.
  5. Write a Change note (optional) and choose Publish. This makes the draft live and creates a new version.

Until you publish, generation keeps using the published version. Discard draft throws away unpublished edits. Version history lists each published version; Load into draft stages an old version for you to review and publish again.

What you can put in a template

WriteResult
{{field}}The value of that field. Lists are joined with commas; true and false become Yes and No. A blank or false value shows [[ to be confirmed ]].
{{#if field}} … {{else}} … {{/if}}Shows the first part when the field has a value, otherwise the second. The {{else}} part is optional. This tests only whether there is a value: a select answer of "No" is a value, so use a comparison (below) to test for it.
{{#each field}} … {{.}} … {{/each}}Repeats the text once for each item of a list. {{.}} is the item.
{{@doc:document_key}}The name of another document, in curly quotes.

The toolbar has buttons for these: Insert field…, which opens a searchable list of every variable (all the interview questions grouped by module, the client profile and the computed fields, each with its answer type and options), a custom field… box, Insert conditional, and Reference doc…. They appear as coloured chips in the text. Use ## headings for sections: they are what the Source data by section card works from.

Conditions that compare an answer

{{#if field}} only asks whether a field has a value, so a select answer of "No" counts as a value. To write text for a particular answer, put a comparison in the {{#if}}. Text is compared without regard to capital letters or spaces at either end, and the value goes in double quotes (write \" for a quote inside it).

WriteTrue when
{{#if backup_type == "Hybrid"}}The answer is "Hybrid". = works too.
{{#if charter_exists != "Yes"}}The answer is anything else, including no answer.
{{#if mfa_coverage contains "Email"}}A multi-select answer includes that exact option, or a text answer includes those words.
{{#if mfa_coverage not contains "Email"}}The opposite of contains.
{{#if dedicated_staff > 3}}The answer is a number above 3. <, >= and <= work the same way.
{{#if exec_sponsor is empty}}There is no answer, only blanks, or an empty list. is not empty is the opposite.
{{#if has_dev_team and mfa_coverage contains "Email"}}Both parts are true.
{{#if backup_type == "Hybrid" or backup_type == "None"}}Either part is true.
{{#if not has_dev_team}}The part after not is false.

Combining. Write and, or and not between comparisons. There are no brackets: not applies to the one comparison after it, and is applied before or, so a or b and c means a or (b and c). The builder's Add another condition joins its rows with a single and or or. The words (and, or, not, contains, is empty) can be in any case; field names must match exactly.

Lists and text. A multi-select answer (for example mfa_coverage or cloud_providers) is a list. contains matches a whole item, ignoring case, so contains "AWS" does not match an item called "AWS GovCloud"; add or contains "AWS GovCloud" for that. Against a text answer contains matches part of the text. For == and != a list is read as its items joined with a comma and a space, and true or false as Yes or No.

Numbers. >, <, >= and <= need a number on both sides. A field that is missing, blank or not a number (a headcount range such as "201-500" is text) makes the comparison false, whichever operator it uses. Compare a range with == or contains. == compares numerically when both sides are numbers, so dedicated_staff == 4 matches an answer of 4.0.

Missing answers. A field with no answer compares as empty text: field == "" and field is empty are true, field != "Yes" is true, and contains, > and == against a value are false. Unlike {{field}}, a comparison never prints [[ to be confirmed ]], is not listed under Unresolved fields, and does not lower the template's completeness score. The Source data by section card lists such fields separately, as what decides which text appears.

Previewing. The Sample preview fills the template with example answers. When your conditions test fields, a Sample answers box lets you type another answer (list items separated by commas) to see each branch. This changes only the preview.

Where field values come from

A field is filled from the first source that has a value for that name: the client profile (client name, organisation, industry, headcount, geographies, frameworks, cloud providers, security tooling), computed values (effective_date, the date the draft was generated, and review_cycle, which is Annual for a policy and a gap for any other document until an interview question with that name is answered), the interview question with that key, and finally live data or a submitted intake form. A name that none of these knows stays a gap. Add a matching question in the Question library to give your own field a source.

The computed values also include control_references, a list with one line per framework the client targets and the controls the document addresses (for example ISO 27001: A.5.15, A.5.16). It is filled for the core policies and the incident response documents, and is empty for a client whose frameworks are not SOC 2, ISO 27001, NIST CSF or CIS v8; test it with {{#if control_references is not empty}}.

A template change reaches existing documents only when they are next regenerated. A template you have never changed always uses CISO Doc's current text, so improvements apply to it automatically. That includes the eight core policies and the six incident response documents (see Generating documents), which replaced shorter text.

When CISO Doc publishes a new version of a template you changed

A template you edited and published keeps your text. The list marks it your copy, as opposed to platform for one you have not changed, and when CISO Doc publishes a newer version the list adds update available and the template shows a notice with three choices: Compare with the platform's version, Use the platform's version and Keep my version.

Use the platform's version publishes CISO Doc's text as your next version, so your earlier text stays in Version history. Keep my version leaves your text as it is and clears the notice until the next platform version. Either choice is recorded in the audit log, and neither changes a document until it is regenerated. A copy made before CISO Doc tracked template versions has no known starting point, so its first notice compares it with the whole of CISO Doc's text.

Related