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

> Shop actions for products: configure messages for reviews, watchlists and availability alerts including the associated notifications to customers.

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 related to products.\
This includes actions for reviews, watchlists and availability alerts as well as the associated messages and notifications.

***

## 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": {
      ...
      "backInStockActivate": {...},
      "backInStockDeactivate": {...},
      "productRatingAdd": {...},
      "productRatingDelete": {...},
      "productRatingUpdate": {...},
      "watchListAdd": {...},
      "watchListDelete": {...},
      "watchListItemAdd": {...},
      "watchListItemDelete": {...},
      ...
    }
}
```

#### Action overview

| **Action**              | **Description**                                                                          |
| ----------------------- | ---------------------------------------------------------------------------------------- |
| `backInStockActivate`   | Defines the error messages output for requests to activate an availability notification. |
| `backInStockDeactivate` | Defines the error message output when deactivating an availability notification.         |
| `productRatingAdd`      | Defines the error messages output when submitting a product review.                      |
| `productRatingUpdate`   | Defines the error messages output when changing a product review.                        |
| `productRatingDelete`   | Defines the error messages output when deleting a product review.                        |
| `watchListAdd`          | Defines the error messages output when creating and using watchlists.                    |
| `watchListDelete`       | Defines the error messages output when deleting a watchlist.                             |
| `watchListItemAdd`      | Defines the error messages output when adding products to a watchlist.                   |
| `watchListItemDelete`   | Defines the error messages output when removing an item from a watchlist.                |

***

## `actions.backInStock*` - Availability alert

### `actions.backInStockActivate` - Activate availability alert

The `backInStockActivate` action controls the error messages for requests to activate an availability notification.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "notLoggedIn": "<Textbaustein>",
    "missingEmail": "<Textbaustein>",
    "missingProductId": "<Textbaustein>",
    "invalidStoreId": "<Textbaustein>",
    "internError": "<Textbaustein>",
    "notAllowed": "<Textbaustein>",
    "missingInventoryState": "<Textbaustein>",
    "entryExists": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**           | **Type** | **Description**                                                                                                                                         |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`            | array    | Configures the error codes used for problems during the action.                                                                                         |
| `notLoggedIn`           | string   | Error message output when the user is not signed in. <br /><br /><TextbausteinHinweis />                                                                |
| `missingEmail`          | string   | Error message output when no email address was supplied. <br /><br /><TextbausteinHinweis />                                                            |
| `missingProductId`      | string   | Error message output when no product ID was supplied for which the notification should be set up. <br /><br /><TextbausteinHinweis />                   |
| `invalidStoreId`        | string   | Error message output when an invalid or unknown store/branch ID was supplied. <br /><br /><TextbausteinHinweis />                                       |
| `internError`           | string   | Error message output when an unexpected system error occurs while activating the notification. <br /><br /><TextbausteinHinweis />                      |
| `notAllowed`            | string   | Error message output when the action is not allowed. <br /><br /><TextbausteinHinweis />                                                                |
| `missingInventoryState` | string   | Error message output when no stock status exists for the product. <br /><br /><TextbausteinHinweis />                                                   |
| `entryExists`           | string   | Error message output when an entry for an availability notification already exists for this item and this customer. <br /><br /><TextbausteinHinweis /> |

### `actions.backInStockDeactivate` - Deactivate availability alert

The `backInStockDeactivate` action controls the error messages for requests to deactivate an availability notification.

#### Example configuration

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

#### Parameter overview

| **Parameter**      | **Type** | **Description**                                                                                                                            |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `errorCodes`       | array    | Configures the error codes used for problems during the action.                                                                            |
| `notLoggedIn`      | string   | Error message output when the user is not signed in. <br /><br /><TextbausteinHinweis />                                                   |
| `missingEmail`     | string   | Error message output when no email address was supplied. <br /><br /><TextbausteinHinweis />                                               |
| `missingProductId` | string   | Error message output when no product ID was supplied for which the notification should be deactivated. <br /><br /><TextbausteinHinweis /> |
| `internError`      | string   | Error message output when an unexpected system error occurs while deactivating the notification. <br /><br /><TextbausteinHinweis />       |
| `notAllowed`       | string   | Error message output when the action is not allowed. <br /><br /><TextbausteinHinweis />                                                   |

***

## `actions.productRating*` - Product review

### `actions.productRatingAdd` - Rate product

The `productRatingAdd` action controls the error messages when submitting a product review. In addition, an email to the merchant can be configured via `merchantEmail` that informs about new reviews.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingProductId": "<Textbaustein>",
    "missingOrderId": "<Textbaustein>",
    "wrongProductId": "<Textbaustein>",
    "wrongOrderId": "<Textbaustein>",
    "userMustLoggedIn": "<Textbaustein>",
    "invalidPoints": "<Textbaustein>",
    "missingPoints": "<Textbaustein>",
    "missingSubject": "<Textbaustein>",
    "missingDescription": "<Textbaustein>",
    "duplicateRating": "<Textbaustein>",
    "multiRating": "<Textbaustein>",
    "maxLengthSubject": "<Textbaustein>",
    "maxLengthDescription": "<Textbaustein>",
    "productNotExists": "<Textbaustein>",
    "orderNotExists": "<Textbaustein>"
  },
  "merchantEmail": {
    "template": "product_rating_merchant_notify.htm",
    "subject": "Neue Produktbewertung im Shop",
    "fromAddress": "noreply@meinshop.de",
    "fromName": "Mein Onlineshop",
    "toAddress": "bewertung@meinshop.de"
  }
}
```

#### Parameter overview

| **Parameter**          | **Type** | **Description**                                                                                                                                                                                                                                                          |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `errorCodes`           | array    | Configures the error codes used for problems during the action.                                                                                                                                                                                                          |
| `missingProductId`     | string   | Error message output when no product ID has been supplied for which a review should be submitted. <br /><br /><TextbausteinHinweis />                                                                                                                                    |
| `missingOrderId`       | string   | Error message output when no order number / order ID has been supplied. <br /><br /><TextbausteinHinweis />                                                                                                                                                              |
| `wrongProductId`       | string   | Error message output when the reviewed product does not belong to the specified order. <br /><br /><TextbausteinHinweis />                                                                                                                                               |
| `wrongOrderId`         | string   | Error message output when the specified order does not match the expected context (e.g. not assigned to the customer). <br /><br /><TextbausteinHinweis />                                                                                                               |
| `userMustLoggedIn`     | string   | Error message output when a non-signed-in user tries to submit a review. <br /><br /><TextbausteinHinweis />                                                                                                                                                             |
| `invalidPoints`        | string   | Error message output when an invalid score is supplied. <br /><br /><TextbausteinHinweis />                                                                                                                                                                              |
| `missingPoints`        | string   | Error message output when no score has been supplied. <br /><br /><TextbausteinHinweis />                                                                                                                                                                                |
| `missingSubject`       | string   | Error message output when no title for the review has been supplied. <br /><br /><TextbausteinHinweis />                                                                                                                                                                 |
| `missingDescription`   | string   | Error message output when no review text has been supplied. <br /><br /><TextbausteinHinweis />                                                                                                                                                                          |
| `duplicateRating`      | string   | Error message output when a review by the same customer already exists for this product. <br /><br /><TextbausteinHinweis />                                                                                                                                             |
| `multiRating`          | string   | Error message output when multiple reviews have been submitted in a forbidden context (e.g. duplicate entries). <br /><br /><TextbausteinHinweis />                                                                                                                      |
| `maxLengthSubject`     | string   | Error message output when the maximum character length has been exceeded for the review title. <br /><br /><TextbausteinHinweis />                                                                                                                                       |
| `maxLengthDescription` | string   | Error message output when the review text exceeds the maximum allowed length. <br /><br /><TextbausteinHinweis />                                                                                                                                                        |
| `productNotExists`     | string   | Error message output when the supplied product ID cannot be found in the system. <br /><br /><TextbausteinHinweis />                                                                                                                                                     |
| `orderNotExists`       | string   | Error message output when the supplied order ID cannot be found in the system. <br /><br /><TextbausteinHinweis />                                                                                                                                                       |
| `merchantEmail`        | object   | Configures the email through which the merchant is informed about a review submitted for their product. <br />Subject, sender and template are controlled via the general email parameters, see here:   [Email settings](/en/konfiguration/e-mails-e-mail-einstellungen) |

### `actions.productRatingDelete` - Delete product review

The `productRatingDelete` action controls the error messages when deleting a product review.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingProductId": "<Textbaustein>",
    "missingOrderId": "<Textbaustein>",
    "wrongProductId": "<Textbaustein>",
    "wrongOrderId": "<Textbaustein>",
    "userMustLoggedIn": "<Textbaustein>",
    "productNotExists": "<Textbaustein>",
    "invalidPoints": "<Textbaustein>",
    "missingPoints": "<Textbaustein>",
    "missingSubject": "<Textbaustein>",
    "missingDescription": "<Textbaustein>",
    "duplicateRating": "<Textbaustein>",
    "multiRating": "<Textbaustein>",
    "maxLengthSubject": "<Textbaustein>",
    "maxLengthDescription": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**          | **Type** | **Description**                                                                                                                                            |
| ---------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`           | array    | Configures the error codes used for problems during the action.                                                                                            |
| `missingProductId`     | string   | Error message output when no product ID has been supplied for which a review should be deleted. <br /><br /><TextbausteinHinweis />                        |
| `missingOrderId`       | string   | Error message output when no order number / order ID has been supplied. <br /><br /><TextbausteinHinweis />                                                |
| `wrongProductId`       | string   | Error message output when the reviewed product does not belong to the specified order. <br /><br /><TextbausteinHinweis />                                 |
| `wrongOrderId`         | string   | Error message output when the specified order does not match the expected context (e.g. not assigned to the customer). <br /><br /><TextbausteinHinweis /> |
| `userMustLoggedIn`     | string   | Error message output when a non-signed-in user tries to delete a review. <br /><br /><TextbausteinHinweis />                                               |
| `invalidPoints`        | string   | Error message output when an invalid score is supplied. <br /><br /><TextbausteinHinweis />                                                                |
| `missingPoints`        | string   | Error message output when no score has been supplied. <br /><br /><TextbausteinHinweis />                                                                  |
| `missingSubject`       | string   | Error message output when no title for the review has been supplied. <br /><br /><TextbausteinHinweis />                                                   |
| `missingDescription`   | string   | Error message output when no review text has been supplied. <br /><br /><TextbausteinHinweis />                                                            |
| `duplicateRating`      | string   | Error message output when a review by the same customer already exists for this product. <br /><br /><TextbausteinHinweis />                               |
| `multiRating`          | string   | Error message output when multiple reviews have been deleted in a forbidden context (e.g. duplicate entries). <br /><br /><TextbausteinHinweis />          |
| `maxLengthSubject`     | string   | Error message output when the maximum character length has been exceeded for the review title. <br /><br /><TextbausteinHinweis />                         |
| `maxLengthDescription` | string   | Error message output when the review text exceeds the maximum allowed length. <br /><br /><TextbausteinHinweis />                                          |
| `productNotExists`     | string   | Error message output when the supplied product ID cannot be found in the system. <br /><br /><TextbausteinHinweis />                                       |

### `actions.productRatingUpdate` - Change product review

The `productRatingUpdate` action controls the error messages for requests to edit an existing product review.

#### Example configuration `actions.productRatingUpdate`

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingProductId": "<Textbaustein>",
    "missingOrderId": "<Textbaustein>",
    "missingSubject": "<Textbaustein>",
    "missingDescription": "<Textbaustein>",
    "invalidPoints": "<Textbaustein>",
    "missingPoints": "<Textbaustein>",
    "userMustLoggedIn": "<Textbaustein>",
    "productNotExists": "<Textbaustein>",
    "duplicateRating": "<Textbaustein>",
    "multiRating": "<Textbaustein>",
    "maxLengthSubject": "<Textbaustein>",
    "maxLengthDescription": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**          | **Type** | **Description**                                                                                                                                   |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`           | array    | Configures the error codes used for problems during the action.                                                                                   |
| `missingProductId`     | string   | Error message output when no product ID has been supplied for which a review should be changed. <br /><br /><TextbausteinHinweis />               |
| `missingOrderId`       | string   | Error message output when no order number / order ID has been supplied. <br /><br /><TextbausteinHinweis />                                       |
| `userMustLoggedIn`     | string   | Error message output when a non-signed-in user tries to change a review. <br /><br /><TextbausteinHinweis />                                      |
| `invalidPoints`        | string   | Error message output when an invalid score is supplied. <br /><br /><TextbausteinHinweis />                                                       |
| `missingPoints`        | string   | Error message output when no score has been supplied. <br /><br /><TextbausteinHinweis />                                                         |
| `missingSubject`       | string   | Error message output when no title for the review has been supplied. <br /><br /><TextbausteinHinweis />                                          |
| `missingDescription`   | string   | Error message output when no review text has been supplied. <br /><br /><TextbausteinHinweis />                                                   |
| `duplicateRating`      | string   | Error message output when a review by the same customer already exists for this product. <br /><br /><TextbausteinHinweis />                      |
| `multiRating`          | string   | Error message output when multiple reviews have been changed in a forbidden context (e.g. duplicate entries). <br /><br /><TextbausteinHinweis /> |
| `maxLengthSubject`     | string   | Error message output when the maximum character length has been exceeded for the review title. <br /><br /><TextbausteinHinweis />                |
| `maxLengthDescription` | string   | Error message output when the review text exceeds the maximum allowed length. <br /><br /><TextbausteinHinweis />                                 |
| `productNotExists`     | string   | Error message output when the supplied product ID cannot be found in the system. <br /><br /><TextbausteinHinweis />                              |

***

## `actions.watchList*` - Watchlist

### `actions.watchListAdd` - Create / add watchlist

The `watchListAdd` action controls the error messages when creating and using watchlists.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "defaultWatchlist": "Meine Merkliste",
  "basketWatchlist": "Aus dem Warenkorb gemerkt",
  "errorCodes": {
    "missingWatchListName": "<Textbaustein>",
    "invalidWatchListName": "<Textbaustein>",
    "missingWatchListId": "<Textbaustein>",
    "watchListNotFound": "<Textbaustein>",
    "notLoggedIn": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**          | **Type** | **Description**                                                                                                                              |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `defaultWatchlist`     | string   | Display name of the default watchlist to which products are added without an explicit selection.   <br />Default: "`Default Watchlist`"      |
| `basketWatchlist`      | string   | Display name of the watchlist used for products taken over from the basket.   <br />Default: "`Basket Watchlist`"                            |
| `errorCodes`           | array    | Configures the error codes used for problems during the action.                                                                              |
| `missingWatchListName` | string   | Error message output when no name for a new or renamed watchlist has been supplied. <br /><br /><TextbausteinHinweis />                      |
| `invalidWatchListName` | string   | Error message output when the supplied watchlist name is invalid. <br /><br /><TextbausteinHinweis />                                        |
| `missingWatchListId`   | string   | Error message output when no watchlist ID has been supplied although an existing watchlist was expected. <br /><br /><TextbausteinHinweis /> |
| `watchListNotFound`    | string   | Error message output when the supplied watchlist cannot be found in the system. <br /><br /><TextbausteinHinweis />                          |
| `notLoggedIn`          | string   | Error message output when a non-signed-in user tries to add products to the watchlist. <br /><br /><TextbausteinHinweis />                   |

### `actions.watchListDelete` - Delete / remove watchlist

The `watchListDelete` action controls the error messages when deleting a watchlist.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingWatchListName": "<Textbaustein>",
    "invalidWatchListName": "<Textbaustein>",
    "missingWatchListId": "<Textbaustein>",
    "watchListNotFound": "<Textbaustein>",
    "notLoggedIn": "<Textbaustein>",
    "notChangeable": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**          | **Type** | **Description**                                                                                                                              |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`           | array    | Configures the error codes used for problems during the action.                                                                              |
| `missingWatchListName` | string   | Error message output when the supplied watchlist name is invalid. <br /><br /><TextbausteinHinweis />                                        |
| `invalidWatchListName` | string   | Error message output when the supplied watchlist name is invalid. <br /><br /><TextbausteinHinweis />                                        |
| `missingWatchListId`   | string   | Error message output when no watchlist ID has been supplied although an existing watchlist was expected. <br /><br /><TextbausteinHinweis /> |
| `watchListNotFound`    | string   | Error message output when the supplied watchlist cannot be found in the system. <br /><br /><TextbausteinHinweis />                          |
| `notLoggedIn`          | string   | Error message output when a non-signed-in user tries to delete a watchlist. <br /><br /><TextbausteinHinweis />                              |
| `notChangeable`        | string   | Error message output when the selected watchlist cannot be deleted (e.g. the default list). <br /><br /><TextbausteinHinweis />              |

### `actions.watchListItemAdd` - Add product to a watchlist

The `watchListItemAdd` action controls the error messages when adding products to the watchlist.

#### Example configuration

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingProductId": "<Textbaustein>",
    "invalidProductId": "<Textbaustein>",
    "invalidVariantId": "<Textbaustein>",
    "invalidService": "<Textbaustein>",
    "watchListNotFound": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**       | **Type** | **Description**                                                                                                                               |
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`        | array    | Configures the error codes used for problems during the action.                                                                               |
| `missingProductId`  | string   | Error message output when no product ID has been supplied. <br /><br /><TextbausteinHinweis />                                                |
| `invalidProductId`  | string   | Error message output when the supplied product ID is invalid or the item could not be found. <br /><br /><TextbausteinHinweis />              |
| `invalidVariantId`  | string   | Error message output when the supplied variant is invalid or not available. <br /><br /><TextbausteinHinweis />                               |
| `invalidService`    | string   | Error message output when an invalid or not applicable additional service has been supplied for the item. <br /><br /><TextbausteinHinweis /> |
| `watchListNotFound` | string   | Error message output when the supplied watchlist cannot be found in the system. <br /><br /><TextbausteinHinweis />                           |

### `actions.watchListItemDelete` - Remove product from a watchlist

The `watchListItemDelete` action controls the error messages when removing an item from a watchlist.

#### Example configuration `actions.watchListItemDelete`

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "missingItemId": "<Textbaustein>",
    "invalidItemId": "<Textbaustein>",
    "missingWatchListId": "<Textbaustein>",
    "invalidService": "<Textbaustein>",
    "watchListNotFound": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**        | **Type** | **Description**                                                                                                                               |
| -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`         | array    | Configures the error codes used for problems during the action.                                                                               |
| `missingItemId`      | string   | Error message output when no item / position ID has been supplied (no specific watchlist entry selected). <br /><br /><TextbausteinHinweis /> |
| `invalidItemId`      | string   | Error message output when the supplied item ID is invalid or the entry cannot be found. <br /><br /><TextbausteinHinweis />                   |
| `missingWatchListId` | string   | Error message output when no watchlist ID has been supplied. <br /><br /><TextbausteinHinweis />                                              |
| `invalidService`     | string   | Error message output when an invalid or mismatching service context is used for the watchlist entry. <br /><br /><TextbausteinHinweis />      |
| `watchListNotFound`  | string   | Error message output when the referenced watchlist does not exist in the system. <br /><br /><TextbausteinHinweis />                          |
