List All Groups
This service task returns all user groups that are defined in the current tenant.
Benefit: Processes can dynamically react to the organizational structure — list available groups for routing, assignment, or notification decisions without hardcoding group names.
How it works
Pantarey supports user groups for organizing users into teams, departments, or roles. This service task queries all defined groups and returns their IDs and display names.
No input is required — the task always returns the full list of groups for the current tenant.
Input Parameters
No input parameters required. The task can be called with an empty object.
Example Input
{}
Output
| Field | Type | Description |
|---|---|---|
totalCount |
Number | Number of groups found. |
groups |
Array | List of group objects. |
Each group contains:
| Field | Type | Description |
|---|---|---|
groupId |
String | The unique group identifier. |
displayName |
String | The human-readable group name. |
Example Output
{
"totalCount": 3,
"groups": [
{ "groupId": "sales", "displayName": "Sales" },
{ "groupId": "support", "displayName": "Customer Support" },
{ "groupId": "management", "displayName": "Management" }
]
}
Use Cases
- Dynamic routing: Route a process to different handlers based on available groups.
- Notification targets: Build a recipient list by iterating over all groups.
- Validation: Check whether a specific group exists before assigning a user.
- Reporting: Count groups or list them in a process summary.
Notes
- The result only contains groups, not their members. Use Get Group Members to retrieve users for a specific group.
- Groups are tenant-scoped — only groups belonging to the current tenant are returned.