
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2018 06:20 AM
HI all,
We have requirement where,
All cases created for same accounts are currently accessible by sn_customerservice.customer_admin (Customer Admin) role.
But customer want users with sn_customerservice.customer (Customer User) role also have access to all cases created for his account. (at least read level).
How can i achieve this...
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2018 12:04 PM
On Case table we have a before query business rule called "Case query for Customer" which will be governing the cases that have to be accessed and presented to the CSM users. If you want the users with role sn_customerservice_customer should also able to access the cases of their account, then update this BRule as below
(function executeRule(current, previous /*null when async*/) {
if(gs.hasRole('sn_customerservice.customer')&&!gs.hasRole('sn_customerservice.customer_admin')&&!gs.hasRole('sn_customerservice.partner')&&!gs.hasRole('sn_customerservice.partner_admin'))
current.addQuery("account",gs.getUser().getCompanyID());
else
new global.CSQueryBRUtil().addCaseQueryBR(current);
})(current, previous);
This will definitely work.
Please mark 'Correct' or 'Helpful' if it is so

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2021 11:35 PM
Hi
I have a similar issue.
On Portal, a contact can view only cases created by themselves but not created by others(agents/proxy contacts/customer admins) on behalf of contacts.
For ex: 'Test Contact' can able to see his cases which were created by him. where as 'Test Agent' has created couple of Cases on behalf of 'Test Contact', but 'Test Contact' unable to view these cases created by 'Test Agent' on behalf of him.
Could you please suggest me a solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2018 06:06 PM
function executeRule(current, previous /*null when async*/) {
if(gs.hasRole('sn_customerservice.customer')&&!gs.hasRole('sn_customerservice.customer_admin')&&!gs.hasRole('sn_customerservice.partner')&&!gs.hasRole('sn_customerservice.partner_admin'))
current.addQuery("account",gs.getUser().getCompanyID());
Subway Surfers Psiphon Hill Climb Racing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2021 08:35 AM
Hi,
Reviewing the comments, I saw that there is a business rule (Case query for Customer) as Chanakya mentioned. But it's a little weird that we have to modify the BR to allow show the cases to some users. Reading a little more into the documentation, the needed role is sn_customerservice.customer_admin
The documentation inside the BR says:
/**
Update below query for user with customer role
1) User with "sn_customerservice.customer" role :-
- All cases where contact is me
I.e (contact=<login user id>)
2) User with "sn_customerservice.partner" role :-
- All cases where contact is me
- All cases where partner_contact is me
I.e (contact=<login user id>) OR( partner_contact=<login user id>)
3) User with "sn_customerservice.partner_admin" role :-
- All cases where contact is me
- All cases where partner is my company
- All cases on from my company hierarchy
- All cases for accounts from contact relationship
I.e
(contact=<login user id>) OR (partner=<my account>) OR ( account.account_path=<my account path>) OR ( account IN <all account from my contact contact relationship>)
4) User with "sn_customerservice.customer_admin" role :-
- All cases where contact is me
- All cases on from my company hierarchy
- All cases for accounts from contact relationship
I.e
(contact=<login user id>) OR ( account.account_path=<my account path>) OR ( account IN <all account from my contact contact relationship>)
*/
So, we just had to add the role and create a "Contact relation" and that's it.
We were using some auxiliary usersto allow them to see all the cases of his account cases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2021 09:33 AM
Helpful Thread!