You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Christian Geisert <ch...@isu-gmbh.de> on 2013/06/24 16:34:34 UTC

Assigning a sales representative to a customer (and then to an order)

Hi,

I recently had a closer look at the sales commissions implementation 
which looks quite good (our customers pays commissions for orders 
instead of invoices but that's another story..)

One thing that seems to be missing is that a sales representative gets 
automatically assigned to an order (OrderRole SALES_REP)

For doing this we need a way to assign a sales rep to a customer. I 
propose to use the following:

<PartyRelationship partyIdFrom="DemoCustCompany" partyIdTo="DemoRepAll" 
roleTypeIdFrom="CUSTOMER" roleTypeIdTo="SALES_REP" 
partyRelationshipTypeId="SALES_REP"

This would introduce a new partyRelationshipTypeId "SALES_REP".

When creating an order the sales rep would be added as additional party 
role to the shopping cart and then could be changed/removed on the 
"Additional Party Entry" screen while finalizing the order.

If there are no objections to this design I'll create a patch and put it 
on Jira for review.

Christian