Understanding Formatting in Merge Data V2 Document Templates
Formatting in document templates depends on your chosen template format.
When generating documents in ScopeStack, formatting values—such as displaying 12345.67 as $12,345.67—depends on both the template format and the data format version. This article outlines the differences between the two main template formats and how each handles formatting tasks like currency or date output.
Tag Templates
Tag Templates use an industry-standard rendering engine and require all data to be provided in JSON format. Depending on your goals and preferences, there are two ways you can setup your document templates.
When uploading a document template, you will see the option to enable or disable "Formatting for Tag Templates."

When disabled wrapper methods like .to_currency are not available. Instead, formatting must be handled manually.
Formatting Enabled
If enabled, you can automatically transform certain types of numbers using standard "formatting wrappers":
- Currency Wrappers (Currency formatting following the currency defined on a Project's Rate Table)
-
.to_currency -
.to_long_date
-
- Date Wrappers (Date formats following those specified in your account settings)
-
.to_short_date -
.to_formatted_time
-
Note that all date and currency values must have a formatting wrapper applied if this is enabled.
Here's an example T&M Pricing Table with formatting enabled

Notice: In the first row, the Rate column's hourly_rate has a "to_currency" appended. This wraps the value in currency formatting. You can see this pattern repeated throughout the table.
You can see the output here:

Notice: In the Estimated Total column, you can see the commas with numbers in the thousands place, which is typical for currency formatting.
Formatting Disabled
There are a few reasons you might want formatting disabled. If formatting is disabled, you can specify formatting using raw number transformations and unit information provided in the merge data.
{ currency.unit }{ hourly_rate*1 | toFixed:2 }
Note that in the above example, we added a space before the final } due to our help center interpreting this as code and not displaying it. In real applications, there should be no space.
In this example:
-
currency.unitsupplies the symbol (e.g.,$) -
hourly_rateThis is a value dynamically created by ScopeStack. -
*1JSON considers numbers with decimals as strings natively, so depending on the value, you can multiply by one or add 0 to force its conversion back into a number. -
toFixed:2formats the result to two decimal places
You can explore the full list of available filters in the Docxtemplater built-in filters documentation.
This method offers flexibility but may require more setup and awareness of the data structure being passed into the template.
Here's an example T&M Pricing Table with formatting disabled

Notice: The currency fields have a "currency.unit" tag, which adds the currency symbol before the number, and the "toFixed" is specifying the number of decimal places to print the values to.
You can see the output here:

Notice: The output largely looks the same, but the Total column's values don't have the comma present like a typical currency value would.
Mail Merge Template (Legacy)
Mail Merge Templates using V2 merge data support built-in formatting wrappers such as:
-
.to_currency -
.to_long_date -
.to_short_date -
.to_formatted_time
Example usage:
<< total_revenue.to_currency >>This will format the value using the project’s configured currency. These wrappers are part of ScopeStack’s internal logic and are applied before the data is converted to JSON. This allows formatting to happen automatically in the document output.
This setup is ideal for users who want formatting handled with minimal effort and without manually transforming values in the data layer.