# Creating Commission Rule

Sales commissions refer to a set of guidelines and regulations that dictate how salespeople earn commissions or bonuses based on their performance and sales results. These rules outline specific criteria, percentages, and conditions under which sales representatives are compensated for their sales efforts.&#x20;

Sales commissions are typically calculated as a percentage of the revenue generated by the salesperson. Xoro commission rules can be configured to calculate these values based on various criteria, including item brand, discounts, sales representatives, and rep groups, among others.

## Creating Commission Rule

To manage sales commissions, you'll begin by creating a commission rule. Once the rule is established, you can generate a commission report to calculate the commissions that will be distributed to the sales representatives.

{% hint style="info" %}
To create a commission rule, go to **Menu > Sales > Commission Rule**
{% endhint %}

When creating the commission rule, begin by adding the header-level information, including the rule name, commission value, and the price on which to base the commission. After setting this basic information, proceed to select a parent rule (if any) and add conditions and offset criteria.

#### Commission Rule Header Fields

<table><thead><tr><th width="245">Field</th><th>Description</th></tr></thead><tbody><tr><td>Create A Commission Rule</td><td>Give a name to the commission rule.</td></tr><tr><td>For Revenue In</td><td>Select the currency your revenue is in.</td></tr><tr><td>With Commission Value Of</td><td>This field allows you to select an absolute or percentage commission to be given as per the rule. </td></tr><tr><td>Based On</td><td>Select the price based on which the commission will be calculated. Available options are: Selling Price and Gross Profit.</td></tr><tr><td>With Cap Value (Optional)</td><td>This field allows you to enter the maximum commission per item in a flat amount or percentage.</td></tr><tr><td>With Priority (Optional)</td><td>In case of clashing rule, you can set the priority for the rule from here.</td></tr><tr><td>Revenue Deduction</td><td>Enter the amount to be deducted from the total revenue. This will reduce the revenue per item by the amount/percentage added before calculating commissions<em>.</em></td></tr><tr><td>Pay Commission On</td><td>Select whether to pay commission while making a sales or payment. If "Sales" is selected, the commission will paid for invoices that have been generated. If "Payment" is selected, the commission will be generated only for paid invoices.</td></tr></tbody></table>

#### Adding Parent Rule

After establishing the basic information, you can add a parent rule for this commission rule from the dropdown menu displaying the rules created in the system. This will include/import the conditions and offset criteria from the parent rule when running commission reports.&#x20;

#### Adding Conditions

Once the basic information and parent rule are in place, click on "Add Conditions" to define the condition for the rule. These conditions are the guidelines that determine when and how commissions are earned.

**Add Commission Rule Items Fields**

<table><thead><tr><th width="117">Field</th><th>Description</th></tr></thead><tbody><tr><td>Type</td><td>This field specifies the category or attribute that you want to apply the condition to.</td></tr><tr><td>Operator</td><td>This field allows you to define the operation that will be performed on the chosen "Type".</td></tr><tr><td>Value</td><td>This field allows you to define the value you want to match to trigger the rule.</td></tr></tbody></table>

For example, to grant a commission on the sales of the item ZASD114, the condition will be as follows:

**Type:** Item

**Operator:** Equals

**Value:** ZASD114

#### Condition Fields

<table><thead><tr><th width="156">Field</th><th>Description</th></tr></thead><tbody><tr><td>Type</td><td>This field displays the attribute on which the condition will be applied.</td></tr><tr><td>Operator</td><td>This field displays the operator chosen for applying the condition.</td></tr><tr><td>Value</td><td>This field displays the value added to trigger the condition.</td></tr><tr><td>Discount Min</td><td>If the commission rule is applied on a discount, this field represents the minimum discount (flat or percentage) that needs to be applied to a sale in order for a commission to be granted.</td></tr><tr><td>Discount Max</td><td>If the commission rule is applied on a discount, this field represents the maximum discount (flat or percentage) that needs to be applied to a sale in order for a commission to be granted.</td></tr></tbody></table>

#### Adding Offset Criteria

You also have the option to add an offset criteria.  Offset criteria is a special condition to encourage (or discourage) particular sales. They allow you to adjust the commission based on additional conditions, enabling you to fine-tune how commissions are calculated for specific scenarios.&#x20;

To define offset criteria, click on "Add Offset Criteria".

<table><thead><tr><th width="154">Field </th><th>Description</th></tr></thead><tbody><tr><td>Criteria Field</td><td>This field displays the chosen field to apply the offset criteria.</td></tr><tr><td>Operator</td><td>This field displays the operator chosen for applying the criteria.</td></tr><tr><td>Criteria Value</td><td>This field displays the value added to trigger the criteria.</td></tr><tr><td>Action</td><td>This field displays the action to be taken if the criteria is met: Add commission or Reduce commission.</td></tr><tr><td>Value</td><td>This is the value by which the commission is to be added or reduced.</td></tr><tr><td>Value Type</td><td>This field displays whether the reduction or addition specified in the offset criteria is in terms of a fixed amount (flat) or a percentage of the commission.</td></tr></tbody></table>


---

# 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.xorosoft.com/xoroerp-1/sales/commissions/creating-commission-rule.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.
