What are merge tags?

Help Center

In DocuGenerate, merge tags are dynamic placeholders that you can include in your Word templates. They’re special codes or keywords enclosed within double curly brackets {}, brackets [], or other delimiters that represent specific data fields. When a document is generated, these merge tags are replaced with actual data.

For instance, if you have a JSON data structure like this:

{
    "First Name": "John",
    "Last Name": "Doe"
}

In your Word template, you might write:

Dear [First Name] [Last Name],

Thank you for being a DocuGenerate user!

When a document is generated, this will become:

Dear John Doe,

Thank you for being a DocuGenerate user!

Usage of merge tags

Merge tags are not just limited to text, but they can also be used to insert images, lists, tables, or other complex structures based on your data. Merge tags are incredibly versatile and enable you to create personalized, dynamic documents with minimal effort.

The key to using merge tags effectively is ensuring that the tags in your templates match the field names in your JSON or Excel data source. If a merge tag doesn’t correspond to any data field, it will be replaced by an empty string in the final document.

Why use merge tags?

Merge tags are a powerful tool in DocuGenerate for a variety of reasons:

  • Personalization: Merge tags allow you to customize your documents based on the data you have. This is great for creating personalized communications or reports.

  • Automation: By using merge tags, you can greatly speed up the document generation process. You won’t have to manually insert the specific data into each document.

  • Reusability: With merge tags, you can create templates that can be reused for different data sets. This is especially useful when you have to generate similar documents regularly.

  • Efficiency: Using merge tags can significantly reduce the possibility of human errors. Data is automatically populated from the source, ensuring accuracy and consistency.

The effective use of merge tags is vital for the optimal functioning of the DocuGenerate system. With them, you can efficiently generate personalized, high-quality PDF documents from your Word templates.