# How to Manage Mailing Templates in Omnitron?

This tutorial provides step-by-step instructions for managing Mailing Templates in Omnitron.

## <mark style="color:red;">Step 1: Access to Omnitron​</mark> <a href="#step-1-access-to-omnitron" id="step-1-access-to-omnitron"></a>

* Get access to the Omnitron panel.
* Enter your Username and Password, and then click the **Sign In** button.\
  ![](/files/FQgto2ESMuyyETj02bTx)

## <mark style="color:red;">Step 2: Navigate to Mailing Template Page​</mark> <a href="#step-2-navigate-to-mailing-template-page" id="step-2-navigate-to-mailing-template-page"></a>

* Follow the **Sales Channels > Content Management** sidebar and click the **Mailing Templates** page.<br>

  <figure><img src="/files/frby5WhiaN6rKikvg2Xh" alt=""><figcaption></figcaption></figure>
* This page displays mailing templates for management purposes.<br>

  <figure><img src="/files/irWX2KbNgEAy6FvI2cmo" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">Step 3: Adding Mailing Templates​</mark> <a href="#step-3-adding-mailing-templates" id="step-3-adding-mailing-templates"></a>

* To add a new mailing template , click the **+ New Mailing Templates** button. Complete the form by filling in the following fields:
  * **Name:** Select one of the default email templates, e.g., for sending a welcome email upon user registration.
  * **Status:** Select whether the template is active or inactive.
  * **Language:** Select the language for the mailing template from the options available in Omnitron, aligning with local languages.
  * **Content:** Input the email content in HTML format.
* Once the relevant fields are completed, click the **Save** button.<br>

  <figure><img src="/files/dKIyv5V8quC1phXqfhS9" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">Step 4: Dynamic Mailing Templates for Order Cancellations​</mark> <a href="#step-4-dynamic-mailing-templates-for-order-cancellations" id="step-4-dynamic-mailing-templates-for-order-cancellations"></a>

The `Dynamic_Cancel_Mail_Template_Url` in the `api/v1/dynamic setting` serves to create a custom mail template for order cancellations based on primary keys representing cancellation reasons. It is essential to define the `Dynamic_Cancel_Mail_Template_Url` with the CancellationReason primary key as the key and the corresponding template path as the value.

The process follows these rules:

1. The system checks the cancellation reasons associated with the primary keys of the order items that trigger the email. If a custom template is specified in `Dynamic_Cancel_Mail_Template_Url`, that template takes precedence.
2. In case there is no match within the definitions of `Dynamic_Cancel_Mail_Template_Url`, the system retrieves the template information specified in the channel's configuration details under `cancel_mail_template_url`.
3. If, even then, no cancel\_mail\_template\_url is found, the system resorts to reading the template value in the `Cancel_Mail_Template_Url` setting.
4. In scenarios where the Cancellation Reasons for the canceled order items vary, the system selects the template based on the first one specified in `Dynamic_Cancel_Mail_Template_Url`.


---

# Agent Instructions: 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:

```
GET https://docs.akinon.com/tutorials/omnitron/sales-channels/content-management/how-to-manage-mailing-templates-in-omnitron.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
