Restrict Customer visibility based on Sales Person

Hello.

I need to get the Sales Team to the Apply Rule lists (screen shots attached below). What I am trying to achieve is, only the Sales Team assigned to the Customer should see that particular customer. And in some cases, one customer could be shared by multiple sales teams.

We have multiple sales teams at work. we do not want to share all the Customers list to the entire team. Only each sale team should see only the customer they are managing.

@Noushad_Moidunny

You can create a customer group and restrict your users(sales person) using user permission manager based on those groups.

@shachiTakalkar

May be I did not convey my question clearly!

Since we can clearly define the Sales Persons on each Customer master, can we not restrict the access based on Sales Persons. Is the sales person and user is not linked?

Below I have Customer named Akron linked to the sales person Kurian. Once Kurian logs in, he should see customers only he is linked to by Sales Person. If we add customer group to solve this issue, then we need to maintain that extra layer.

And if a customer is managed by multiple sales person, both of them should have access to it.

1 Like

Linking Sales Person to Customers is not available as of now. You must add User Restrictions using User Permissions Manager.

Hello,

Though Sales Persons are specified in the Customer, but it’s in the child table. As per the current permission system, you can apply permission on the fields in the main form, and not in the child table. Perhaps you can add a Custom Link field on Sales Person in the main Customer form. Then you will be able to apply restriction based on Sales Person. However, this means that you will be able to select only one Sales Person per Customer.

https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/articles/creating-custom-link-field

1 Like

@shachiTakalkar @umair

Thanks for clarifying this. I created a custom filed for sales person in customer master and got it working. That’s the best solution for us because we have only 5 customers shared by multiple sales person. So there would be duplications of the same customers twice. Not a clean solution… :frowning:

I created a custom field for the sales person in “Customer”. I think my rules are OK but still, each user can see every clients but when they click on the client to see the details they will get an error message if they are not the linked sales person. That’s a good start but ideally, I would prefer if the user could only see its own clients in the client list…

What have I done wrong?

Thanks!

G.

@Noushad_Moidunny

You can restrict customer to particular sales person.
Solution
Go to User Permissions - http://localhost:8000/desk#Form/User%20Permission/New%20User%20Permission%201
image

Go to Role Permissions Manager, in "select document types’ , select and set “if customer is permitted”
http://localhost:8000/desk#permission-manager


image

Once above two steps are done, correct permission can be check at
http://localhost:8000/desk#query-report/Permitted%20Documents%20For%20User
image

1 Like

How to restrict for sales manager and sales person, hierarchically?

1 Like

Permission settings are slightly different from version to version. Perhaps you can state your current version so that the community can help you out.

There’s a field named ‘Accounts Manager’ in the Customer doc. You can try by putting individual salesperson’s email address in ‘Accounts Manager’ field

We are trying to create restrictions between sales persons in our company. In line with this, mostly all companies have the following criteria to restrict documents/records/transactions and cannot be shared and viewed by any other sales person aside with their Immediate Head.

  1. Leads are assigned to each sales person
  2. Opportunities are assigned to each sales person
  3. Customers are assigned to each sales person
  4. Sales Order - Deliver Note - Sales Invoice can be assigned to multiple sales person (as structured on the ERPNext child table)

With this we did the user permission using the sales person since this is available to Customers, Sales Order - Deliver Note - Sales Invoice. However, the user permission does not work on these transactions but only to the sales person list view only.

Can someone help me with how does this works? Based on the user permission manual, you just need to encode the “type of document to allow” which I select was the Sales Person then on the “Apply to all document type”, the Customers, Sales Order - Deliver Note - Sales Invoice are all checked. But they can still see all the transactions encoded in the system.

They have roles of employee and sales user.

We cannot set a checkmark on the owner as restriction since sometimes encoding of transactions were done by a coordinator then just encode the document to the specific sales person.

Hello Sir,

I have create one user having role only
Sales master manager & sales user also add on extra created new role that is test coordinator so …and in allow module only selling and support module are access.
so when login with that user the user can see all the contact details of the supplier,employess,customer… so here i want to show only customer contact details to that user …for that in user permision based on territory i set the permision ,but now he can see all the details of supplier,employes, customer, instead of i want to show only the customer contact can u please help me for this…

Thanks

This is the problem I am having right now. Did you found a solution?