OrganizationRelationships
Returns relationship records between organizations, including parent-child and related-organization associations.
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 query is processed server-side:
SELECT * FROM OrganizationRelationships WHERE Id = 9
INSERT
Execute INSERT by specifying the Content and PersonId columns. You can also insert any columns that are not required.
For example:
INSERT INTO OrganizationRelationships (type, RelOwnerOrgId, RelLinkedOrgId) VALUES ('parent', 2, 3)
UPDATE
Execute UPDATE by specifying the Id and Dealid in the WHERE clause. All columns that are not read-only can be updated.
For example:
UPDATE OrganizationRelationships SET type = 'parent' WHERE Id = 10
DELETE
Execute DELETE by specifying the Id, DealId in the WHERE clause.
For example:
DELETE FROM OrganizationRelationships WHERE Id = 10
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The unique identifier of the organization relationship. | |
| ActiveFlag | Boolean | True |
Indicates whether the relationship is active. | |
| AddTime | Datetime | True |
The date and time when the relationship was created. | |
| CalculatedRelatedOrgId | Integer | True |
The identifier of the related organization as calculated by Pipedrive based on the relationship direction. | |
| CalculatedType | String | True |
The relationship type as calculated from the perspective of the requesting organization. | |
| RelLinkedOrgIdActiveFlag | Boolean | True |
Indicates whether the linked organization is active. | |
| RelLinkedOrgIdAddress | String | True |
The address of the linked organization. | |
| RelLinkedOrgIdCcEmail | String | True |
The BCC email address associated with the linked organization. | |
| RelLinkedOrgIdname | String | True |
The name of the linked organization. | |
| RelLinkedOrgIdownerId | Integer | True |
The identifier of the user who owns the linked organization. | |
| RelLinkedOrgIdPeopleCount | Integer | True |
The total number of people associated with the linked organization. | |
| RelLinkedOrgIdvalue | Integer | True |
The numeric identifier value of the linked organization. | |
| RelOwnerOrgIdActiveFlag | Boolean | True |
Indicates whether the owner organization is active. | |
| RelOwnerOrgIdAddress | String | True |
The address of the owner organization. | |
| RelOwnerOrgIdCcEmail | String | True |
The BCC email address associated with the owner organization. | |
| RelOwnerOrgIdName | String | True |
The name of the owner organization. | |
| RelOwnerOrgIdOwnerId | Integer | True |
The identifier of the user who owns the owner organization. | |
| RelOwnerOrgIdPeopleCount | Integer | True |
The total number of people associated with the owner organization. | |
| OrgId | Integer | True |
The numeric identifier value of the owner organization. | |
| RelatedOrganizationName | String | True |
The name of the related organization. | |
| Type | String | False |
The type of organization relationship. The allowed values are parent, related. | |
| UpdateTime | Datetime | True |
The date and time when the relationship was last updated. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| RelOwnerOrgId | Integer |
Real Organization Id. |
| RelLinkedOrgId | Integer |
Real Organization Id. |