Group defines a Salesforce public group: a reusable collection of users, roles, and other groups that sharing rules and other administrative configuration can use. The metadata describes the public group's definition, not its membership. Deploying it does not reproduce the source group's audience.
A public group is not the same as a queue. Although queues also appear as runtime Group records, Queue is a separate metadata type. "Public group" also does not mean anonymous access: access to this metadata type is limited to authenticated internal and external users.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The unique API identifier and deployment identity. Corresponds to Group Name in the user interface, not Label. It must begin with a letter and contain only alphanumeric characters and underscores, with no spaces, trailing underscore, or consecutive underscores. |
name |
Required display label. Corresponds to Label in the user interface. Matching labels alone do not establish that two definitions identify the same group. |
doesIncludeBosses |
Required boolean, true or false. Corresponds to Grant Access Using Hierarchies and controls upward sharing through the role hierarchy. |
description |
The text description of the group. It does not define the group's members or sharing audience. |
Behavior and Constraints
doesIncludeBosses changes record-sharing behavior, not membership:
-
true: records shared with users in the group are also shared with users higher in the role hierarchy. -
false: this setting does not provide that upward sharing.
Clearing Grant Access Using Hierarchies is not proof that a user higher in the hierarchy has no access through another mechanism. To determine the access associated with a group, you need its actual members, the role hierarchy, and the sharing configuration. The definition alone does not identify everyone who can access a record.
Membership can include other groups and roles. Because membership is outside this metadata definition, identical Group metadata can represent different audiences in different orgs. Incoming references from sharing rules, queues, or messaging configuration do not populate that missing membership.
Keep metadata elements separate from runtime sObject fields. An sObject is a Salesforce record accessed through data APIs or Apex. The runtime Group.Type field is not an element of Group metadata, and a runtime group record used as an owner is not evidence that a public group can own records.
Deployment and Retrieval
In Metadata API format, group components use the .group suffix and reside in the groups directory of the corresponding package directory. The Group type supports * in the package.xml manifest, which identifies components for deployment or retrieval.
Public-group members are not migrated when you deploy Group. Manage membership separately in the destination, including nested groups and role-based membership. A retrieved group definition is therefore not a membership export.
Use fullName, rather than the display name, to identify the component across orgs. The identifier must be unique and satisfy the naming rules in the table above. The required name and doesIncludeBosses elements describe the label and hierarchy-sharing behavior; neither supplies members.
Deploying a public group also does not deploy its consumers. For example, Queue.publicGroup belongs to a separate queue definition, and sharing-rule references belong to the sharing configuration.
Metadata API deployment support and package inclusion are separate capabilities. The packaging report below concerns managed and unmanaged packages in a specific scenario; it is not a restriction on deploying Group through Metadata API and does not establish support for every current packaging model.
Relationships
Groups can be consumed by sharing, visibility, approval, messaging, analytics, and administrative configuration. These are possible schema connections, not proof that a particular group is used. The listed elements belong to the consuming definitions, including nested rule and alert structures; they are not members of Group. Some sharing elements select broader group-oriented audiences rather than naming an individual public group.
A businessOwnerGroup association on an object or field identifies a business owner; that association alone is not evidence of record access.
Referenced By
-
ApprovalProcess:name,submitter. -
AutoResponseRules:assignedTo. -
AutoResponseRule:assignedTo. -
BatchProcessJobDefinition:processGroup. -
CallCenter:omniCallbackFallbackQueue,omniCallbackHandler,voiceMailFallbackQueue. -
Community:expertsGroup. -
CustomObject:businessOwnerGroup,group. -
CustomField:businessOwnerGroup. -
ListView:group. -
DelegateGroup:groups. -
OmniSupervisorConfig:group. -
Queue:publicGroup. -
SharingRules:allCustomerPortalUsers,allInternalUsers,allPartnerUsers,channelProgramGroup,channelProgramGroups,group. -
SharingCriteriaRule:allCustomerPortalUsers,allInternalUsers,allPartnerUsers,channelProgramGroup,channelProgramGroups,group. -
SharingGuestRule:allCustomerPortalUsers,allInternalUsers,allPartnerUsers,channelProgramGroup,channelProgramGroups,group. -
SharingOwnerRule:allCustomerPortalUsers,allInternalUsers,allPartnerUsers,channelProgramGroup,channelProgramGroups,group. -
SharingTerritoryRule:allCustomerPortalUsers,allInternalUsers,allPartnerUsers,channelProgramGroup,channelProgramGroups,group. -
WaveAnalyticAssetCollection:sharedTo. -
WaveApplication:sharedTo. -
Workflow:field,recipient. -
WorkflowAlert:field,recipient.
Documentation Inconsistencies
The record-access architecture description refers to a "user, group, or queue" owning a record. The word "group" is ambiguous in this context: runtime Group records also represent queues. Do not read that wording as ownership support for the public group defined by this metadata type.
Reported Issues
-
A runtime
Groupowner can be a queue, not a public group. A 2020 explanation distinguished public groups from queues represented by runtime records withType = 'Queue'. The answer reported that queues can own records on supported objects, which explains why an owner can point to a runtime group record. See the group ownership discussion. - Package inclusion can fail even though Metadata API deployment is supported. In a 2020 report involving a public group used for report-folder access, an answer stated that public groups could not be included in managed or unmanaged packages and suggested separate administrator configuration. This dated report does not establish support for every current packaging model. See the public-group packaging discussion.
-
An Apex test can encounter
DUPLICATE_DEVELOPER_NAMEwhen creating a runtime group. A 2013 question reported the error while inserting aGroupwith an existingDeveloperName, despite not enablingSeeAllData. A 2020 answer reported success with a unique name in a scratch org and noted that insertingGroupMemberrequired handling mixed DML, meaning operations on setup and non-setup records in the same transaction. This is a runtime test issue, not a documented Metadata API deployment error. See the group test-data discussion. -
A runtime membership query can return both public groups and queues. In a 2022 discussion, a query through
GroupMemberreturned both. The reported solution filtered runtimeGroup.Typeto'Regular'for public groups or'Queue'for queues. Those are runtime query filters, not metadata elements. See the group and queue query discussion.
Common Questions
Does deploying a public group deploy its members?
No. Deploying Group migrates the definition, not membership. Manage users, nested groups, and role-based membership separately in the destination.
What does Grant Access Using Hierarchies do on a public group?
It corresponds to doesIncludeBosses. When true, records shared with users in the group are also shared with users higher in the role hierarchy. It does not add those users to the group.
Is a public group's Label its deployment name?
No. name is the display Label. fullName is the unique API identifier and corresponds to Group Name in the user interface.
Can a public group own Salesforce records?
Do not confuse public groups with queues. The ownership discussion concerns queues represented by runtime Group records with Type = 'Queue', not public-group metadata.
Can I include a public group in a managed or unmanaged package?
A 2020 community answer reported that public groups could not be included in those packages. That packaging-specific report does not establish support for every current packaging model and does not prevent deploying Group through Metadata API.