The Story of a Sales Deal
To understand how Salesforce handles security, let's look at a single Sales Deal and see how access opens up layer by layer.
1. The Private Locker (OWD)
In Salesforce, we start by keeping things private.
- The Rule: Organization-Wide Defaults (OWD) set the baseline.
- The Example: You create a new deal. Because the setting is Private, it's like putting that deal in your own locked locker. No other coworkers can see it.
2. The Manager's Key (Role Hierarchy)
Your manager needs to see your work to help you close the deal.
- The Rule: The Role Hierarchy works like an office chart.
- The Example: Because your manager is above you in the chart, Salesforce automatically gives them a key to your locker. They can see your deal without you doing anything.
3. The Automatic Invite (Sharing Rules)
What if the Legal Team needs to see every deal worth more than ₹1,000,000?
- The Rule: Sharing Rules grant access automatically based on specific "rules."
- The Example: As soon as you set your deal's value to ₹1,200,000, the system "invites" the Legal Team to view it so they can check the contract.
4. Asking a Friend (Manual Sharing)
Sometimes you just need a one-time favor from a colleague who isn't your boss or in the legal team.
- The Rule: Manual Sharing lets you pick a specific person to help.
- The Example: You click the "Share" button and choose a tech expert named Mark. Now Mark can see this specific deal to give you advice, but he can't see anything else in your locker.
5. The Intelligent Assistant (Apex Sharing)
Imagine a very specific rule: "If a deal is for a Hospital, share it with the Health Specialist currently on duty."
- The Rule: Apex Sharing uses code to handle complex "If/Then" situations.
- The Example: A small background script checks the deal type and the time of day, then automatically shares the record with the right specialist at the right moment.
Quick Summary
- OWD: Locks the door.
- Hierarchy: Lets the boss in.
- Sharing Rules: Lets a specific group in if the deal is "Big" or "Special."
- Manual Sharing: You hand someone a temporary key.
- Apex Sharing: A "smart" system handles the keys for you.