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

# Templates

> Create and upload your contract templates with dynamic placeholders to automatically populate customer details for new agreements

Upload your contract templates to quickly [create and issue contracts](/billing/contracts) for new customers.

## Create a contract template

You have two options for creating templates:

* Use our [sample template](https://docs.google.com/document/d/1uYF7AnMMPodAybTWTdJfD3iMGUODUqUwqS7Nd2BvvNo/edit?usp=sharing) and customize it
* Use your own template(s).

<Info>
  Contract templates must be in a Microsoft Word format.
</Info>

### Create your own template with placeholders

Your contract template can include placeholders (variables) that the system will automatically fill in with customer-specific information when you create a contract. You don’t need to include every placeholder—only add the ones required for your contract and legal needs.

#### Supported placeholders

##### Contract dates

* `{contract.issueDate}` - date the contract is issued
* `{contract.startDate}` - start date of the contract
* `{contract.endDate}` - end date of the contract

##### Customer details

* `{customer.legalName}` - legal business name of the user or company
* `{customer.businessAddress}` - customer's billing address
* `{customer.taxId}` - customer's tax ID

##### Customer signatory

* `{customer.signatory.fullName}` - full name of the person signing for the customer
* `{customer.signatory.email}` - signatory's email address
* `{customer.signatory.phoneNumber}` - signatory's phone number
* `{customer.signatory.signature}` - place for digital signature
* `{customer.signatory.signature_date}` - customer's signature date

If more than one person needs to sign on behalf of the customer, you can add additional signatory placeholders by numbering them sequentially after the original placeholders:

* Second signatory: ​`{customer.signatory2.fullName}`, `{customer.signatory2.email}`, `{customer.signatory2.phoneNumber}`, `{customer.signatory2.signature}`, `{customer.signatory2.signature_date}`
* Third signatory: ​`{customer.signatory3.fullName}`, `{customer.signatory3.email}`, `{customer.signatory3.phoneNumber}`, `{customer.signatory3.signature}`, `{customer.signatory3.signature_date}`

##### Location details

* `{location.legalName}` - location legal business name
* `{location.businessAddress}` - location billing address
* `{location.taxId}` - location tax ID

##### Location signatory

* `{location.signatory.fullName}` - full name of the administrator/owner signing for the location
* `{location.signatory.email}` - signatory's email address
* `{location.signatory.phoneNumber}` - signatory's phone number
* `{location.signatory.signature}` - place for digital ssignature
* `{location.signatory.signature_date}` - signature date

If more than one person needs to sign on behalf of the location, you can add additional signatory placeholders by numbering them sequentially after the original placeholders:

* Second signatory: ​`{location.signatory2.fullName}`, `{location.signatory2.email}`, `{location.signatory2.phoneNumber}`, `{location.signatory2.signature}`, `{location.signatory2.signature_date}`

<Info>
  If there are multiple signatories on both the customer and location sides, number them separately. Correct example:`{customer.signatory.fullName}`, `{customer.signatory2.fullName}``{location.signatory.fullName}`, `{location.signatory2.fullName}`Incorrect example:Mixing customer and location signatory sequences: ​`{customer.signatory.fullName}`, `{customer.signatory2.fullName}`, `{location.signatory3.fullName}`
</Info>

##### Contract items

To list items (plans or products) included in a customer's contract, you must place all placeholders related to contract items between opening and closing tags - `{#items}` and `{/items}`. This tells the system where the list of items begins and ends.

* `{#items}` - opening tag
* `{title}` - title of the plan/resource tier
* `{price}` - unit price for the plan/resource
* `{quantity}` - quantity of the plan/resource
* `{tax}` - tax rate for the plan/resource
* `{total}` - total undiscounted price for this specific item (Price *x* Quantity)
* `{coupon}` - discount coupon percentage or amount (if applied)
* `{/items}` - closing tag
* `{items.total}` - total undiscounted price for all items in the contract combined - place it outside the item tags

##### Example 1:

<Frame>
  <img src="https://mintcdn.com/spacebring/Q1ag5QEyylZUYkCY/images/billing-contracts-templates-1.png?fit=max&auto=format&n=Q1ag5QEyylZUYkCY&q=85&s=bfe80a8a89afc8d97372e0669abc7ebc" alt="" width="771" height="166" data-path="images/billing-contracts-templates-1.png" />
</Frame>

##### Example 2:

`{#items}{title} - {price} - {quantity}{/items}`

## Upload a template

1. Go to the **Location settings** > **Billing** page > "Contracts" tab.
2. Enable the "Contracts" switch.
3. In the "Templates" section, click `Create template`.

<Frame>
  <img src="https://mintcdn.com/spacebring/Q1ag5QEyylZUYkCY/images/billing-contracts-templates-2.png?fit=max&auto=format&n=Q1ag5QEyylZUYkCY&q=85&s=7a129caac012aa21d4513d1d36d76ab1" alt="" width="1917" height="790" data-path="images/billing-contracts-templates-2.png" />
</Frame>

4. Press `Upload file` and upload the template. Add its title.

<Frame>
  <img src="https://mintcdn.com/spacebring/Q1ag5QEyylZUYkCY/images/billing-contracts-templates-3.png?fit=max&auto=format&n=Q1ag5QEyylZUYkCY&q=85&s=22f2e636ac0f153ca6fa646a118cbda0" alt="" width="1747" height="791" data-path="images/billing-contracts-templates-3.png" />
</Frame>

5. Switch to the "Preview" tab to see exactly how the final contract will look.

<Info>
  The preview uses random placeholder values to demonstrate formatting, but actual customer and location information will replace these placeholders when creating a contract for a specific customer.
</Info>

<Frame>
  <img src="https://mintcdn.com/spacebring/Q1ag5QEyylZUYkCY/images/billing-contracts-templates-4.png?fit=max&auto=format&n=Q1ag5QEyylZUYkCY&q=85&s=ce7e11b8dc9f83a5eabe8ccd50428c48" alt="" width="1747" height="791" data-path="images/billing-contracts-templates-4.png" />
</Frame>

6. Press `Create`.

Once created, you can select the necessary template when [creating contracts](/billing/contracts) for your customers.

## Manage a template

1. Click the menu (...) button near the necessary template.
2. Choose the action:
   * `Edit` – change the template title or replace the template document with a new version.
   * `Duplicate` – quickly create a similar template for minor adjustments.
   * `Delete` – delete the template if it's no longer needed.

<Frame>
  <img src="https://mintcdn.com/spacebring/Q1ag5QEyylZUYkCY/images/billing-contracts-templates-5.png?fit=max&auto=format&n=Q1ag5QEyylZUYkCY&q=85&s=88169b73a96cb3873c53413baa09fc88" alt="" width="1917" height="822" data-path="images/billing-contracts-templates-5.png" />
</Frame>

<Danger>
  Deleting a template is irreversible.
</Danger>
