> 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-flows.md).

# Creating flows

With Shopware Flows, bonus points can be awarded automatically for any event or deducted on cancellation.

***

## Available plugin actions

| Action                              | Category in the Flow Builder | Description                                                           |
| ----------------------------------- | ---------------------------- | --------------------------------------------------------------------- |
| **Award bonus points**              | Customers                    | Credit a fixed number of points                                       |
| **Bonus points by factor**          | Order                        | Number of points × factor (for order-value-based awarding)            |
| **Award bonus points (newsletter)** | General                      | Points for newsletter subscribers (only if a customer account exists) |
| **Deduct bonus points (order)**     | Order                        | Credit back points for an order                                       |

***

## Creating a flow – step by step

1. **Marketing → Flows → Create flow**
2. Assign a name (e.g. "Newsletter bonus")
3. Choose a **trigger**
4. **Add action** → select category and action
5. Enter points and comment
6. **Activate** and **Save**

***

## Compatible triggers per action

### Award bonus points → category "Customers"

Appears with triggers that have a customer context:

| Trigger                        | Description                              |
| ------------------------------ | ---------------------------------------- |
| Checkout / Customer / Register | New customer completed their first order |
| Checkout / Order placed        | Order received                           |

### Bonus points by factor → category "Order"

| Trigger                           | Description         |
| --------------------------------- | ------------------- |
| State reached / Order / Completed | Order was completed |

### Award bonus points (newsletter) → category "General"

| Trigger               | Description                                    |
| --------------------- | ---------------------------------------------- |
| Newsletter / Register | Customer subscribed to the newsletter          |
| Newsletter / Confirm  | Customer confirmed the newsletter subscription |

> Points are only awarded if the subscriber has a **customer account**. Pure guest subscribers without an account are skipped.

### Deduct bonus points (order) → category "Order"

| Trigger                                      | Description          |
| -------------------------------------------- | -------------------- |
| State reached / Order / Cancelled            | Order was cancelled  |
| State reached / Order transaction / Refunded | Payment was refunded |

> The action automatically determines the points credited for this order and books them back. No manual input needed.

***

## Tips

* The **comment** appears in the customer's transaction list
* Multiple actions in one flow are possible: e.g. award points + send email
* Flows can be **deactivated** at any time without deleting them
