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

# Email templates

## 1. Concepts

### Email content versus the attached document

**Communications > Email Templates** controls the subject, body, and (where eligible) attached document of a transactional email. The attached document itself, for example the invoice PDF, is designed separately under [Document Templates](/docs/20240301/product-modules/more/communications/document-templates); the email attachment picker only lets you choose among document templates that already exist there.

### Email template types

Eight email template types are available: Invoice, Payment Receipt, Payment Reminder, Usage Report, Refund Receipt, Contract, Credit Note, and Custom Email. Custom Email is a flexible, general-purpose type for anything the remaining types do not already cover.

### Which types can carry a document attachment

Invoice, Payment Receipt, Refund Receipt, and Credit Note emails can attach their own matching document type. Contract emails can attach either a Contract or an Invoice document. Payment Reminder emails can attach an Invoice document. Usage Report and Custom Email templates cannot carry a document attachment at all.

### Template variables

The email body editor has an Insert Variable option that lists placeholders you can drop into the subject or body, for example a customer's name or an invoice number. Zenskar replaces these with real values when the email is sent. The exact list of available variables depends on the email type you are editing and is populated live by Zenskar, so the Insert Variable dropdown itself is the source of truth for what is available on a given template.

### Automatic versus manual sending

Most email types send automatically as part of the billing event they are tied to. Payment Reminder, Usage Report, and Custom Email templates additionally support sending on demand, using a Send Email action from the template list, independent of any automatic schedule.

***

## 2. How-to guides

### Create an email template

1. Go to **Communications > Email Templates** and click **+ Add New Email Template**.
2. Choose an email template type.
3. Enter a name for the template.
4. If the type supports attachments, choose a document template from the Email Attachment dropdown. This dropdown only lists document templates that already exist under [Document Templates](/docs/20240301/product-modules/more/communications/document-templates); create one there first if none exists yet.
5. Write the subject and body. Use **Insert Variable** to add placeholders that Zenskar fills in when the email is sent.
6. Save the template.

### Add a hyperlink to the email body

Select the text you want to link, then use the hyperlink tool in the editor toolbar to set the destination URL.

### Add a hidden, searchable element

Use the eye-icon tool in the editor toolbar to mark selected text as hidden. Hidden text does not render visibly in the email but remains in the underlying markup, so you can use it for keyword-based searches in your mail client without cluttering what the customer sees.

### Insert an image or your organization's logo

Use the image tool in the editor toolbar, then choose **URL** to insert an image from a web address, or **Org Logo** to insert your organization's current logo directly.

<Note>
  To change what your organization's logo is, go to **Settings > General**, and under Organization Details use the logo upload area to upload a new one.
</Note>

### Insert a usage aggregate (Usage Report only)

On a Usage Report template, use **Insert Aggregate** to add a value from one of your organization's configured meters into the email body.

### Manually send an email

1. Go to **Communications > Email Templates**.
2. On a Payment Reminder, Usage Report, or Custom Email template's row, use the **Send Email** action.
3. Choose recipients using the selector on that row, labeled Select Customers or Select Invoices depending on the email type.
4. Review the template content, then confirm the send.

### Bulk send a Custom Email via CSV

1. Open the Custom Email template's **Send Email** action.
2. Use **Upload CSV** to select a CSV file of recipients.
3. Make sure the CSV includes a `customer_id` or `external_id` column identifying each recipient; a file missing both is rejected.
4. Confirm the send.

***

## 3. Reference

### Location

**Communications > Email Templates**.

### Email template types

| Type             | Can attach a document         | Manual send available |
| ---------------- | ----------------------------- | --------------------- |
| Invoice          | Yes, an Invoice               | No                    |
| Payment Receipt  | Yes, a Payment Receipt        | No                    |
| Payment Reminder | Yes, an Invoice               | Yes                   |
| Usage Report     | No                            | Yes                   |
| Refund Receipt   | Yes, a Refund Receipt         | No                    |
| Contract         | Yes, a Contract or an Invoice | No                    |
| Credit Note      | Yes, a Credit Note            | No                    |
| Custom Email     | No                            | Yes                   |

### Fields

| Field            | Notes                                                                                                 |
| ---------------- | ----------------------------------------------------------------------------------------------------- |
| Name             | Template name                                                                                         |
| Type             | Chosen once, at creation                                                                              |
| Email Attachment | Only shown for types that support attachments; lists existing document templates of the matching type |
| Subject          |                                                                                                       |
| Body             | Rich text, with variable insertion, hyperlinks, hidden elements, and images                           |

### Editor toolbar

| Tool             | Icon                        | Behavior                                                                                                   |
| ---------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Hyperlink        | Link icon                   | Applies a URL to the selected text                                                                         |
| Hidden element   | Eye icon                    | Marks selected text as invisible in the rendered email but present and searchable in the underlying markup |
| Image            | Image icon                  | Inserts an image from a URL or your organization's current logo                                            |
| Insert Variable  | Dropdown                    | Inserts a placeholder that Zenskar replaces with a real value on send; list depends on email type          |
| Insert Aggregate | Dropdown, Usage Report only | Inserts a value from one of your organization's configured meters                                          |

### CSV bulk upload requirements (Custom Email)

| Requirement       | Notes                                                                                 |
| ----------------- | ------------------------------------------------------------------------------------- |
| File type         | Must be a valid CSV file                                                              |
| Identifier column | Must include a `customer_id` or `external_id` column; a file with neither is rejected |

### What is not currently supported

| Capability                                                                                   | Status                                                                          |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Document attachment on Usage Report or Custom Email                                          | Not available                                                                   |
| Manual send for Invoice, Payment Receipt, Refund Receipt, Contract, or Credit Note templates | Not available from this list; these send automatically with their billing event |
| CSV bulk upload for types other than Custom Email                                            | Not available                                                                   |
