> ## 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.

# Credit note template variables

## Overview

This page documents every Mustache variable used in the credit note HTML template, organized by functional section, with its type and whether it is always present. For how Mustache syntax itself works (`{{variable}}`, sections, inverted sections) and the data type conventions used in the tables below, see the [Templating guide](/docs/20240301/product-modules/more/communications/templating-guide).

***

## 1. Basic credit note information

### 1.1 Header information

| Variable                   | Type         | Description                                    | Required |
| -------------------------- | ------------ | ---------------------------------------------- | -------- |
| `{{logo}}`                 | String (URL) | Organization's logo URL                        | Yes      |
| `{{zenskar_logo}}`         | String (URL) | Zenskar logo URL for footer branding           | Yes      |
| `{{zenskar_redirect_url}}` | String (URL) | Zenskar redirect URL for the "Powered by" link | Yes      |

### 1.2 Credit note information

| Variable                             | Type              | Description                                                | Required |
| ------------------------------------ | ----------------- | ---------------------------------------------------------- | -------- |
| `{{credit_note.credit_note_number}}` | String            | Unique credit note identifier/number                       | Yes      |
| `{{credit_note.date}}`               | String (Date)     | Date the credit note was issued                            | Yes      |
| `{{credit_note.amount}}`             | String (Currency) | Total credit note amount                                   | Yes      |
| `{{credit_note.remarks}}`            | String            | Reason or notes for the credit note                        | Yes      |
| `{{credit_note.pre_tax_amount}}`     | String (Currency) | Amount before tax                                          | No       |
| `{{credit_note.tax}}`                | String (Currency) | Tax amount                                                 | No       |
| `{{credit_note.invoice_number}}`     | String            | Original invoice number the credit note was issued against | Yes      |
| `{{credit_note.invoice_date}}`       | String (Date)     | Date of the original invoice                               | No       |

<Note>
  `pre_tax_amount` and `tax` are only present when the credit note has a tax breakdown; gate them with `{{#credit_note.tax}}...{{/credit_note.tax}}`. When absent, `{{credit_note.amount}}` already represents the total, so use it directly rather than summing `pre_tax_amount` and `tax` yourself.
</Note>

***

## 2. Party information

### 2.1 Customer information

| Variable                          | Type           | Description                                                                                      | Required |
| --------------------------------- | -------------- | ------------------------------------------------------------------------------------------------ | -------- |
| `{{customer.name}}`               | String         | Customer's name                                                                                  | Yes      |
| `{{customer.email}}`              | String (Email) | Customer's email address                                                                         | Yes      |
| `{{{customer.address}}}`          | String (HTML)  | Customer's billing address; render with the unescaped `{{{ }}}` form                             | Yes      |
| `{{{customer.ship_to_address}}}`  | String (HTML)  | Customer's shipping address, if different from billing; render with the unescaped `{{{ }}}` form | No       |
| `{{customer.invoice_recipients}}` | Array          | List of invoice recipient email addresses                                                        | No       |
| `{{customer.tax_id}}`             | String         | Customer's tax ID                                                                                | No       |
| `{{customer.id}}`                 | String         | Customer's internal ID                                                                           | No       |
| `{{customer.external_id}}`        | String         | Customer's external ID                                                                           | No       |
| `{{customer.custom_data}}`        | Object         | Custom key-value data associated with the customer; see [section 3](#3-custom-attributes)        | No       |

### 2.2 Seller information

| Variable                | Type          | Description                                                | Required |
| ----------------------- | ------------- | ---------------------------------------------------------- | -------- |
| `{{seller.name}}`       | String        | Seller's name                                              | Yes      |
| `{{{seller.address}}}`  | String (HTML) | Seller's address; render with the unescaped `{{{ }}}` form | Yes      |
| `{{seller.tax_config}}` | Object        | Seller's tax configuration                                 | No       |

***

## 3. Custom attributes

Customer custom attributes are available under `customer.custom_data`, keyed by the attribute's name:

```mustache theme={null}
{{#customer.custom_data.account_manager}}
  Account Manager: {{customer.custom_data.account_manager}}
{{/customer.custom_data.account_manager}}
```

Wrap each custom attribute in a section, as shown above, since a customer may not have every attribute set.
