Sub topic 3
What an Org Is
This chapter assumes you know what a CRM does, you understand the SaaS model, and you know what databases, tables, and records are. It covers the working model of a Salesforce org and the mistakes people commonly make with the term.
The working model
An org (short for organization) is one customer's isolated environment in Salesforce. It holds that customer's data, its configuration, and its users. Salesforce runs many orgs on shared infrastructure, and each org sees only its own contents.
Think of an org as a tenant in a large apartment building. The building (the shared platform) is common. Each apartment (an org) has its own lock, its own furniture, and its own residents.
Every org has:
- A set of users who log in to it.
- Data, such as account and contact records.
- Metadata, which is the configuration that defines how the org behaves. Examples are custom fields, page layouts, and code.
- Its own limits and features, set by its edition.
- A unique identity, which later chapters cover.
Why the boundary matters
The org is the main unit of separation in Salesforce. This has practical effects:
- A user belongs to one org. A username is tied to that org, so logging in to another org needs a separate login.
- A custom field you create in one org does not exist in another. You must move it deliberately.
- Limits, such as storage or API call allowances, apply per org.
- Data does not flow between orgs unless you build an integration.
Because of this, "which org am I in?" is a question you should ask before you change anything.
One company, several orgs
A company usually has more than one org. It has a production org, where real users and real business data live. It often also has other orgs for building and testing changes. A later chapter compares these types. For now, remember that each one is a full, separate org with its own data and metadata.
Common errors
- Treating an org as an app. An org is not an application. One org can host many apps, such as sales and service tools.
- Treating an org as a cloud. A cloud is a product grouping, such as Sales Cloud. An org is a specific environment. One org can use features from several clouds.
- Assuming changes appear everywhere. A change in one org stays in that org. Teams must deploy changes from one org to another.
- Confusing the org with the company. A single company can own many orgs.
- Assuming the org is a single database. The org is the whole environment: data, metadata, users, and limits together.
Checking which org you are in
You can see which org you are working in from the command line. The Salesforce CLI lists the orgs it knows about:
sf org login web --alias my-org
sf org list
sf org display --target-org my-orgThe first command authorizes an org. The second lists the orgs the CLI knows. The third shows details such as the username and instance URL for one org.
You can also query the Organization record from inside the org:
SELECT Id, Name, OrganizationType, IsSandbox, InstanceName FROM OrganizationEach org returns exactly one row, describing itself.
Exercise
A developer adds a custom field in a sandbox org and then asks why it is missing in production. What explains this, and what must the team do?
Show answer
Each org has its own metadata, and a change in one org does not appear in another. The team must deploy the change from the sandbox to production.
Exercise
Is an org the same thing as Sales Cloud? Explain briefly.
Show answer
No. Sales Cloud is a product grouping (a cloud). An org is one customer's isolated environment, and it can use features from several clouds.