# How does Shield Platform Encryption secure sensitive customer data stored within Service Cloud records?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Platform Encryption, Data Privacy

Read it on the site: https://www.forcechallenges.com/interview-questions/how-does-shield-platform-encryption-secure-sensitive-customer-data-stored-within-service-cloud-records

## Answer

**Basics:** Standard Salesforce storage is already encrypted at the infrastructure level. Shield adds application-level encryption for specific fields (for example case comment text, custom fields holding PII), files, attachments and some search indexes, with customer-controlled key management for regulatory needs. Do not confuse it with Classic Encryption (the old Encrypted Text field type, masked, limited to 175 characters).

**How it works:**
1. Buy Shield and assign the Manage Encryption Keys permission.
2. Generate or upload a tenant secret (Bring Your Own Key option, or Cache-Only Key Service for externally held keys).
3. Setup > Encryption Policy: pick standard fields, custom fields, files and attachments; choose deterministic or probabilistic scheme.
4. Existing data is encrypted by running a background sync; new data encrypts on save.
5. Rotate keys periodically; old data re-encrypts on sync.

**Advanced / deep dive:** Salesforce combines a master secret and your tenant secret to derive a data encryption key. Probabilistic encryption (default) is stronger but limits filtering; deterministic allows exact-match filtering (case-sensitive or case-insensitive options) but reveals equality patterns. Encrypted fields have limitations: no use in ORDER BY or GROUP BY, restrictions in formulas, fewer SOQL operators, and some features such as certain external-ID or unique uses; verify field and feature support per release. Search still works through encrypted indexes. Encryption protects data at rest and from Salesforce staff, but not from users with legitimate access, so sharing and field-level security still matter. Key loss means unrecoverable data.

**Code / config example:**
Setup path: Setup > Platform Encryption > Key Management (generate tenant secret) > Encryption Policy > Encrypt Fields > choose Case Comment body and custom field > Save > Encryption Statistics > Sync.

**Hidden gotchas & must-remember points:**
- Already-stored data stays unencrypted until re-saved or synced.
- Destroying or losing an archived tenant secret makes data permanently unreadable.
- Deterministic encryption allows equality filters but not LIKE or sorting.
- Sandbox refresh copies encrypted data; keys must be handled for the sandbox.
- Not all fields or objects are supported; check the supported-field list.
- Integrations receive decrypted data via API for authorized users.

**Best practice:** Encrypt only fields that need it, test queries and reports in a sandbox, and maintain a documented key rotation process.

---
Source: ForceChallenges · last updated 2026-11-02
