> For the complete documentation index, see [llms.txt](https://docs.agilecase.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agilecase.com/administrator-documentation/templates.md).

# Templates

## What are templates?

AgileCase allows you to create your own templates for documents, e-mails, SMS and Invoices.

Templates let you use your AgileCase database to automatically populate stock documents.

For example you could set one of your e-mail templates to fill in the e-mail address of the client of the case that is opened and autofill their name throughout the text.

The same is true for documents, SMS and invoices.

## Why use templates?

Templates provide you with a massive opportunity to streamline your business practices.

The standard templates you create will be automatically populated by the case which mean you will not have to fill in any information yourself. Furthermore document templates can be imported to e-mail templates, allowing you to carry out a transition without having to create the same template twice.

Once you have your templates up and running, you will save a massive amount of time on minor tasks, allowing you to focus on the big picture for your business.

## How to create templates

Templates are created using two simple configuration techniques: Mail Merge and Mustache. Both of these techniques work using mergefields to pick data out of your AgileCase system and use it to populate the template.

Mail Merge is used to create templates in the form of a word document while Mustache is used for SMS and e-mail templates within AgileCase. While this may sound intimidating to users with less IT experience, this documentation will walk you through the process of creating each kind of template and will help you get comfortable with any initially complex aspects of the process.

Your system also comes with example templates that you can use to experiment. Furthermore, a field guide for Mail Merge is available and we will always be ready to help on <support@agilecase.com>.

This section will detail the process of creating a variety of templates on the AgileCase system.

Using a template to produce a document on a case is covered in [Working with Documents and Reports](/user-documentation/working-with-documents-and-reports.md) in the user documentation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agilecase.com/administrator-documentation/templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
