# Sales agent/representative per order instead of per client

**URL:** <https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756>\
**Category:** CRM/SRM Modules\
**Created:** [March 19, 2020, 10:36am UTC](https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756 "2020-03-19T10:36:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antonio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/antonio/32/2920_2.png) [@Antonio](https://www.dolibarr.org/forum/u/Antonio)\
**Post date:** [March 19, 2020, 10:36am UTC](https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756/1 "2020-03-19T10:36:50Z")

</div>

Hi all,

Currently, Dolibarr allows for assigning one or more sales agents (commercial representatives) per client. But our sales agents work per order, not per client. Is there any way to assign sales agents at the creation of orders instead of assigning them to clients?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![altatof](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/altatof/32/2426_2.png) [@altatof](https://www.dolibarr.org/forum/u/altatof)\
**Post date:** [March 21, 2020, 8:15am UTC](https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756/2 "2020-03-21T08:15:50Z")

</div>

Hello Antonio, you can set your representative for the order on the order contact tab (internal contact).

---

<div class="post-metadata">

**Author:** ![Antonio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/antonio/32/2920_2.png) [@Antonio](https://www.dolibarr.org/forum/u/Antonio)\
**Post date:** [March 21, 2020, 10:36am UTC](https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756/3 "2020-03-21T10:36:45Z")

</div>

Dear Altatof, thanks a lot for your quick reply! 👍

We do set the internal contact like that already in the order contact tab, but still in the margins section (/dolibarr/margin/agentMargins.php), it does not take the sales representative into account. In this margins section, it still attributes the results of the order/invoice to the representative which is set in the client tab.

What we like to do is assign a representative per order, and that this representative is the one to whom the results of the order are attributed in /dolibarr/margin/agentMargins.php.

Is that possible?

Thanks again!

---

<div class="post-metadata">

**Author:** ![altatof](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/altatof/32/2426_2.png) [@altatof](https://www.dolibarr.org/forum/u/altatof)\
**Post date:** [March 25, 2020, 10:05am UTC](https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756/4 "2020-03-25T10:05:01Z")

</div>

hello, did you check the margin module setup ? (last parameter)

 ![Capture du 2020-03-25 11-03-52](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/4/4ee54cd1cccb946dbb64b9663d145c5134bbe73c.png)

---

<div class="post-metadata">

**Author:** ![Antonio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/antonio/32/2920_2.png) [@Antonio](https://www.dolibarr.org/forum/u/Antonio)\
**Post date:** [March 25, 2020, 12:04pm UTC](https://www.dolibarr.org/forum/t/sales-agent-representative-per-order-instead-of-per-client/18756/5 "2020-03-25T12:04:30Z")

</div>

Dear Altatof, thanks! You are officially my hero today. It works perfectly! 👏 👍
