OrganizationRelationships
Returns relationship records between organizations.
Select
The server will use the Pipedrive API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the server.
- Id supports the '=' operator.
For example, the following query is processed server side:
SELECT * FROM OrganizationRelationships WHERE Id = 9
INSERT
Insert can be executed by specifying the Content and PersonId columns. The columns that are not required can be inserted optionally.
For example:
INSERT INTO OrganizationRelationships (type, RelOwnerOrgId, RelLinkedOrgId) VALUES ('parent', 2, 3)
UPDATE
Update can be executed by specifying the Id and Dealid in the WHERE Clause. The columns that are not read-only can be Updated.
For example:
UPDATE OrganizationRelationships SET type = 'parent' WHERE Id = 10
DELETE
Delete can be executed 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 identifier of the organization relationship. | |
| ActiveFlag | Boolean | True |
Indicates whether the relationship is active. | |
| AddTime | Datetime | True |
The time when the relationship was created. | |
| CalculatedRelatedOrgId | Integer | False |
The related organization's Id. | |
| CalculatedType | String | False |
The relationship type. | |
| RelLinkedOrgIdActiveFlag | Boolean | False |
Indicates whether the linked organization is active. | |
| RelLinkedOrgIdAddress | String | False |
The address of the linked organization. | |
| RelLinkedOrgIdCcEmail | String | False |
The CC email associated with the linked organization. | |
| RelLinkedOrgIdname | String | False |
The name of the linked organization. | |
| RelLinkedOrgIdownerId | Integer | False |
The owner Id of the linked organization. | |
| RelLinkedOrgIdPeopleCount | Integer | False |
The total number of people related to the linked organization.. | |
| RelLinkedOrgIdvalue | Integer | False |
The total deal value associated with the linked organization. | |
| RelOwnerOrgIdActiveFlag | Boolean | False |
Indicates whether the owner organization is active. | |
| RelOwnerOrgIdAddress | String | False |
The address of the owner organization. | |
| RelOwnerOrgIdCcEmail | String | False |
The CC email associated with the owner organization. | |
| RelOwnerOrgIdName | String | False |
The name of the owner organization. | |
| RelOwnerOrgIdOwnerId | Integer | False |
The owner Id of the owner organization. | |
| RelOwnerOrgIdPeopleCount | Integer | False |
The total number of people related to the owner organization. | |
| OrgId | Integer | False |
The total deal value associated with the owner organization. | |
| RelatedOrganizationName | String | False |
The name of the related organization. | |
| Type | String | False |
The type of organization relationship. The allowed values are parent, related. | |
| UpdateTime | Datetime | False |
The time when the relationship was last updated. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| RelOwnerOrgId | Integer |
The identifier of the owner organization. |
| RelLinkedOrgId | Integer |
The identifier of the linked organization. |