Mustache Templates

Unit21 supports auto-completion of the narrative section in filed SARs through the use of mustache templates.

To use a template, simply include it in Section 5 (Narrative) of the SAR filing form. When parsed, mustache templates will be replaced with values/information derived from entities and/or events associated to the case the SAR is being filed on.

Templated Narrative - A variable is written in section 5 of the SAR:


Processed Narrative - The variable is automatically populated:


There is an extensive set of SAR template variables which are variables in the templates that can be automatically generated. With template variables, Agents can use special commands to reference the values of certain form fields and case data.

The mustache templates are typically in the form of {mustache_template_name(argument_1, argument_2):}.

For example, an agent may create a template that looks like this:

Templated Narrative - What the agent writes:

{0.filingName:} is a continuing activity filing, which our institution has marked with the note "{0.2_filingInstitutionNote:}". It is a continuation of an earlier report, BC13- {0.priorBsaId:}.

The following table describes all relevant transactions:

When an agent uses this template in a SAR filing, the text in {brackets} will be replaced with the relevant data from the case. For example, the processed data may look something like:

Processed Narrative - What it looks like after the variables are processed:

Case S-124 is a continuing activity filing, which our institution has marked with the note "A repeated pattern of behavior suggesting transaction structuring". It is a continuation of an earlier report, BC13- 12130037687212.

The following table describes all relevant transactions:

tr-122May 03,20219,990John SmithJane Doe
tr-142May 04,20219,990John SmithJane Doe

Two types of variables: process variables and field references:

There are two broad distinctions in the types of variables used:

  • Process Variables ─ where U21 processes case data and inserts some values. In the preceding section, the table of transactions is an example of calculated variables. Other variables include:
    • A list of all entities associated with a case
    • A case's first and last transaction
  • Field references simply map the value of a field from the SAR form and copy it to the narrative section. Values like filing name are an example of a field reference.

See the Narrative variable reference for the full list of possible variables, with relevant explanations.

How to use template variables


You can also use narrative variables without a template. To do so, jump to step 3 and just add the variables you want.

Add a template for a tag

  1. If you need to create a tag, go to System > Agents, then Edit tags (see Tags for more details)
  2. From Settings, go to the SAR Filing tab.
  3. Click Step 5. Narrative
  4. Choose a tag to create a template for, or select Default Narrative (this narrative template will show up in all SAR filings).
  5. Add the text and variables you want. Click Save.

Review the variables you can use, using the Narrative variable reference.


Adjust and confirm the variables in your SAR filing


Save a form to populate a variable

When you save an item in form in Steps 0-4, the variables in the narrative section populate

  1. Create a SAR.
  2. From Report Filings, click on your SAR report.
  3. Open the form Step 5. Narrative and select your template from the dropdown Select a Narrative Template.
  4. If needed, modify your template so that it reflects your case. You can also add new variables.
  5. Open up forms 0-4 and fill in all fields (some fields may already be filled if you create form templates)
  6. Once the form autosaves, scroll down to step 5 again. Refresh the narrative by collapsing the form, then reopening it.


Check that variables populate before sending

After you send the SAR file, you cannot update the narrative form. So make sure that the variables show the right values.

The variables should be populated with the correct data. However, until you send the report, they keep their syntax in {curly.brackets}. This lets you know that these text strings are variables. When the report sends, only the value is filled in.

Error recovery: blank value or NOT_FOUND

When you don't see your expected values, there are two common solutions:

  • Blank value, e.g. :} ─ indicates that the variable is referencing a real field, but the field is empty. In that case, find where the field is an fill in a value.
  • NOT_FOUND ─ indicates that U21 variable cannot understand the variable. There is likely a syntax error. In that case, you might want to review Narrative variable reference

Did this page help you?