> For the complete documentation index, see [llms.txt](https://docs.pixeleyes.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pixeleyes.de/anleitungen-instructions/english/documentation-of-our-shopware-6-plugins/bonus-points-and-loyalty-program-for-shopware-6/setup-in-shopware/creating-promotions-discounts.md).

# Creating promotions (discounts)

The plugin generates voucher codes based on **Shopware promotions**. For each reward type, a matching promotion must be created in Shopware in advance.

***

## Basic principle

The plugin accesses an existing Shopware promotion and automatically generates an **individual code** from it, which it issues to the customer. The promotion defines the discount – the plugin supplies the personalized code.

> **Mandatory requirement for all reward types:** Every linked promotion must be configured under **Codes tab → Code type: Individual promotion codes**. The plugin generates these codes automatically on every redemption. Without this code type, the plugin cannot generate a code.

***

## Promotion for a voucher reward

A voucher reward can, for example, grant a percentage or absolute discount.

### Step by step

1. Open **Marketing → Promotions → Add promotion**
2. **Name:** e.g. "Bonus – €10 voucher"
3. **Active:** enabled
4. Tab **General:**
   * **Maximum redemptions per customer:** `1`
5. Tab **Discounts:**
   * **Type:** Fixed or percentage
   * **Value:** e.g. `10` (for €10)
   * **Apply to:** Cart total
6. Tab **Codes:**
   * **Code type:** `Individual promotion codes` ← **required so the plugin can generate codes**
7. **Save**
8. Enter the promotion in the plugin under **Reward → Linked promotion**

***

## Promotion for a free-product reward

A free product is implemented via three components: a **dynamic product group**, a **price rule** and a **promotion**.

### Step 1: Create a dynamic product group

1. Open **Catalogues → Dynamic product groups → New product group**
2. **Name:** e.g. "Reward 1"
3. Under **Conditions**, add the desired products or filters (e.g. "Product → Is one of → \[your products]")
4. **Save**

### Step 2: Create a price rule

1. Open **Settings → Rules → Add rule**
2. **Name:** e.g. "PRB – Product: Reward 1"
3. **Priority:** `1`
4. Under **Conditions:**
   * Condition: **Item in dynamic product group**
   * Operator: **All**
   * Operator: **Is one of**
   * Product group: `Reward 1` (the group created in step 1)
5. **Save**

### Step 3: Create a promotion

1. Open **Marketing → Promotions → Add promotion**
2. **Name:** e.g. "Bonus – Free product: Reward 1"
3. Tab **General:**
   * **Maximum redemptions per customer:** `1`
4. Tab **Discounts:**
   * **Type:** Percentage
   * **Value:** `100`
   * **Apply to:** selected items with a price rule
   * **Price rule:** `PRB – Product: Reward 1` (the rule created in step 2)
5. Tab **Codes:**
   * **Code type:** `Individual promotion codes` ← **required so the plugin can generate codes**
6. **Save**
7. Enter the promotion in the plugin under **Reward → Linked promotion**
8. Enter the product group in the plugin under **Reward → Product group**

***

## Promotion for free shipping

1. **Marketing → Promotions → Add promotion**
2. **Name:** e.g. "Bonus – Free shipping"
3. Tab **General:**
   * **Maximum redemptions per customer:** `1`
4. Tab **Discounts:**
   * **Type:** Shipping costs
   * **Value:** `100` (percent)
5. Tab **Codes:**
   * **Code type:** `Individual promotion codes` ← **required so the plugin can generate codes**
6. **Save**
7. Enter the promotion in the plugin under **Reward → Linked promotion**

***

## Common mistakes

| Problem                                  | Cause                                             | Solution                                                                 |
| ---------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------ |
| Code is generated but does not apply     | Promotion not active or expired                   | Check the active toggle and validity period                              |
| 100% discount applies to the entire cart | Price rule missing or misconfigured               | Create a rule with a product-group condition and set it in the promotion |
| Code can be redeemed multiple times      | "Max. redemptions per customer" not set           | Set to `1`                                                               |
| Plugin cannot generate a code            | Code type not set to "Individual promotion codes" | Codes tab → set code type to "Individual promotion codes"                |
