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

## 1. Concepts

### Automatic, event-triggered invoice emails

**Communications > Email Alerts** configures emails that Zenskar sends automatically as an invoice moves through its lifecycle. Unlike Configurations, which builds one campaign at a time, Email Alerts is organized around three fixed invoice events:

* **On Invoice Generation**
* **On Invoice Approval**
* **On Invoice Due**, shown in the product as **Invoice Reminders**

Each event depends on a Sender and an Email Template to build and send the email, and each event is configured independently.

### Segment-specific configuration is not yet enforced when sending

<Warning>
  Each event lets you configure a different alert per customer segment, but Zenskar currently only honors the configuration saved for the All Customers (default) segment when emails actually go out. If different senders, templates, or reminder schedules are set up for individual segments, those settings are saved but are not applied at send time. Configure the All Customers segment for the behavior every customer should receive until this limitation is resolved.
</Warning>

### Invoice Generation and Invoice Approval

These two events share the same layout: a two-pane screen with customer segments listed as cards on the left, and the alert configuration for the selected segment on the right. If no segments exist, the left pane shows a single **All Customers** card, which is the only alert available for that event.

Selecting a segment card opens its configuration on the right: a required **Sender**, a required **Email Template**, a read-only **Attach Invoice** indicator (the invoice attaches automatically to these two events), optional **CC** and **BCC** recipients, and a live preview of the resulting email with a link into the underlying template.

### Invoice Due (Invoice Reminders)

This event supports multiple reminders per segment, shown across two timelines: one anchored before the due date, and one for overdue payments after the due date. Each reminder is configured with a number of days offset from the due date, a required Sender, a required Email Template filtered to templates of type Payment Reminder, and optional CC and BCC.

Segment cards in the left pane can be reordered by drag and drop. Zenskar evaluates segments top to bottom for reminder targeting, so order matters, subject to the backend limitation described above.

Each reminder can be turned on or off with a toggle, edited, or deleted. Deleting a reminder takes effect immediately, with no confirmation step and no way to undo it.

### Adding a segment from Invoice Reminders

Invoice Due (Invoice Reminders) has an **Add Segment** option that allows selecting an existing segment or creating a new one inline, without leaving Email Alerts. This option is not available on Invoice Generation or Invoice Approval; segment selection there is limited to segments already created elsewhere, for example under the Segments tab.

***

## 2. How-to guides

### Configure the Invoice Generation or Invoice Approval alert

1. Go to **Communications > Email Alerts**, and select **On Invoice Generation** or **On Invoice Approval**.
2. Select a segment card in the left pane, or **All Customers** if no segments exist.
3. On the right, set **Sender** and **Email Template**, both required, and optionally **CC** and **BCC**.
4. Review the live preview, and use its link to open the template editor if the content needs changes.
5. Save.

### Add a reminder to Invoice Due (Invoice Reminders)

1. Go to **Communications > Email Alerts**, and select **On Invoice Due**.
2. Select a segment in the left pane.
3. On the before-due-date or after-due-date timeline, add a reminder, and set the days offset, **Sender**, and **Email Template**, filtered to Payment Reminder templates.
4. Optionally add **CC** and **BCC**.
5. Save.

### Reorder segments for Invoice Reminders

Drag a segment card in the left pane to change its position. Segments are evaluated top to bottom for reminder targeting.

### Add a segment from Invoice Reminders

On Invoice Due (Invoice Reminders), use **Add Segment**, then either select an existing segment or create a new one without leaving the screen. This option is not available on Invoice Generation or Invoice Approval.

### Turn a reminder on or off, edit it, or delete it

Use the toggle on a reminder card to turn it on or off without losing its configuration. Use **Edit** to change its settings. Use **Delete** to remove it permanently; this takes effect immediately, with no confirmation step.

### Troubleshooting

* **Add Segment is missing on Invoice Generation or Invoice Approval**: this option exists only on Invoice Due (Invoice Reminders). Create or manage segments from the Segments tab instead.
* **Email Template dropdown is empty on an Invoice Due reminder**: the dropdown only lists templates of type Payment Reminder. Create one under Email Templates first.
* **A reminder disappeared unexpectedly**: reminder deletion has no confirmation step, so an accidental click removes it immediately. Recreate the reminder with the same offset, sender, and template.
* **Attach Invoice cannot be turned off for Generation or Approval alerts**: this field is read-only by design for these two events, since the invoice always attaches.
* **A segment-specific alert does not seem to apply**: this matches a known backend limitation. Only the All Customers segment's configuration is currently honored when emails are sent, regardless of what other segments are configured with.

***

## 3. Reference

### Location

**Communications > Email Alerts**.

### Invoice events

| Event                              | Layout                                                | Notes                                                              |
| ---------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------ |
| On Invoice Generation              | Segment list plus a single alert configuration        | Attach Invoice is always on and read-only                          |
| On Invoice Approval                | Segment list plus a single alert configuration        | Attach Invoice is always on and read-only                          |
| On Invoice Due (Invoice Reminders) | Segment list plus multiple reminders on two timelines | Reminders are configured relative to the due date, before or after |

### Fields (Invoice Generation and Invoice Approval)

| Field          | Required | Notes                                            |
| -------------- | -------- | ------------------------------------------------ |
| Sender         | Yes      |                                                  |
| Email Template | Yes      |                                                  |
| Attach Invoice | No       | Read-only indicator; the invoice always attaches |
| CC             | No       |                                                  |
| BCC            | No       |                                                  |

### Fields (Invoice Due, Invoice Reminders)

| Field                         | Required | Notes                                          |
| ----------------------------- | -------- | ---------------------------------------------- |
| Days before or after due date | Yes      | Offset that determines when the reminder sends |
| Sender                        | Yes      |                                                |
| Email Template                | Yes      | Filtered to templates of type Payment Reminder |
| CC                            | No       |                                                |
| BCC                           | No       |                                                |

### Reminder card actions

| Action | Effect                                                          |
| ------ | --------------------------------------------------------------- |
| Toggle | Turns the reminder on or off without changing its configuration |
| Edit   | Opens the reminder's configuration for changes                  |
| Delete | Removes the reminder immediately, with no confirmation step     |

### Known limitations

| Limitation                                                       | Notes                                                                                                                                                                                |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Segment-specific configuration is not enforced when sending      | Only the All Customers segment's configuration is currently honored for Invoice Generation, Invoice Approval, and Invoice Due, regardless of what other segments are configured with |
| Add Segment is available only on Invoice Due (Invoice Reminders) | Invoice Generation and Invoice Approval can only use segments created elsewhere                                                                                                      |
| Reminder deletion cannot be undone                               | There is no confirmation step and no way to recover a deleted reminder                                                                                                               |
