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

# Email alerts

This guide will help you configure automated email alerts for a *segment of customers*. A segment of customers share certain common attributes. For example, you may segment your customers based on the following criteria:

* pay by card
* pay using Stripe
* live in a particular geography

You can configure automated email alerts based on events. For example, you can send email alerts reminding the customer of:

* **the approaching due date**  in the event of generation of an invoice
* an overdue payment in the event of **passing of the due date**

## How to create an email alert

<Image align="center" className="border" border={true} src="https://files.readme.io/9a5c502-Screenshot_from_2023-11-08_15-05-03.png" />

> 🚧 Limitations
>
> Currently, Zenskar supports creation of the following two types of email alerts:
>
> * **before due date**: when an invoice is generated, remind customers about the approaching due date
> * **after due date**: alert customers that the invoice payment is overdue
>
> Also, alerts can be sent only to one segment of customers: **all customers**.

1. Navigate to **Communication** > **Email Alerts**.
2. Click ![](https://files.readme.io/d284efe-Screenshot_from_2023-11-08_15-05-32.png)

### Before due date: remind customers about the approaching due date

1. Click on **ADD REMINDER** button under the **INVOICE GENERATED** section.
2. Fill in the details in the following form.
3. Click **SAVE ALERT**.

<Image align="center" className="border" border={true} src="https://files.readme.io/34b0151-Screenshot_from_2023-11-08_15-14-03.png" />

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Field
      </th>

      <th style={{ textAlign: "left" }}>
        Value to enter
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        Send email before due (days)
      </td>

      <td style={{ textAlign: "left" }}>
        Enter the number of days **before the due** date when you would like Zenskar to send automated email alerts to your customers to remind them of the approaching due date.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Sender
      </td>

      <td style={{ textAlign: "left" }}>
        Select the [sender](https://docs.zenskar.com/docs/senders) on whose behalf you would like Zenskar to send mails to your customers.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email template
      </td>

      <td style={{ textAlign: "left" }}>
        The drop-down will list all [email templates](https://docs.zenskar.com/docs/email-templates) of the type **payment reminder**.\
        ![](https://files.readme.io/b3e65e8-Screenshot_from_2023-11-08_15-12-14.png)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email attachment
      </td>

      <td style={{ textAlign: "left" }}>
        Read-only field. Invoice is attached by default.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email subject
      </td>

      <td style={{ textAlign: "left" }}>
        Read-only field that displays the subject of the template.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email body
      </td>

      <td style={{ textAlign: "left" }}>
        Read-only field that displays the body of the template.
      </td>
    </tr>
  </tbody>
</Table>

### After due date: alert customer that the invoice payment is overdue

1. Click on **ADD REMINDER** button under the **DUE DATE** section.
2. Fill in the details in the following form.
3. Click **SAVE ALERT**.

<Image align="center" className="border" border={true} src="https://files.readme.io/e10667f-Screenshot_from_2023-11-08_21-04-14.png" />

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Field
      </th>

      <th style={{ textAlign: "left" }}>
        Value to enter
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        Send email after due (days)
      </td>

      <td style={{ textAlign: "left" }}>
        Enter the number of days **after the due date** when you would like Zenskar to send automated payment overdue reminder email alert to your customers.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Sender
      </td>

      <td style={{ textAlign: "left" }}>
        Select the [sender](https://docs.zenskar.com/docs/senders) on whose behalf you would like Zenskar to send mails to your customers.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email template
      </td>

      <td style={{ textAlign: "left" }}>
        The drop-down will list all [email templates](https://docs.zenskar.com/docs/email-templates) of the type **payment reminder**.\
        ![](https://files.readme.io/b3e65e8-Screenshot_from_2023-11-08_15-12-14.png)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email attachment
      </td>

      <td style={{ textAlign: "left" }}>
        Read-only field. Invoice is attached by default.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email subject
      </td>

      <td style={{ textAlign: "left" }}>
        Read-only field that displays the subject of the template.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Email body
      </td>

      <td style={{ textAlign: "left" }}>
        Read-only field that displays the body of the template.
      </td>
    </tr>
  </tbody>
</Table>
