This update introduces major improvements to how your Statements of Work (SoWs), Proposals, and other client documents are built, including support for Word, PowerPoint, and
Overview
This guide is designed to help ScopeStack support and customer success teams assist users in migrating from legacy Merge Fields to the new Tag-based templates used in document generation.
ScopeStack now supports two document formats:
-
Merge Fields (legacy – v1 Merge)
-
Tags (modern – requires V2 Merge Data)
This article covers:
-
Differences between Merge Fields and Tags
-
Common formatting issues
-
Best practices
-
Troubleshooting broken or misrendered tags
🧱 Template Syntax Basics
Purpose | Merge Fields Syntax | Tag Syntax (V2 Required) |
---|---|---|
Text field | «=field» |
{field} |
Conditional | «field:if»...«field:endIf» |
{#field} ...{/field} |
Looping | «items:each(i)» |
{#items} ...{/items} |
Rich text/HTML | Not supported natively | {~~formatted_field} |
🔒 Important: Tag templates require V2 merge data to populate correctly.
✅ Examples (Tag Templates)
Project Metadata
Customer: {project.client_name}
Project Name: {project.project_name}
Printed On: {project.printed_on}
Contact Information
{#project.primary_contact}
{name} – {email} – {phone}
{/project.primary_contact}
Formatted Lists
{~~project.formatted_solution_summary}
Use ~~
to render markdown or nested HTML correctly in output.
⚠️ Common Issues & Fixes
❌ Curly Quotes in Conditionals
Wrong:
{#name==“Deliverables”}
Fix:
{#name=="Deliverables"}
❌ Missing Loop Closures
Wrong:
{#items}
Item: {name}
Fix:
{#items}
Item: {name}
{/items}
❌ No Render on formatted_sentences
-
If using Merge Fields: must manually loop over each sentence
-
If using Tags (with V2): use
{~~formatted_sentences}
to interpret HTML
🧾 Table Example: Pricing Resources
| Role | Hours | Rate | Total |
|------|-------|------|--------|
{#project_pricing.resources}{^resource_slug=="project_total"}
| {resource_name} | {description} | {quantity} | {hourly_rate | toFixed:2} | {total | toFixed:2} |
{/resource_slug=="project_total"}{/project_pricing.resources}
🧠 Best Practices
-
✅ Always use plain quotes, not curly quotes (
"
not“
) -
✅ Place tags or merge fields in their own clean paragraph
-
❌ Avoid putting them inside pre-styled elements like bullets or tables
-
✅ Use
{#field}
blocks to hide content when empty -
✅ Use
{~~...}
for any HTML/markdown fields in tag templates
🧪 Testing Tips
-
Always use a project with V2 merge data for tag-based templates
-
Validate output with "Test Template – Full Merge Data"
-
Confirm all blocks (looping, conditional, rich text) display as expected
📚 Merge Data Reference: project
Project-Level Fields
Here's a reference list of commonly used fields under the project
object for Tags (V2 only):
Project Name: {project.project_name}
Client Name: {project.client_name}
Account Name: {project.account_name}
MSA Date: {project.msa_date}
Submitted At: {project.submitted_at}
Approved At: {project.approved_at}
Created On: {project.created_on}
Printed On: {project.printed_on}
Project Version: {project.project_version}
Business Unit: {project.business_unit}
Tags: {project.tags}
Formatted narrative fields:
{~~project.formatted_executive_summary}
{~~project.formatted_solution_summary}
{~~project.formatted_our_responsibilities}
{~~project.formatted_customer_responsibilities}
{~~project.formatted_out_of_scope}
Version-specific details:
Current Version Name: {project.current_version.name}
Comment: {project.current_version.comment}
Created By: {project.current_version.created_by}
Created: {project.current_version.created}
Sales Executive (nested):
{#project.sales_executive}
Name: {name}
Email: {email}
{/project.sales_executive}
Rate Table:
Rate Table Name: {project.rate_table.name}
Slug: {project.rate_table.slug}
User-Defined Field:
Project Number: {project.user_defined_fields.project_number.value}
Pricing Summary Fields
Total Contract Revenue: {project_pricing.total_contract_revenue | toFixed:2}
Total Contract Value: {project_pricing.total_contract_value | toFixed:2}
Total Service Revenue: {project_pricing.total_service_revenue | toFixed:2}
Total Contract Cost: {project_pricing.total_contract_cost | toFixed:2}
Total Contract Profit: {project_pricing.total_contract_profit | toFixed:2}
Total Contract Margin: {project_pricing.total_contract_margin}
Customer Payment: {project_pricing.total_customer_payment | toFixed:2}
Example Loop Through Professional Services
{#project_pricing.professional_services.phases}
## Phase: {name}
{#services}
Service: {name}
Description: {~~formatted_service_description}
Hours: {total_hours}
Revenue: {total_revenue | toFixed:2}
Cost: {total_cost | toFixed:2}
PM Revenue: {pm_revenue | toFixed:2}
Resource: {resource_name}
Payment Model: {pricing_model}
{#language_fields}
{#name=="Deliverables"}
Deliverables:
{~~formatted_sentences}
{/name=="Deliverables"}
{/language_fields}
{/services}
{/project_pricing.professional_services.phases}
Subservices (if present)
{#subservices}
Subservice: {name}
{/subservices}
🧩 Example Template Download
You can download a working Tag Template Example here: 👉 Download Example Tag Template (.docx)
This document includes:
-
Project metadata
-
Services with nested language fields
-
Pricing breakdown tables
-
Contact and governance sections
-
Formatted lists and HTML-rich blocks
Test with the project: Test Template – Full Merge Data for best results.
💬 Need Help?
For help with templates, contact:
-
📧 Email:
support@scopestack.io
-
💬 In-App Chat: Use the ScopeStack chat widget
-
📎 Include:
.docx
template + sample project link when reporting issues