Understanding Multitenancy in Salesforce

One of the key characteristics of Salesforce is it’s multitenant, metadata-driven architecture. The opposite of multitenancy is single tenancy, where each customer gets their own server, database, application layer and user interface to run their day-to-day activities smoothly. With a multitenant application architecture there is a single instance of the server, database, application layer and user interface that is shared by all users but partitioned for each client’s data programmatically.

In Salesforce, the platform ensures that every tenant’s metadata is private and easy to update without any locking or downtime required so that every tenant can build and customize apps in isolation.

Organization Id or OrgID – The Key to Multitenancy in Salesforce

Every tenant on the platform is known as an organization, or org for short. And every org-specific record in shared database tables has an OrgID. This OrgID is the unique identifier of the tenant across shared database tables in multitenancy architecture of Salesforce. When the multitenant Kernel ( Application Runtime) accesses tenant’s data, it uses unique identifier, OrgId to ensure that each tenant/org’s data is private.

Let’s take an example of two companies, Avengers and Stark Industries, are using Salesforce as their CRM tool and both of them are using Account to store their partner information. Although, both of these companies are having their own separate orgs, but, as per the multitenancy architecture, in backend, both these companies are sharing the same server, database, application layer and User Interface.

Steve Rogers, Tony Stark are the Salesforce users who’re responsible for maintaining Account information in their respective org. Please see the below diagram for understanding how multitenancy works in this case.

Although the data is created by two different user in their respective orgs, but in Salesforce, they are stored into the same object, Account with their respective OrgIds.

How to know your OrgId ???

Organization Id or OrgId can be found under Company Information. No two tenants can have same OrgId is Salesforce.

References

Leave a Comment

Your email address will not be published.