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

# actions - Newsletter

> Shop actions around the newsletter: messages and email templates for newsletter subscribe/unsubscribe as well as entries on blocklists in the WEBSALE shop.

export const TextbausteinHinweis = () => <>
    Dieser Text wird über einen Textbaustein realisiert.<br />
    Alles zu Textbausteinen in Konfigurationen finden Sie{" "}
    <a href="https://dokumentation.websale.de/konfiguration#verwendung-von-textbausteinen-in-konfigurationen">hier</a>.
  </>;

This page contains all actions relating to newsletter dispatch.<br />Here you will find all messages and email templates for newsletter subscribe/unsubscribe as well as for entries on blocklists.

***

## Overview of actions

The actions listed here are **grouped thematically** to provide a clear overview of the associated error messages and email templates.

Actions that thematically belong to a different area can be found in the corresponding sections of this documentation or in the [alphabetical overview of actions](/en/konfiguration/actions-fehlertexte-e-mails/actions-alphabetische-ubersicht).

#### Excerpt of the basic `actions` structure

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
    "actions": {
      ...
      "blacklistAdd": {...},
      "newsletterSubscribe": {...},
      "newsletterUnsubscribe": {...},
      ...
    }
}
```

#### Action overview

| **Action**              | **Description**                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| `blacklistAdd`          | Defines the error messages that are output when adding a customer account to the blocklist. |
| `newsletterSubscribe`   | Defines the error messages that are output when subscribing to the newsletter.              |
| `newsletterUnsubscribe` | Defines the error messages that are output when unsubscribing from the newsletter.          |

***

## `actions.blacklistAdd` - Add recipient to a blocklist

The `blacklistAdd` action defines the error messages that are output when adding an email address to the blocklist.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingEmail": "<Textbaustein>",
    "emailCheckFailed": "<Textbaustein>",
    "actionNotAllowed": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**      | **Type** | **Description**                                                                                                 |
| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------- |
| `errorCodes`       | object   | Configures the error codes used for problems during the action.                                                 |
| `missingEmail`     | string   | Error message output when no email address was supplied. <br /><br /><TextbausteinHinweis />                    |
| `emailCheckFailed` | string   | Error message output when the provided email address is considered invalid. <br /><br /><TextbausteinHinweis /> |
| `actionNotAllowed` | string   | Error message output when the action is not allowed. <br /><br /><TextbausteinHinweis />                        |

***

## `actions.newsletter*` - Newsletter

### `actions.newsletterSubscribe` - Newsletter subscription

The `newsletterSubscribe` action defines error messages that are output when subscribing to the newsletter.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingField": "<Textbaustein>",
    "invalidField": "<Textbaustein>",
    "invalidTargetGroupId": "<Textbaustein>",
    "deactivatedTargetGroup": "<Textbaustein>",
    "actionNotAllowed": "<Textbaustein>",
    "emailCheckFailed": "<Textbaustein>",
    "internalError": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**            | **Type** | **Description**                                                                                                                |
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `errorCodes`             | object   | Configures the error codes used for problems during the action.                                                                |
| `missingField`           | string   | Error message output when at least one required field was not filled in. <br /><br /><TextbausteinHinweis />                   |
| `invalidField`           | string   | Error message output when a field contains an invalid value. <br /><br /><TextbausteinHinweis />                               |
| `invalidTargetGroupId`   | string   | Error message output when an invalid or unknown newsletter target group was supplied. <br /><br /><TextbausteinHinweis />      |
| `deactivatedTargetGroup` | string   | Error message output when the requested newsletter target group is disabled in the system. <br /><br /><TextbausteinHinweis /> |
| `actionNotAllowed`       | string   | Error message output when the action is not allowed. <br /><br /><TextbausteinHinweis />                                       |
| `emailCheckFailed`       | string   | Error message output when the provided email address is considered invalid. <br /><br /><TextbausteinHinweis />                |
| `internalError`          | string   | Error message output when unexpected system errors occur during newsletter subscription. <br /><br /><TextbausteinHinweis />   |

### `actions.newsletterUnsubscribe` - Newsletter unsubscription

The `newsletterUnsubscribe` action defines the error messages that are output when unsubscribing from the newsletter.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingEmail": "<Textbaustein>",
    "missingField": "<Textbaustein>",
    "missingTargetGroupId": "<Textbaustein>",
    "invalidTargetGroupId": "<Textbaustein>",
    "actionNotAllowed": "<Textbaustein>",
    "internalError": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**          | **Type** | **Description**                                                                                                                |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `errorCodes`           | object   | Configures the error codes used for problems during the action.                                                                |
| `missingEmail`         | string   | Error message output when no email address was supplied. <br /><br /><TextbausteinHinweis />                                   |
| `missingField`         | string   | Error message output when a required field was not filled in. <br /><br /><TextbausteinHinweis />                              |
| `missingTargetGroupId` | string   | Error message output when no newsletter group for unsubscription was supplied. <br /><br /><TextbausteinHinweis />             |
| `invalidTargetGroupId` | string   | Error message output when an invalid or unknown newsletter target group was supplied. <br /><br /><TextbausteinHinweis />      |
| `actionNotAllowed`     | string   | Error message output when the action is not allowed. <br /><br /><TextbausteinHinweis />                                       |
| `internalError`        | string   | Error message output when unexpected system errors occur during newsletter unsubscription. <br /><br /><TextbausteinHinweis /> |
