> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getray.info/llms.txt
> Use this file to discover all available pages before exploring further.

# Groups

> The Groups screen lists the organization's user groups and lets an admin create, rename and delete groups, add and remove users, make users group managers, and nest groups as sub-groups. Groups are used to target content, features and spaces at a set of users. Found under Directory → Groups in the RAY admin portal.

## Summary

The **Groups** screen in the RAY admin portal manages groups of users. A group is a named set of
users, for example the residents of one tower, the employees of one company or the members of a
gym. Groups are chosen as the audience of features, spaces, events and other content, so that only
the group's users see them. A group can contain other groups (**Sub-Groups**): users of a sub-group
also belong to the parent group. Some users of a group can be marked as the group's **Managers**.

## Where to find the Groups screen

* Menu: **Directory → Groups** (Arabic: **الدليل ← المجموعات**)
* Clicking a group in the list opens the group's detail page, with the tabs **Users** and
  **Sub-Groups**.
* **Import** and **Export** are in the **⋮** (more) menu at the top of the Groups list.

## Who can access the Groups screen

The Groups menu entry is shown only to users with an **Admin** role that includes the user
management feature. The same feature also shows **Directory → Users**. See
[Roles and permissions](/getting-started/roles-and-permissions).

## Groups list columns

| Column         | Meaning                                                        |
| -------------- | -------------------------------------------------------------- |
| **Name**       | Name of the group.                                             |
| **Sub-Groups** | Number of groups directly inside this group.                   |
| **Users**      | Number of users in the group.                                  |
| **Managers**   | Number of group managers.                                      |
| Actions        | **Edit** (rename) and **Delete**, when allowed for that group. |

The list can be filtered by **Name**.

## Group fields

| Field    | Required | Meaning and rules                                                   |
| -------- | -------- | ------------------------------------------------------------------- |
| **Name** | Yes      | Name of the group, shown wherever groups are chosen as an audience. |

The group detail page also shows **Managers**, **Users** and **Sub-Groups** as read-only counts.

## How to create a group

1. Open **Directory → Groups**.
2. Click **Add**.
3. Enter the **Name**.
4. Click **Save**.

The portal opens the new group's detail page, where users and sub-groups are added.

## How to rename a group

1. Open **Directory → Groups**.
2. Click **Edit** in the group's row, or open the group and edit its title at the top of the group
   detail page.
3. Change the **Name** and click **Save**.

## How to delete a group

1. Open **Directory → Groups**.
2. Click **Delete** in the group's row.
3. Confirm the deletion.

## Groups created automatically by RAY

RAY creates some groups itself, for example the group linked to each location in **Administration →
Multi Location Setup**. These automatic groups:

* cannot be deleted (no **Delete** in their row);
* cannot be renamed on the group detail page;
* can have users and sub-groups added or removed, and can be renamed from the list, only while
  **Global** is selected in the location selector of the portal header.

## Group Users tab

The **Users** tab of a group lists its users with the columns **Name**, **Email**, **Phone Number**
and **Type** (**Member** or **Manager**). Two filters change the list:

* **Direct Users Only**: only users added to this group directly, not users who belong through a
  sub-group.
* **Managers**: only the group's managers.

### How to add users to a group

1. Open the group from **Directory → Groups**.
2. In the **Users** tab, click **Add**.
3. Select one or more users.
4. Click **Save**.

Users can also be added one group at a time from the user's own **Groups** tab. See
[User detail tabs](/directory/user-detail-tabs).

### How to make a user a group manager

1. Open the group and stay in the **Users** tab.
2. Apply the **Direct Users Only** or **Managers** filter.
3. Click the user's **Type** tag (**Member**) and choose **Manager**.

To turn a manager back into a member, choose **Member** the same way. The **Type** tag can be
changed only while one of the two filters is applied.

### How to remove a user from a group

1. Open the group and apply the **Direct Users Only** or **Managers** filter in the **Users** tab.
2. Click **Unassign** on the user's row.
3. Confirm with **Unassign**.

## Group Sub-Groups tab

The **Sub-Groups** tab lists the groups inside this group by **Name**. Clicking a name opens that
group.

### How to add a sub-group

1. Open the parent group from **Directory → Groups**.
2. Open the **Sub-Groups** tab and click **Add**.
3. In the **Add Sub-Group** dialog, choose one or more groups in **Sub-Groups**.
4. Click **Save**.

To take a sub-group out of the parent group, click **Unlink** on its row and confirm. The
sub-group itself is not deleted.

## How to import group members

**Import** (in the **⋮** menu) opens **Import Associations**, which adds many users to groups from a
spreadsheet.

1. Open **Directory → Groups**, open the **⋮** menu and choose **Import**.
2. Download the **Import Associations Template**, fill it in and upload it.

The portal notes: "The import might take some time. After it is completed all users will be added
in the corresponding groups."

## Common questions about Groups

### Why can't I see the Groups menu?

The Groups menu is hidden when none of your roles is an Admin role with the user management feature.
Ask an administrator with access to **Administration → Roles & Permissions** to add that feature to
your role.

### Why is there no Delete button for some groups?

Groups that RAY creates automatically, such as the groups linked to locations, cannot be deleted.

### Why can't I add users to a location's group?

Location groups are created by RAY. Their users and sub-groups can be changed only while **Global**
is selected in the location selector of the portal header.

### Why can't I change a user's type in a group?

The **Type** tag becomes clickable only after applying the **Direct Users Only** or **Managers**
filter in the group's **Users** tab.

### Does a user in a sub-group also belong to the parent group?

Yes. The parent group's **Users** tab shows them when **Direct Users Only** is not applied, and the
user's own **Groups** tab shows the parent group when **Direct Groups Only** is cleared.

## Related pages

* [Users](/directory/users): the people who can be added to groups.
* [User detail tabs](/directory/user-detail-tabs): adding a user to a group from the user's page.
* [Features & Audiences](/administration/features-and-audiences): giving a feature to specific groups.
* [Multi Location Setup](/administration/multi-location-setup): the group linked to each location.
