Roles
Returns all roles defined in the account, including their hierarchy level, assignment counts, and parent-child relationships.
Table-Specific Information
SELECT
The provider uses the Pipedrive API to process WHERE clause conditions built with the following column and operator. The rest of the filter is executed client-side within the provider.
| Column | Supported Operators |
| Id | = |
For example, the following queries are processed server-side:
SELECT * FROM Roles
SELECT * FROM Roles WHERE Id = 2
INSERT
Execute INSERT by specifying the Name and ParentRoleId columns. You can also insert any columns that are not required.
For example:
INSERT INTO Roles (Name, ParentRoleId) VALUES ('BangaloreCdataIndia123', '2')
UPDATE
Execute UPDATE by specifying the Id in the WHERE clause. All columns that are not read-only can be updated.
For example:
UPDATE Roles SET Name = 'My name just started here' WHERE Id = 1
DELETE
Execute DELETE by specifying the Id in the WHERE clause.
For example:
DELETE FROM Roles WHERE Id = 1
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
ID of the role. | |
| ActiveFlag | Boolean | True |
Indicates whether the role is currently active. | |
| AssignmentCount | String | True |
Number of users currently assigned to this role. | |
| Level | Integer | True |
Hierarchical depth level of the role within the role tree, where lower numbers represent higher-level roles. | |
| Name | String | False |
The name of the Role. | |
| ParentRoleId | Integer | False |
The ID of the parent Role. | |
| SubRoleCount | String | True |
Number of child roles directly nested under this role. |