Leads
Manages unqualified prospect records, allowing conversion into contacts, accounts, or deals after qualification.
Table-Specific Information
Select
This table supports COQL for filtering, meaning that most filters comparing columns to values are submitted server-side.
Note: When UseCOQL is set to true, a SELECT * query may fail due to the large number of columns in this table. To avoid this error:
- Specify fewer than 50 columns in the SELECT clause
- Or set the UseCOQL connection property to false to disable COQL and use the REST or BULK API
Insert
You must specify the LastName column when inserting a new lead. The following examples demonstrate valid insert operations:
-- Insert a lead with a first name, last name, and title
INSERT INTO Leads (FirstName, LastName, Title) VALUES ('Alert', 'Bat', 'Mr')
-- Insert a lead and trigger associated workflows, approvals, or blueprints
INSERT INTO Leads (FirstName, LastName, Email, Trigger) VALUES ('Enthusiastic', 'Panda', '[email protected]', 'workflow,approval,blueprint')
Required fields: LastName is required.
Any field which is not read-only (ReadOnly = false in the table schema) can be inserted.
Delete
You must specify the Id column in the WHERE clause to delete a record. The following example demonstrates a delete operation:
-- Delete a lead by its unique ID
DELETE FROM Leads WHERE Id = '3152079000000153079'
Update
You must specify the Id column in the WHERE clause to update a record. The following example demonstrates an update operation:
-- Update the description field for a specific lead
UPDATE Leads SET Description = 'Changed from the API.' WHERE Id = '3152079000000488014'
Required fields: Id is required. The update must target a specific record.
Any field which is not read-only (ReadOnly = false in the table schema) can be updated.
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
Unique identifier for the lead record. |
| LeadOwner_Id | String | False |
Identifier of the user who owns the lead. |
| LeadOwner_FirstName | String | True |
First name of the lead owner. |
| LeadOwner_LastName | String | True |
Last name of the lead owner. |
| LeadOwner_Email | String | True |
Email address of the lead owner. |
| LeadOwner_Name | String | True |
Full name of the lead owner. |
| Company | String | False |
Name of the company the lead is associated with. |
| FirstName | String | False |
First name of the lead. |
| LastName | String | False |
Last name of the lead. |
| FullName | String | False |
Full name of the lead, combining first and last names. |
| Title | String | False |
Job title or designation of the lead. |
| String | False |
Primary email address of the lead. | |
| Phone | String | False |
Primary phone number of the lead. |
| Fax | String | False |
Fax number associated with the lead. |
| Mobile | String | False |
Mobile phone number of the lead. |
| Website | String | False |
Website URL of the lead's company. |
| LeadSource | String | False |
Source from which the lead originated, such as trade show or web form. |
| LeadStatus | String | False |
Current status of the lead, such as new or contacted. |
| Industry | String | False |
Industry to which the lead's company belongs. |
| No.ofEmployees | Int | False |
Number of employees in the lead's company. |
| AnnualRevenue | Decimal | False |
Annual revenue of the lead's company. |
| Rating | String | False |
Internal rating or classification assigned to the lead. |
| EmailOptOut | Bool | False |
Indicates whether the lead has opted out of email communication. |
| SkypeID | String | False |
Skype Id associated with the lead. |
| CreatedBy_Id | String | False |
Identifier of the user who created the lead record. |
| CreatedBy_FirstName | String | True |
First name of the user who created the lead. |
| CreatedBy_LastName | String | True |
Last name of the user who created the lead. |
| CreatedBy_Email | String | True |
Email address of the user who created the lead. |
| CreatedBy_Name | String | True |
Full name of the user who created the lead. |
| ModifiedBy_Id | String | False |
Identifier of the user who last modified the lead. |
| ModifiedBy_FirstName | String | True |
First name of the user who last modified the lead. |
| ModifiedBy_LastName | String | True |
Last name of the user who last modified the lead. |
| ModifiedBy_Email | String | True |
Email address of the user who last modified the lead. |
| ModifiedBy_Name | String | True |
Full name of the user who last modified the lead. |
| CreatedTime | Datetime | False |
Timestamp indicating when the lead was created. |
| ModifiedTime | Datetime | False |
Timestamp indicating when the lead was last modified. |
| Salutation | String | False |
Salutation or courtesy title, such as Mr., Ms., or Dr. |
| SecondaryEmail | String | False |
Secondary email address for the lead. |
| LastActivityTime | Datetime | True |
Timestamp of the most recent activity related to the lead. |
| String | False |
Twitter handle associated with the lead. | |
| Tag | String | False |
Comma-separated list of tags associated with the lead. |
| Street | String | False |
Street address of the lead. |
| City | String | False |
City in the lead's address. |
| State | String | False |
State or region in the lead's address. |
| ZipCode | String | False |
Postal or ZIP code in the lead's address. |
| Country | String | False |
Country in the lead's address. |
| Description | String | False |
Detailed notes or description related to the lead. |
| LeadImage | String | False |
Link or reference to the lead's profile image. |
| UnsubscribedMode | String | True |
Method by which the lead unsubscribed from communication, such as manual or link. |
| UnsubscribedTime | Datetime | True |
Timestamp indicating when the lead unsubscribed. |
| ChangeLogTime | Datetime | True |
Timestamp of the most recent logged change to the lead record. |
| Locked | Bool | True |
Indicates whether the lead record is locked from editing. |
| LastEnrichedTime | Datetime | True |
Timestamp of the most recent data enrichment for the lead. |
| EnrichStatus | String | True |
Current status of data enrichment, such as in progress or completed. |
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 |
| DuplicateCheckFields | String |
Field or fields used to identify duplicate records during an upsert. Multiple fields are supported in the REST API, but only one is allowed in the BULK API. |
| Trigger | String |
Specifies whether to trigger automation or workflow rules when inserting the record. |
| CustomViewId | Long |
Identifier of the custom view used to filter this record. Applies only when the useCOQL parameter is set to false. |