> For the complete documentation index, see [llms.txt](https://docs.goaffpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goaffpro.com/program-settings/setup-referred-sales-settings/set-commission-calculation-settings/test-referred-sales-settings.md).

# Test Commission Calculation Settings

### To test the commission calculation settings, you can follow the steps provided below:

Go to the **General** section in the **Settings** tab of the GoAffPro admin panel.

![Settings > General](/files/-MNYT2AfrmwK-FFL4Yy_)

Here, go to the Sales section.

![Sales](/files/-MNYSZJ54gGCXgpMP-HH)

Here, the "**Include discounts**" option is enabled and is set to adjust the commission by **discount percentage**.

![Adjust by discount percentage ](/files/-MNYXNHhcT-HBrmBKKVn)

In the test order's summary, we can see that the discount adjustment is deducting $20 from the sales commission: **$200 (sales commission) - $20 (discount adjustment) = $180 (total commission)**.&#x20;

The discount adjustment is calculated by the percentage of the discount applied (10%) on the sales commission ($200) which will be: **$20.**

{% hint style="info" %}
The commission rate of the affiliate is set to 20%.
{% endhint %}

![Order Summary](/files/-MNYX1Dz2E83fQDMtkjK)

After this, go back to the Sales section (in Settings > General) and set the "**Include discounts**" option to adjust the commission by **discount amount**.

![Adjust by discount amount](/files/-MNYXiueQrVt0j3pYXLF)

After setting this up, the commission in the order will be adjusted by the discount amount.

![Sales settings](/files/-MNYYhKFqr-tRjFXGetQ)

Now, you will have to reprocess the order. To do that go to the Sales > All Sales table. There, click on **Reject** and **Delete** the sale. After this, re-assign the sale to the affiliate.

**You can follow the guide below to reprocess the sale:**

{% content-ref url="/pages/-MVJGJIpsiTkBSVDXJwS" %}
[Reprocessing Sales](/program-management/manage-sales/reprocessing-sale.md)
{% endcontent-ref %}

![Reprocess the sale](/files/-MNYZ4hph9MQF1JCuIve)

In the test order's summary, we can see that the discount adjustment is deducting $100 from the sales commission: **$200 (sales commission) - $100 (discount adjustment) = $100 (total commission)**.&#x20;

The discount adjustment is calculated by the amount of the discount applied in the order: **10% (discount applied) of $1000 (order subtotal) = $100.**

![Order Summary](/files/-MNYbALnqy5rDgmgZ2gl)

{% hint style="info" %}
Similarly, different sales settings can be tested by enabling them and reprocessing the order to see how the commission will be calculated.&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.goaffpro.com/program-settings/setup-referred-sales-settings/set-commission-calculation-settings/test-referred-sales-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
