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

# Contract templates

> Writing the agreements people sign: the text, merge fields, what an adoption contract asks at signing, when each template is offered, and versions.

**Contract templates** holds the agreements people sign: the adoption contract, a foster agreement, a surrender form. A template is the text a contract is made from. The signed contracts themselves live on the records they were signed on.

Find it under **Settings → Operations & forms → Contract templates**, or type "Contract templates" in the search palette. Anyone whose role can **See** Animals can read the templates. Writing, editing and retiring them needs **Change** on Animals.

<Note>
  An adoption can only be recorded by signing an adoption contract on an approved application, so your organization needs at least one active adoption template. See [Recording the adoption](/animals/applications#recording-the-adoption).
</Note>

## The list

Each template shows its name and version, what it is for, the conditions it is offered under ("Offered for: every animal", for one with none), and its text. A template that has been signed says how many times.

Tick **Show retired** to list retired templates too; they are marked **Retired**.

## New template

Press **New template**.

| Field       | What it means                                                    |
| ----------- | ---------------------------------------------------------------- |
| **Name**    | What staff choose it by, such as "Adoption agreement". Required. |
| **Version** | However you refer to this version. Starts as v1.                 |
| **For**     | **Adoption**, **Foster**, **Surrender** or **Other**.            |
| **Body**    | The text of the agreement. Required.                             |

Then set what it asks at signing (adoption templates only) and when it is offered, and press **Create**. Two templates cannot share both a name and a version.

### For

| Kind                                 | Where it is signed                                                                                                                               |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Adoption**                         | On an approved application, which records the adoption, and on an adoption's **Contract** tab. See [Adoptions](/animals/adoptions#the-contract). |
| **Foster**, **Surrender**, **Other** | Written and kept here. The app does not yet offer these for signing on any record.                                                               |

### Body

Write the agreement as you would a reply: bold, links, lists, headings, tables, pictures, a letterhead. Put merge fields where the details go, for example:

`I, {{signer_name}}, agree to adopt {{animal_name}} for {{fee}} on {{date}}.`

Your organization's name is not a merge field. Type it into the text.

## Merge fields

Under the body, **Merge fields: click to insert** lists every merge field. Click one to insert it where the cursor is, spelled exactly. Hover over one to see what it fills in.

| Merge field                | What it fills in                                                                                                                     |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `{{animal_name}}`          | The animal's name.                                                                                                                   |
| `{{animal_species}}`       | Its species.                                                                                                                         |
| `{{animal_id}}`            | Its ID.                                                                                                                              |
| `{{animal_names}}`         | Every animal the contract names, for animals going home together.                                                                    |
| `{{animal_ids}}`           | Their IDs.                                                                                                                           |
| `{{microchip_number}}`     | The animal's microchip.                                                                                                              |
| `{{microchip_numbers}}`    | Every animal's microchip.                                                                                                            |
| `{{adopter_name}}`         | The adopter's name, or the foster carer's on a foster agreement.                                                                     |
| `{{adopter_email}}`        | Their email.                                                                                                                         |
| `{{adopter_phone}}`        | Their phone.                                                                                                                         |
| `{{co_applicant_name}}`    | The co-applicant's name, from the application.                                                                                       |
| `{{co_applicant_email}}`   | The co-applicant's email.                                                                                                            |
| `{{fee}}`                  | The fee, after discounts. For animals going home together, all their fees added up.                                                  |
| `{{list_fee}}`             | The fee before discounts. Adoptions only.                                                                                            |
| `{{discounts}}`            | The discounts applied. Adoptions only.                                                                                               |
| `{{date}}`                 | The date. On an approved application, the adoption day; elsewhere, the day it is signed.                                             |
| `{{signer_name}}`          | The name typed to sign.                                                                                                              |
| `{{media_release}}`        | Yes or No: from the application, or asked when signing.                                                                              |
| `{{payment_method}}`       | How the fee is paid: asked when signing on an approved application; on an adoption's Contract tab, the method of its latest payment. |
| `{{payment_instructions}}` | How to complete the payment, asked when signing.                                                                                     |
| `{{approved_by}}`          | The team member approving the contract, asked when signing.                                                                          |
| `{{completed_at}}`         | Where it was completed, asked when signing.                                                                                          |

A detail that is simply missing, such as a co-applicant on an application without one, fills in as nothing.

<Warning>
  Anything in double braces that is not one of these stays in the contract exactly as typed, and **a contract with an unfilled placeholder cannot be signed**. A misspelled merge field shows up when somebody tries to sign it. Insert fields by clicking them rather than typing.
</Warning>

## Asked when it is signed

An adoption template can ask up to four things when it is signed on an approved application. Tick each one the template needs; the merge fields it fills are shown beside it, to put in your text.

| Ask                                      | Fills                                            |
| ---------------------------------------- | ------------------------------------------------ |
| **The media release choice**             | `{{media_release}}`                              |
| **How they pay, and how to complete it** | `{{payment_method}}`, `{{payment_instructions}}` |
| **The team member approving it**         | `{{approved_by}}`                                |
| **Where it was completed**               | `{{completed_at}}`                               |

What the signing form offers for each is described under [What this contract asks](/animals/applications#what-this-contract-asks). The answers are kept with the signed contract, as they were given.

<Note>
  Only the approved application asks these questions. A template that uses `{{payment_instructions}}`, `{{approved_by}}` or `{{completed_at}}` cannot be signed from an adoption's own **Contract** tab, because nothing fills them there. The media release is asked on both.
</Note>

Tick the ask for each of these merge fields your text uses. Left unticked, `{{payment_method}}` fills in as nothing, and the others stay unfilled, so the contract cannot be signed on the application until the template is fixed; the preview names the field. The media release is the exception when the application already answered it.

## Offered when

Which records a template is offered for. Leave everything blank to offer it for every record of its kind.

| Condition                                 | What it means                                     |
| ----------------------------------------- | ------------------------------------------------- |
| **Species**                               | One species, or **Any species**.                  |
| **Age**                                   | Any of the age groups chosen, for that species.   |
| **Carries any of these traits**           | The animal has at least one of the traits chosen. |
| **In care at least (days)**               | Days since the animal's intake.                   |
| **Going home together, at least**         | How many animals are going home together.         |
| **Has a bonded pair**                     | The animal has a bonded pair on its record.       |
| **Fee at least ($)**, **Fee at most ($)** | The adoption's fee.                               |

**Add a condition on a field** adds a test on a field of **The animal's** or **The adopter's** record:

* the animal's status, species, breed, sex, size, altered, health status, intake source, name, medical flags, behavioral traits, microchip number or primary color;
* the adopter's email, phone, roles, preferred contact or status;
* or **a custom field…**, named by its field key.

Each test is **is**, **is not**, **contains**, **is filled in**, **is empty**, **is more than** or **is less than**, with a value where the test needs one.

Every condition must hold for the template to be offered.

* On an approved application, only the templates offered for the chosen animals can be picked.
* On an adoption's **Contract** tab, the offered templates come first, under **Offered for this record**, and the rest are still there under **Other agreements**.

When two adoption templates are both offered, the one with conditions is listed above the one without, so a template for a particular kind of animal comes before your standard one.

## Editing a template

Press **Edit** on a template to change its body, what it asks and when it is offered, then **Save**. The name, version and kind cannot be changed.

Editing does **not** change any contract already signed. Each signature keeps its own copy of the exact text that was agreed, with the template's name and version as they were. A template that has been signed says so on its card, with how many times. Contracts signed after you save use the new text.

## Versions

The version is a label you choose, shown beside the name wherever a template is picked ("Adoption agreement · v2") and kept on every contract signed from it.

Because a template's version cannot be changed, a new version of an agreement is a new template:

<Steps>
  <Step title="Create the new version">
    Press **New template** and give it the same name with a new version, such as v2.
  </Step>

  <Step title="Retire the old one">
    Press **Retire** on the old version, so it is no longer offered.
  </Step>
</Steps>

Contracts signed on the old version keep its text and still say which version they were.

## Retiring a template

**Retire** stops a template being offered for signing. It is kept, so every contract signed from it still names it, and **Show retired** lists it.

<Warning>
  Retiring happens at once, with no question first, and the app has no way to bring a retired template back. Make a new template instead.
</Warning>

Templates are never deleted.
