How do organization-wide defaults and sharing rules protect sensitive customer case data in Service Cloud?
Answer
Basics: Cases can include sensitive customer information. OWD sets the baseline access for each object; everything else only grants additional access. The goal is least privilege for internal agents and strict isolation for customers and partners.
How it works:
- Set the Case OWD (Private, Public Read Only, Public Read/Write, or Public Read/Write/Transfer), and the separate External OWD for external users (Private is typical).
- Role hierarchy grants managers access to subordinates' cases (Grant Access Using Hierarchies).
- Owner-based and criteria-based sharing rules grant access to roles, groups or queues.
- Case Teams grant record-specific access to chosen users with Read or Read/Write roles (predefined teams automate assignment).
- For Experience Cloud, customer users see their own cases (contact-based), and sharing sets (Customer Community licenses) or share groups/sharing rules (Plus licenses) extend access to their account's cases.
- Field-level security and page layouts hide sensitive fields.
Advanced / deep dive: Account-based implicit sharing: access to an Account can give related Case access depending on role settings. Queue ownership: queue members get access as owners via the queue. Apex managed sharing on Case can insert CaseShare records (RowCause Manual only; standard objects cannot define custom sharing reasons). For regulated data, add Shield Platform Encryption, Event Monitoring and field audit. Large data volumes: avoid excessive sharing rules and complex role hierarchies, which slow recalculation. Make external user performance predictable by using sharing sets instead of heavy sharing rules where possible.
Code / config example:
public with sharing {
{
List<CaseShare> shares = <CaseShare>();
(Id caseId : caseToUser.keySet()) {
shares.add( (CaseId = caseId, UserOrGroupId = caseToUser.get(caseId),
CaseAccessLevel = , RowCause = ));
}
Database.insert(shares, );
}
}