> For the complete documentation index, see [llms.txt](https://docs.dynalogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dynalogic.com/birds-document-warehouse-product-overview/setup-and-configuration/templates.md).

# Templates

Templates enable the grouping of fields and the assignment of default tags to a document upon template selection. When creating a template, ensure that the necessary fields for the template are in place. Optionally, you can include multiple tags that will be automatically applied to any document that is assigned this template, the **Related tags**.

![](https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-31bae3a1b9a499414428a64f56ea58f347ee05fe%2Fto_templates.jpg?alt=media)

### Contextual tags

Contextual tags make sure that the template is only visualised in the **drag-and-drop view** if it's present in a specific tag context. When no contextual tags are specified, the template will always be shown during drag-and-drop. The benefit of using contextual tags on templates is that users are guided into using the templates that are relevant for a specific tag context.

**An example**: The administrator only wants the template 'Sales order' to be shown, when the user has his 9A Raptor DWH view filtered on a Sales Order record. To do that, the administrator fills in the parent tag 'Sales Orders' in the contextual tags field.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-c831097ecbc3e0951b0bf123f111151d73069878%2Fimage%20(688).png?alt=media" alt=""><figcaption></figcaption></figure>

This will make sure that, during drag-and-drop, users will only see the Sales Order template when the document list is being filtered on a Sales Order tag, or when they are not filtering on any tags at all.

In the image below, we are working in the context of sales order SO000693. The template is shown during drag and drop.

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-58ccf9f836d83fdd98b6e9f758b98d201d137207%2Fimage%20(687).png?alt=media" alt=""><figcaption></figcaption></figure>

In the next image, we are opening Raptor in the context of vendor "Pro Bike". The template is not shown when we drag and drop here:

<figure><img src="https://1567270722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbMdBZV3cNP56k0aYYCI6%2Fuploads%2Fgit-blob-f1f544bb8f7734a96117529e54d2985cfc850d04%2Fimage%20(689).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Creating a New Template**

**Prerequisites:**

* A unique code for the template (e.g., "templates\projects\internal-project").
* Identification of the fields to be added to the template.

**Steps:**

1. Click on the “+” button located at the top of the list displaying all templates.
2. Enter the unique code for the template.
3. Specify the display name for each language.
4. Optionally, add tags that should be automatically included in the “Related tags” field.
5. Include a list of fields belonging to the template, ensuring the order mirrors the desired user display order.
6. Click the save button.

### **Modifying a Template**

1. Select the template from the list.
2. Modify any editable field.
3. Click the save button.

#### **Sorting or Deleting a Field from a Template**

1. Hover the cursor over the field to be moved or deleted.
2. When the cursor is over the field, up and down arrows and an “x” button will appear on the right side of the screen.
3. Use the arrows to reorder fields or click the “x” button to remove a field.

*Note: Removing a field from a template doesn't erase data from documents already assigned to that field. It simply won’t be displayed as part of the template anymore.*

*Note: Adding or removing a “Related tag” doesn’t impact documents already assigned to the template. The effect is seen only when a template is assigned to a document.*


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dynalogic.com/birds-document-warehouse-product-overview/setup-and-configuration/templates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
