> ## Documentation Index
> Fetch the complete documentation index at: https://docs.azvian.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates and pricing

> Write the wording once: placeholders, fill-in fields, pricing tables and reusable content blocks

A **template** is the wording of a proposal or contract plus its blanks. You create documents from templates, so the wording stays consistent and only the details change.

Open **Templates → New template**, choose the **Type** (proposal or contract), give it a **Name** and a description, and write in the editor. For proposals you can also set **Proposal valid for (days)**; leave it empty for no expiry.

> [!WARNING]
>
> The starter templates are a starting point, **not legal advice**. Have a lawyer review any wording before you rely on it.

## The editor

The toolbar offers text formatting, bulleted and numbered lists, alignment, links, tables (with add and delete row and column), and **Page break** for the PDF. It deliberately does not allow scripts, styles, images or embeds: what you write is limited to what is safe to show to a client and to put in a PDF. Links may point to `http(s)` addresses and email only.

## Placeholders

A placeholder is a name in double curly braces that is filled in automatically when the document is created. Use **Insert variable** in the toolbar to add one without typing.

| Group | Placeholders |
| - | - |
| Client | `{{ client.name }}`, `client.email`, `client.phone`, `client.website`, `client.address`, `client.tax_id` |
| Contact | `{{ contact.name }}`, `contact.first_name`, `contact.title`, `contact.email`, `contact.phone` |
| Your company | `{{ company.name }}`, `company.email`, `company.phone`, `company.address`, `company.website` |
| Document | `{{ document.title }}`, `document.number`, `document.date`, `document.valid_until`, `document.total` |
| Client custom fields | `{{ client.custom.NAME }}` for each [custom field](https://docs.azvian.com/contracts/setup.md#client-fields) you created |

Unknown names are shown in red in the editor. Values are always escaped, so a client's name can never break the page.

**A document cannot be sent while a placeholder is still empty**, so a client never sees `[client.address]`.

## Fill-in fields

Some details change with every document, such as a project name or a start date. Under **Fill-in fields** add a field with a label, a type (**Short text**, **Long text**, **Number** or **Date**) and whether it is **Required**, then **Insert** it into the text as `{{ var.name }}`. When you create a document you are asked for these values.

## Pricing tables

Under **Pricing tables**, **Add pricing table at cursor** puts a table of line items into the document.

* Each **item** has a name, description, quantity, unit and unit price.
* Mark an item **Optional** and choose whether it is **Included by default**. On a proposal the client can tick or untick optional items and watch the total change.
* Add a **Discount** (a percentage or a fixed amount) and **Tax** (a label such as VAT, and a rate).
* The table shows **Subtotal**, **Discount**, **Tax** and **Total**.

Totals are calculated on the server with exact decimal arithmetic, never in the client's browser and never with floating-point rounding. A table that is not placed in the document can be inserted later at the cursor.

## Content blocks

**Content blocks** are reusable paragraphs such as payment terms, confidentiality or a scope disclaimer. Create them under **Content blocks → New block** (a **Name** and an optional **Category** such as Terms, Scope or Payment), then use **Insert block** in the toolbar.

Inserting a block **copies** it. Editing the block later never changes templates or documents that already used it.

## Managing templates

From a template's page you can **Preview** it, **Duplicate** it (the quickest way to make a variant), and **Archive** it so it no longer appears when creating documents. Archived templates can be restored, and documents already made from them are unaffected.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.