There will be a Sales Rep (CSR) and sales manager assigned on customer level as described below-
There will be an option for Sales Rep (CSR) & sales manager to login to the portal & manage their customers & orders.
When Sales Rep (CSR) Module gets installed following Roles get created automatically and the respective rights get assigned from Configuration.
Customer Sales Rep (CSR)
Sales Manager
There will be a configuration to create role as Sales Rep (CSR) and as Sales Manager
CSRs will be able to access only the customers & orders in which they are assigned as reps & also the permissions defined for CSR roles will be applicable to those customers & orders only.
CSRs will not be allowed to create new customers.
Separate grid for Sales Rep (CSR) and that contains the dropdown from users list having Sales Rep (CSR) and Sales Manager Role
At Customer and Order Level, we must give the option to select Sales Rep (CSR) and a Sales Manager can be assigned as a Sales Rep (CSR) to any Customer.
When Order gets placed, Sales Rep (CSR) gets assigned on Order and it still can be editable from Order (and Sales Manager cannot be assigned from that dropdown)
Under the Sales Manager grid, we should also show the option to assign Sales Manager.
When a Sales Rep (CSR) logs into Backend:
Sales Rep should be able to see all the Customers where he is assigned as Sales Rep (CSR) not all the customers.
Sales Rep should be able to see all Orders where he is assigned as Sales Rep (CSR) not all the orders.
Sales Rep should be able to see his Commission.
When a Sales Manager Logs into Backend:
Sales manager should be able to see all Orders from all Sales Rep (CSR) under him.
Sales manager should be able to see all the Customers under Sales Rep (CSR) under him.
Sales manager should be able to see the Commission Report for himself and the commission for all Sales Rep (CSR) under him.
If any CSR/Sales Manager is assigned to a customer, deletion of respective CSR/Sales Manager won’t be allowed.
But if the CSR/Sales Manager is assigned in an Order but not assigned to any customer, it can be deleted.
When deleted On Delete Cascade will be done.
If the Sales Manager wants to on board a New Sales Rep (CSR), they will have to reach out to the admin.
Commission % will be stored at Order Level at the Time of Order Placement.
Commission will be calculated on Subtotal - Discount
The Sales Rep (CSR) and Sales Manager can be assigned as a Sales Rep (CSR) to any Customer.