User Groups
Create, manage and utlize custom user groups in Softr.
User groups are an essential part of delivering a personalized experience and showing the right information to your users. In addition to making blocks and pages accessible to logged-in or non-logged-in users, Softr allows you to create custom user groups.
Let's start with how user groups are created.
Create a user group
To create a user group head to users and hit add user group.
![Create a new user group](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F3c0a4cce-848b-4110-b543-350e6d1fc875%2FScreenshot_2023-10-26_at_2.35.15_pm.png?table=block&id=30a81efa-122b-4b78-8c16-823f5fbed6c5&cache=v2)
Name your user group, and voila! Your user group is created. But we're not finished yet. Next, you'll need to add users to your user group.
![Name your user group](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F97204400-2092-49ef-8f64-34385c91f4fd%2FModal_(1).png?table=block&id=298c4bdd-6a32-4a83-bd38-8b56e7276529&cache=v2)
Add users to your user group
Once you have a user group, you need to add users to it. You can do this manually or by adding users based on their attributes with conditions.
Add users manually
To add users manually, select one or more existing users from the dropdown list.
![Add users manually to your new user group](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F9550cc88-c50c-4a9f-8fc3-707bb78a5d88%2FModal.png?table=block&id=a894a9d6-554c-4011-99ac-09e73dca9aab&cache=v2)
You can also manually assign a user group to a user from the users table.
![Add users manually directly from the users table](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F2b5f7e00-7752-4060-95d9-2cf25e102b90%2FAssign_user_groups(s).png?table=block&id=3b6c66e2-89f7-4669-adea-5303fbe2def3&cache=v2)
Add users based on a condition
Select a logged-in user's attribute and specify a relevant condition and value.
You can also specify conditions based on payment-related attributes, such as one-time products and subscriptions. To use these attributes, you must connect Stripe to your application. Learn how to add users based on their Stripe attributes.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F98aa7261-64eb-448b-a4a6-a213a9aa92df%2FScreenshot_2024-08-06_at_4.44.32_PM.png?table=block&id=ab19dc9e-457f-4a9a-b945-ee3fadf21a52&cache=v2)
Manage user groups for each user from the users table
A user's user groups are visible in the users table. You can see which user groups they're in, and you can assign and remove any user group they were added to manually.
However, you cannot remove a user from a user group they were added to based on a condition. This is because of the rule yourself or a collaborator set up when creating the user group. To edit the conditions for a user group, go to the user groups tab and edit the condition(s) used to add users.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2Fc094a0e2-8ce0-46ca-9034-9eaa60874866%2FManage_user_groups(s).png?table=block&id=289fd3b2-daab-4303-824f-db9316367bb7&cache=v2)
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2Ff44bcbb8-9267-4b96-b48c-c51a84f89609%2FManage_user_groups.png?table=block&id=a2e0e7b4-1613-4456-9238-c3e5e2aa63db&cache=v2)
Set block and page visibility for your user group
Once you've created a user group, you can use it to control who can see a particular block or page.
To set block visibility, go to the block's visibility settings, select Logged-in users, and select the relevant user group from the dropdown list.
To set page visibility, go to the page's settings, select Logged-in users, and select the relevant user group from the dropdown list.
Now, only users in the selected user group will be able to see the block or page.
![Setting block visibility for a user group](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff392ef91-1e6f-4e5f-b628-be3a3070226a%2Fselecting-user-group-block-visibility.gif?table=block&id=4722c7ad-9ecf-4ac4-ac6e-6a0cff99061d&cache=v2)
Set advanced action permissions for your user group
You can also use user groups to control who can perform specific actions on a block.
To do this, go to the relevant block and open the Button visibility settings from the Actions tab. From there, you can define which user groups should be able to see and interact with the action.
![Open action button visibility settings](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F9785b344-3e82-4488-86ad-f5610925c750%2FFeatures_-_Collapsed_(Upgrade_for_Embed).png?table=block&id=88fb9ce6-5dd7-417d-a1ea-9ae25f286d17&cache=v2)
![Select the user groups that can see and interact with this button](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F41c228d3-ef22-48a9-a724-6b765529227a%2FSelect_user_groups.png?table=block&id=9fe2bdc1-eee7-4c84-95c1-047ff8f4bcca&cache=v2)
Edit, duplicate, remove user group
You can manage your user groups by navigating to Users > User Groups and hovering over relevant user group.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F484adde5-19ba-4c92-b797-4cbdd4ad462b%2F2b24d968-002d-4988-a1f9-8c39e763a92f%2FUntitled.png?table=block&id=528588b2-61aa-4769-8790-6688e2286b97&cache=v2)
Security
Last updated on March 27, 2024