Manager View All Cases Using Extension Point Implementation


Description

As per this doc, a custom manager role should be able to view all cases:

https://docs.servicenow.com/csh?topicname=c_CustomerServiceCaseList.html&version=latest


If an extension point is incorrectly implemented, users with custom manager role may only be able to view a subset of cases.

Cause

If a manager is unable to view all cases, the Out Of the Box sn_customerservice_manager role and other roles may have been modified. It is not recommended to modify the OOB sn_customerservice_manager role and other roles since there are dependencies on these roles and modifying them will cause unexpected behavior.

Resolution

1. Revert back to the Out Of the Box roles for sn_customerservice_manager and any others which have been modified.
2. Create new roles like sn_customerservice.manager etc.
3. Create an extension point of CSQueryBRUtilOOBConstants as explained here https://docs.servicenow.com/csh?topicname=creating-custom-csm-user-roles.html&version=latest
We advise that you do not modify CSQueryBRUtilOOBConstants. Instead, please create a new file which is an extension.
4. In the extension point of CSQueryBRUtilOOBConstants, add sections for your new roles which look like the sections in CSQueryBRUtilOOBConstants. They should look something like:
'sn_customerservice.agent': {
'sn_customerservice_case' : {'condition': 'consumer_is_empty', 'access_context': ['all_accounts']},
'csm_order_case' : {'condition': 'consumer_is_empty', 'access_context': ['all_accounts']},
'csm_order' : {'access_context': ['all_accounts']},
'ast_contract' : {'condition': 'account_not_empty', 'access_context': ['all_accounts']}, // Just QBR, doesn't have ACL
'customer_contact' : {'access_context': ['all_accounts']},
'customer_account' : {'access_context': ['all_accounts']},
'service_entitlement' : {'condition': 'consumer_is_empty', 'access_context': ['all_accounts']}, // Just QBR, doesn't have ACL
'alm_asset' : {'condition': 'account_or_primarycontact_not_empty', 'access_context': ['all_accounts']}, // Just QBR, doesn't have ACL
'wm_order' : {'condition': 'consumer_is_empty', 'access_context': ['all_accounts']},
},
'sn_customerservice.manager': {
'sn_customerservice_case' : {'condition': 'all', 'access_context': ['all_accounts']},
'csm_order_case' : {'access_context': ['all_accounts']},
'csm_order' : {'access_context': ['all_accounts']},
'ast_contract' : {'condition': 'account_or_consumer_not_empty','access_context': ['all_accounts']}, // Just QBR, doesn't have ACL
'customer_contact' : {'access_context': ['all_accounts']},
'customer_account' : {'access_context': ['all_accounts']},
'service_entitlement' : {'condition': 'account_or_contact_or_consumer_not_empty','access_context': ['all_accounts']}, // Just QBR, doesn't have ACL
'alm_asset' : {'condition': 'account_or_primarycontact_or_consumer_not_empty','access_context': ['all_accounts']}, // Just QBR, doesn't have ACL
'wm_order' : {'condition': 'all', 'access_context': ['all_accounts']},
},
5. You need a section for agent because the manager role depends on the agent role.
6. After making this changes, please log out and re-login to see all the cases for the user with custom role.