Skip to content

Document Token Replacement

This guide explains how to insert dynamic placeholders (tokens) in Microsoft Word templates so that Brief Connect can automatically substitute them with record data when documents are generated.

1. When are tokens replaced ?

When a user generates a document based on a template (e.g. from the Document Templates library or via AI-powered generation), the server scans the document — including its header, footer and body — for tokens and replaces them with the corresponding values from the current record.

2. Token syntax

Write tokens using double square brackets:

[[FieldInternalName]]

Example:

[[Title]]

Complex / nested fields

For complex record fields you can drill into a property using dot notation, e.g.:

[[DecisionMaker.DisplayName]]
[[DecisionMaker.Mail]]
[[DecisionMaker.JobTitle]]

Currently supported complex types

Data Type
Available Properties
User / Role
GraphUserId
SiteUserId
DisplayName
JobTitle
LoginName
Mail
UserPrincipalName
Managed Metadata
Id
Name

Repeating / multi-value fields

If the source field is an array (e.g. ViewAccessUsers contains multiple users), values are concatenated with a semicolon (;):

[[ViewAccessUsers]]   →   "User A;User B;User C"

Date & time fields

Date and time fields are converted to AEST in the format dd/MM/yyyy hh:mm tt. For example, 2025-07-15T12:00:00Z becomes 15/07/2025 12:00 PM.

3. How to discover field names and properties

There are system-reserved template tokens for the following fields:

Field Template Token Data type
Organization Level 1 OrganisationLv1 String
Organization Level 2 OrganisationLv2 String
Organization Level 3 OrganisationLv3 String
Organization Level 4 OrganisationLv4 String
Lead Organisation LeadOrganisation String
Created Date Created DateTime
Created By CreatedBy User
Initiator Initiator User
Modified Date Modified DateTime
Modified By ModifiedBy User
Decision Category DecisionCategory Managed Metadata
Override Default Access OverrideDefaultAccess Boolean
Record Id RecordId String
Record Type RecordType String
Restrict Access Teams RestrictAccessTeams Managed Metadata
Security Classification SecurityClassification Managed Metadata
Signature Required SignatureRequired Boolean
Title Title String
View Access Users ViewAccessUsers User

For admin-managed fields follow the instructions:

  1. Open Admin Panel → Configuration Manager → Record Types.
  2. Select the record type you care about.
  3. Switch to the Fields tab – the Internal name column shows the value to use inside [[ … ]].

Drilling into properties

Some field types return complex objects (for example Role/User fields or Managed Metadata). You can output a specific property by adding .<property>.

Typical properties:

  • User / Role fieldsDisplayName, Mail, JobTitle, UserPrincipalName, GraphUserId, SiteUserId.
  • Managed Metadata fieldsLabel (term text), Id (GUID).

4. Example workflow

  1. Open a template in Word.
  2. Place the cursor where the value should appear.
  3. Type [[Title]] to display the record title.
  4. If you have a role called Decision Maker (with an InternalName value of DecisionMaker) and you want to display the email address of the user in that role, use [[DecisionMaker.Mail]].
  5. Save the document—no further formatting is required.

When a user creates a document, these placeholders are replaced with the actual values.

5. Handling tokens that split across runs (Word quirk)

Word sometimes inserts style or spell-checking runs inside text, causing a token such as [[Title]] to be split into multiple XML elements.
The Brief Connect token engine now automatically consolidates split runs before replacement, so you no longer need to paste tokens as plain text.
If you still experience a token not being replaced, delete it and re-type or paste it again.

6. Troubleshooting

Symptom Cause / Fix
Token is rendered literally in the final document The field name is wrong → verify against the Internal Name for the field in Admin Panel
Token is replaced with an empty string The field exists but has no value
{{Field is not a supported type}} appears Attempted to output an unsupported object (e.g. complex data without specifying a property)