# Affiliate link and voucher code

Your partners can generally recruit new customers in two different ways:

* This can be done via an affiliate link that your partners pass on to potential customers. As soon as a new customer registers via this link, they are assigned to the partner.
* Optionally, you can also provide your partner with a coupon code. This coupon code can be used by a partner to recruit new customers. A new customer then receives, for example, a 5% discount when using the coupon code.\
  By entering the coupon code during the ordering process, the new customer is automatically assigned to the partner.

### Set up affiliate link

In the [extension configuration](/en/plugins/affiliate-system/installation.md#partner-registration), you can specify whether a partner can choose their own affiliate code or whether their code is assigned automatically.

If the partner is allowed to choose their own code, they specify it when registering as a partner in the storefront. To register, the partner needs an existing customer account, must log in with this account, and register as a partner in the account area.

If necessary, you can change the affiliate code at any time. To do this, click on **...** for a partner in Shopware Administration **Marketing -> Affiliate System** and select **Edit**.

<figure><img src="/files/CHUIfaEuizC2K1fxnvdb" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
After changing the affiliate code, customers who are still using the old code can no longer be assigned to the partner.

This may be the case if new customers have been sent the old link by the partner and have not yet used it, or if a customer has already clicked on the old link but has not yet registered and does so at a later date.
{% endhint %}

### Affiliate link redirect target

By default, the affiliate link redirects to the home page.\
In the **Marketing -> Affiliate System -> Partner Group**, you can define where the affiliate link should redirect.

* Product
* Category

<figure><img src="/files/QncbClL2NbsXjbIZFQ7T" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/CKDnbcVROTOfv102N76o" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/thvhiBk4JuRGwxYZcBqg" alt=""><figcaption></figcaption></figure>

### Find affiliate link

In Shopware Administration, click **Marketing -> Affiliate System** for a partner, then click **...** and select **View** or **Edit**.

<figure><img src="/files/WmXMzslbLdQNd7bLwIlG" alt=""><figcaption></figcaption></figure>

The complete affiliate link is displayed to your partner in the storefront under **Account -> Partner program**.

<figure><img src="/files/KYEUkaN6hp4zqWJHkY8U" alt=""><figcaption></figcaption></figure>

### Set up voucher code

You can specify whether a partner is allowed to use voucher codes to attract new customers for each partner group.

To do this, open the Shopware administration under **Marketing -> Affiliate System -> Partner Group** by clicking on **...** and then click on **Edit** for the respective partner group.

In the **Partner voucher** section, activate the **Enable voucher** property.

<figure><img src="/files/zWw5HGeszU9irrs8ChtW" alt=""><figcaption></figcaption></figure>

All other settings are predefined and specify the properties that the voucher should have once it has been generated for the partner. This is a regular voucher that is created under **Marketing -> Promotions**. Further information on the setting options can also be found [here](/en/plugins/affiliate-system/admin-dashboard.md#partner-group).

{% hint style="info" %}
Use the **Max. uses per customer** option to ensure that a newly recruited customer cannot use the voucher code as often as they like.
{% endhint %}

Once you have activated the voucher option, you can generate a voucher or assign an existing voucher to all partners assigned to the respective partner group.

To do this, click on **...** in the Shopware Administration **Marketing -> Affiliate System** for a partner and select **Edit**.

<figure><img src="/files/rxVGtk2au2oMPiuI8nx1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you create the voucher yourself and do not use an automatically generated one, please ensure that you are working with a fixed voucher code. In addition, the voucher should not be restricted by rules.
{% endhint %}

### Find voucher code

There are two ways to display the voucher code. Your partners can do this in the storefront in the partner area, which is displayed after logging in.

<figure><img src="/files/Sx8wa7U5gxrRo1vgAXMh" alt=""><figcaption></figcaption></figure>

As an administrator, you can view the code in the Shopware administration area. To do this, open the relevant partner group in the Shopware administration area under **Marketing -> Affiliate System -> Partner Group** by clicking on **...** and then clicking on Edit. Then click on the link for the voucher.

<figure><img src="/files/ZpIWKWy4aiODdNs5UxnY" alt=""><figcaption></figcaption></figure>

The appropriate voucher from the **Marketing -> Promotions** section will open.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.premsoft.de/en/plugins/affiliate-system/affiliate-link-and-voucher-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
