Sharing rules enables horizontal access to the records for users. Even before we dig into sharing rules, we need to understand the public groups. A public group is a set of users, subgroups, roles, along with the subordinates of the roles. We can check the existing public groups, by going to Setup, and then from the quick find box, look for public groups. We can also create new public groups from this option.
When you create a new group, you can add the new members to the new group. We can add users, groups, or even roles to the new public group. Once the public group is created, we can implement the sharing rules. Public groups make the creation of sharing rules much easier. This is considered as the best practice by the organizations, where the data is preserved for a longer span.
By default, Salesforce includes all the users in one single public group. We can define the sharing rules in a few simple steps.
The sharing rule has been successfully created now and can be implemented on the records associated with the object.