LeadAssociations
Returns object IDs associated with specific leads, enabling management of lead associations.
Table-Specific Information
SELECT
The LeadAssociations table always includes the same set of columns, but some return NULL unless you filter by Id and Type, which allows the connector to retrieve full association details.
To return full details for Lead associations, filter by both the Lead Id and the association Type.
The Type identifies the associated object (such as a Deal, Company, Contact, or Ticket).
-- Retrieve all fields for associations between a specific Lead and its related Deals
SELECT *
FROM LeadAssociations
WHERE Id = '436648510605' -- Lead Id
AND Type = 'Deal'; -- Associated object type
Note: Fetching all fields can cause a reduction in performance, as it requires the connector to make requests for each Lead.
Filtering by multiple Lead Id values with IN, combined with the association Type, retrieves associations for up to 1,000 Leads in a single batched request instead of one request per Lead. The connector splits IN lists larger than 1,000 values into additional batched requests automatically.
-- Retrieve associations for multiple Leads in a single batched request
SELECT *
FROM LeadAssociations
WHERE Id IN ('436648510605', '436648510606', '436648510607')
AND Type = 'Deal';
DELETE
To remove a Lead association, include both the Lead Id and the association Type:
-- Delete a Lead-Deal association
DELETE FROM LeadAssociations
WHERE Id = '436648510605' -- Lead Id
AND Type = 'Deal'; -- Associated object type
Columns
| Name | Type | ReadOnly | References | Filterable | Description |
| Id [KEY] | Long | False |
Leads.Id | False |
Unique identifier for the lead engagement record. |
| AssociationId [KEY] | Long | False | False |
Identifier of the object associated with this lead, such as a contact, company, or deal. | |
| Type [KEY] | String | False | False |
The type of object associated with the lead, such as contact, deal, or ticket. | |
| TypeId [KEY] | String | False |
AssociationsLabels.TypeId | False |
The numeric identifier of the association type between the lead and the related object. This column is empty for general association queries. |
| Category [KEY] | String | False |
AssociationsLabels.Category | False |
The classification of the association type for this object pair. This column is empty for generic association queries. |
| TypeLabel | String | True |
AssociationsLabels.Label | False |
The descriptive label assigned to the type of association between the lead and the related object. |