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

# Templates

Templates let you define a message, email, or clinical note once and reuse it across every patient or Encounter it applies to, instead of writing the same content by hand every time. Partners can build their own, or have MDI set them up on their behalf.

## Types of templates

* **Message templates** — for patient messaging (e.g., a standard welcome message, a routine post-approval note).
* **Email templates** — for automated or manual email sends.
* **Clinical note templates** — for the notes physicians attach to an Encounter, so common note structures don't need to be retyped case by case.

All three work the same way: draft the content once, save it as a template, and reuse it wherever that type of content is sent.

## Personalizing templates with Wildcards

Templates commonly use **Wildcards** — merge-variable placeholders like a patient's first name — so a single template renders personalized for every patient it's sent to, with no manual editing required per send. See Tags & Wildcards for the full list of available Wildcards and how the placeholder syntax works.

For example, a welcome message template might read:

{% code title="Welcome message template" %}

```
Hi {{first_name}}, welcome — your care team is reviewing your intake now.
```

{% endcode %}

Every patient who receives this template sees their own name substituted in automatically, so the message reads as personal even though it was written once.

## Common use cases

* **Standard welcome message** — sent when a Patient or Encounter is created, introducing the brand and setting expectations.
* **Routine post-approval note** — a clinical note template a physician attaches after approving an Encounter, covering the standard guidance for that treatment.
* **Templated refill reminder** — a message template used to prompt a patient that it's time to refill, personalized per patient and commonly triggered as part of the refill process.

## Recipe: building a reusable welcome message

{% stepper %}
{% step %}
In the Partner Portal, open the template editor for message templates.
{% endstep %}

{% step %}
Draft the welcome message, using Wildcards for any patient-specific detail (name, Offering name, etc.).
{% endstep %}

{% step %}
Save the template.
{% endstep %}

{% step %}
Reference the template from an Automation Step (e.g., triggered on Patient Created) so it sends automatically, or use it for manual sends when staff need the same message ad hoc.
{% endstep %}
{% endstepper %}

Because the template lives in one place, updating the wording later — a compliance change, a tone adjustment — takes effect everywhere it's used, without you having to hunt down every place the old copy was pasted.

{% hint style="warning" %}
Wildcards only resolve inside content types that support them (message, email, and clinical note templates). Plain, one-off messages don't expand Wildcard syntax.
{% endhint %}


---

# 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.mdintegrations.com/partner/exploring-features/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.
