Views:

Revised 05/07/2026

 

Prerequisites

This article explains how Merge Fields and Conditional Logic work in akoyaGO Letter Templates, including why letter content may differ between records and what behavior is expected.

How Letter Templates Work in akoyaGO

akoyaGO Letter Templates are created using Microsoft Word and powered by System Views. Each column in the System View represents data that can be inserted into a letter.

  1. Create a System View containing all required fields
  2. Create or edit a Word document
  3. Insert merge fields using Word’s Field tool
  4. Upload the document as a Letter Template File
  5. Generate letters from akoyaGO

Important: Merge Field names must exactly match System View column names.

Merge Fields & Conditional Logic

Merge Fields insert data from akoyaGO records into a letter. Some templates also contain logic that automatically changes wording based on record values.

Some advanced scenarios may require editing Word field logic directly. Power users can reference:
Advanced Logic Reference for Letter Templates

The table below provides a reference overview of logic supported by Microsoft Word and respected by akoyaGO when generating letters.

Type of LogicDescriptionSyntax ExampleNotes
IF StatementConditionally displays text{ IF "{ MERGEFIELD FieldName }" = "Value" "TrueText" "FalseText" }Most common conditional logic
ComparisonCompares a field to a value{ IF "{ MERGEFIELD FieldName }" > 100 "Above 100" "100 or below" }Supports =, >, <, >=, <=
Nested IFsEvaluates multiple conditions{ IF "{ MERGEFIELD Score }" >= 90 "Excellent" "{ IF "{ MERGEFIELD Score }" >= 75 "Good" "Needs Improvement" }" } Advanced / power‑user logic
Date FormattingControls date display{ MERGEFIELD Date \@ "MMMM d, yyyy" }Example: January 1, 2026
Currency FormattingFormats currency values{ MERGEFIELD Amount \# "$#,##0.00" }Example: $1,250.00
 

Best Practice: Apply explicit date formatting to all date fields used in your Letter Template. This ensures dates display consistently and clearly in generated letters, regardless of how the data is stored in akoyaGO.

Why Letter Content May Change

  • Different records contain different data
  • Some fields may be blank
  • Status values vary
  • Conditional sections may not apply

Common Issues & Best Practices

  1. Confirm the field exists in the System View
  2. Confirm the record contains data
  3. Save and regenerate the letter
  4. Avoid manually editing generated letters

Best Practice: Always fix the template or data source—do not manually patch output letters.