lead API
The lead API provides endpoints that enable you to create, update, and query/retrieve marketing leads and their associated lead line items from an instance.
Use this API to integrate your instance with external websites and systems such as automated lead capture systems, or to provide lead information to external reporting systems.
This API is provided within the sn_lead_mgmt_core namespace. To access the API, the Lead Management Data Model (sn_lead_mgmt_core) plugin must be activated on the instance, and the calling user must have the sn_lead_mgmt_core.lead_integrator role.
For additional information on Lead Management, see Using Lead Management.
Extending the Lead API
You can extend the lead API by overriding the methods in its associated script includes. The default API functionality is located in script includes ending in "OOB", such as LeadAPIProcessUtilOOB. To override this functionality, create methods with identical names and parameters in the script include that has the same file name, but doesn't end in "OOB", such as LeadAPIProcessUtil.
The following is a list of the script includes that you can override to change the behavior of the lead API:
- LeadAPIProcessUtilOOB: Contains methods that handle the retrieval and creation of lead and lead line item records.
- LeadApiValidationUtilOOB: Contains methods that validate the JSON request object for the POST and PATCH endpoints.
- LeadAPIHelperOOB: Contains API helper methods that:
- Return an array of leads and related lead line items.
- Return a JSON object from the associated GlideRecord.
- Remove all ignored fields from a JSON object and perform other transformations.
- LeadAPIConstantsOOB: Contains constants, status codes, and messages for all API operations. It also includes the list of fields that are ignored by the POST and PATCH endpoints.
Parent Topic:REST API reference
lead - GET /sn_lead_mgmt_core/lead
Retrieves all leads and associated lead line items based on the filter criteria passed in the query parameters.
This endpoint returns a paginated response as per the specified limit and offset. It retrieves information from the following tables:
- Lead [sn_lead_mgmt_core_lead]
- Lead Line Item [sn_lead_mgmt_core_lead_line_item]
URL format
Versioned URL: /api/sn_lead_mgmt_core/{api_version}/lead
Default URL: /api/sn_lead_mgmt_core/{api_version}/lead
Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.
Supported request parameters
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| Name | Description |
|---|---|
| sysparm\_fields | Comma-separated list of fields to return in the response. Invalid fields are ignored.Data type: String Default: Return all fields. |
| sysparm\_limit | Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval. This limit is applied before ACL evaluation. If no records return, including records you have access to, rearrange the record order so records you have access to return first. Note: Unusually large sysparm_limit values can impact system performance. Data type: Number Default: 10000 |
| sysparm\_offset | Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks. For example, the first time you call this endpoint, sysparm_offset is set to "0". To simply page through all available records, use Don't pass a negative number in the sysparm_offset parameter.Data type: Number Default: 0 |
| sysparm\_query | Encoded query used to filter the result set.For example:
The encoded query supports order by. To sort responses based on certain fields, use the ORDERBY and ORDERBYDESC clauses in sysparm_query. For example, If part of the query is invalid, such as by specifying an invalid field name, the instance ignores the invalid part. It then returns rows using only the valid portion of the query. You can control this behavior using the property glide.invalid_query.returns_no_rows. Set this property to true to return no rows on an invalid query. Note: The glide.invalid_query.returns_no_rows property controls the behavior of all queries across the instance, such as in lists, scripts (GlideRecord.query()), and web service APIs. Data type: String |
| Name | Description |
|---|---|
| None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
| Header | Description |
|---|---|
| Content-Type | Data format of the request body. Only supports application/json. |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Only supports application/json. |
| Content-Range | Range of content returned in a paginated call. For example, if offset=2 and limit=3, the value of the Content-Range header is items 3-5. |
| Links | Links through which to navigate the query results: - first - last - next - previous - self |
| Total-Count | Total number of filtered records. |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Request was successfully processed. All responses returned \(no pagination\). |
| 206 | Request successfully processed. Partial resource returned in response \(with pagination\). |
| 400 | Error. Possible reasons:- Invalid limit/limit greater than maximum allowed. - Invalid offset. |
| 403 | Record denied access. Insufficient permission to query the record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. |
Response body parameters
| Name | Description |
|---|---|
| account | Account linked to the lead.Data type: Object |
| account.name | Name of the account.Data type: String |
| account.sys\_id | Sys\_id of the associated account record. Data type: String Table: Account \[customer\_account\] |
| business\_phone | Lead's business phone number.Data type: String |
| city | City in which the lead resides.Data type: String |
| closed\_date | Date and time when the lead was closed.Data type: Object |
| closed\_date.display\_value | Date and time as displayed in the UI. Data type: String Format: User's format and time zone. |
| closed\_date.value | Date and time that the lead closed as defined in the associated record.Data type: String Format: UTC |
| company | Lead's company name.Data type: String |
| consumer | Consumer associated with the lead.Data type: Object |
| consumer.name | Name of the associated consumer.Data type: String |
| consumer.sys\_id | Sys\_id of the associated consumer record. Data type: String Table: Consumer \[csm\_consumer\] |
| contact | Contact associated with the lead account.Data type: Object |
| contact.name | Contact's name.Data type: String |
| contact.sys\_id | Sys\_id of the associated contact record. Data type: String Table: Contact \[customer\_contact\] |
| country | Country in which the lead resides.Data type: String |
| do\_not\_call | Flag that indicates whether the mode of communication is by phone. Valid values: - true: Can call contact. - false: Don't call contact. Data type: Boolean |
| do\_not\_email | Flag that indicates whether the mode of communication is by email. Valid values: - true: Can email contact. - false: Don't email contact. Data type: Boolean |
| do\_not\_share | Flag that indicates whether the lead details can be shared. Valid values: - true: Lead details can be shared. - false: Lead details can't be shared. Data type: Boolean |
| Lead's email address.Data type: String | |
| external\_id | ID used by the system that generated the lead to identify the lead in the associated system.Data type: String |
| external\_system | Name of the external system associated with the lead, such as HubSpot or pipedrive.Data type: String |
| first\_name | First name of the contact associated with the lead.Data type: String |
| industry | Industry to which the lead belongs.Data type: String Table: Located in the industry field of the Account [customer_account] table. |
| last\_name | Last name of the contact associated with the lead. Data type: String |
| lead\_group | Group to which the lead belongs. Data type: Object ``` "lead_group": { "name: "String", "sys_id": "String" } |
| lead\_line\_items.unit\_of\_measurement.name | Name of the measuring unit such as, each or cubic foot.Data type: String |
| lead\_line\_items.unit\_of\_measurement.sys\_id | Sys\_id of the record that describes the measuring unit.Data type: String Table: Unit of Measure \[sn\_prd\_pm\_uom\] |
| lead\_line\_items.work\_notes | List that describes the work notes created for the lead line item. Data type: Array of Objects ``` "work_notes": [ { "author": "String", "date": "String", "text": "String" } ] |
| owner.name | Name of the person that owns the lead.Data type: String |
| owner.sys\_id | Sys\_id of the user record of the person that owns the lead.Data type: String Table: User \[sys\_user\] |
| reason | Reason for the lead disqualification such as, Disqualify.Data type: String Max length: 40 characters |
| short\_description | Short description of the lead.Data type: String Max length: 160 characters |
| similar\_lead | Details on any similar lead. Use this for possible lead disqualification. Data type: Object ``` "similar_lead": { "name": "String", "sys_id": "String" } |
| work\_notes.author | User name of the person that authored the associated work note.Data type: String |
| work\_notes.date | Date that the note was created.Data type: String |
| work\_notes.text | Text of the note made by the author.Data type: String |
| zip | Zip code of the associated lead.Data type: String |
cURL request
The following code example shows how to pass query parameters to specify the leads to return.
curl "https://instance.service-now.com/api/sn_lead_mgmt_core/lead?sysparm_query=stage%3D400_closed_won&sysparm_fields=sys_id%2Cfirst_name%2Clast_name%2Cshort_description%2Cstage%2Clead_line_items&sysparm_offset=2" \
--request GET \
--header "Accept:application/json" \
--user "username":"password"
Leads are return in an array of objects:
[
{
"short_description": "Looking for a quote on preventative maintenance plans for their corporate office building elevators.",
"reason": null,
"country": "USA",
"closed_date": null,
"city": "San Francisco",
"lead_source": "inbound_phone",
"external_id": null,
"industry": "manufacturing",
"sys_updated_on": {
"value": "2024-05-31 11:01:55",
"display_value": "2024-05-31 04:01:55"
},
"title": "Director of Building operations",
"sys_class_name": "Lead",
"number": "LEAD0000001",
"sys_id": "856b6a95ffde8210b85dffffffffffd7",
"business_phone": "+1 (555) 123-4567",
"similar_lead": null,
"sys_updated_by": "admin",
"mobile_phone": null,
"street": "789, Industrial drive",
"sys_created_on": {
"value": "2024-05-20 10:32:41",
"display_value": "2024-05-20 03:32:41"
},
"contact": null,
"company": "Lee Manufacturing Inc",
"state": "CA",
"first_name": "James",
"email": "james.wilson@email.com",
"consumer": null,
"sys_created_by": "admin",
"zip": "94016",
"owner": {
"sys_id": "60058fe943fe3110d6c6cd60afb8f203",
"name": "Max Blaze"
},
"website": null,
"lead_group": null,
"sys_mod_count": 1,
"last_name": "Wilson",
"other_reason": null,
"middle_name": null,
"sys_tags": null,
"do_not_share": false,
"lead_score": 92,
"stage": "300_nurturing",
"do_not_email": false,
"lead_type": null,
"work_notes": [
{
"author": "Abel Tuter",
"date": "2024-12-04 06:52:07",
"text": "Work notes for lead"
}
],
"do_not_call": false,
"lead_rating": "400_super_hot",
"account": null,
"external_system": null,
"lead_line_items": [
{
"quantity": 6,
"product_offering": {
"sys_id": "32619d9fd0a63110f8770dbf976be1f9",
"name": "Safety Test Coverage",
"code": "SAFETSTCVG1"
},
"sys_mod_count": 0,
"external_id": null,
"sys_updated_on": {
"value": "2024-05-20 10:38:41",
"display_value": "2024-05-20 03:38:41"
},
"sys_tags": null,
"lead": {
"sys_id": "856b6a95ffde8210b85dffffffffffd7",
"name": "LEAD0000001"
},
"number": "LEADL0000003",
"sys_id": "013daa19ffde8210b85dffffffffff82",
"unit_of_measurement": {
"sys_id": "cb2795d553020110286eddeeff7b12ff",
"name": "Each"
},
"sys_updated_by": "admin",
"sys_created_on": {
"value": "2024-05-20 10:38:41",
"display_value": "2024-05-20 03:38:41"
},
"work_notes": null,
"sys_created_by": "admin",
"external_system": null
}
]
},
{
"short_description": "Partner referral for a company interested in a reliable internet bundle with strong security features for their office.",
"reason": null,
"country": "USA",
"closed_date": null,
"city": "San Francisco",
"lead_source": "partner_referral",
"external_id": null,
"industry": "technology_services",
"sys_updated_on": {
"value": "2024-05-20 10:53:59",
"display_value": "2024-05-20 03:53:59"
},
"title": "IT Director",
"sys_class_name": "Lead",
"number": "LEAD0000002",
"sys_id": "e71fa6d9ffde8210b85dffffffffff51",
"business_phone": "(626) 722-6969",
"similar_lead": null,
"sys_updated_by": "admin",
"mobile_phone": null,
"street": "747 Howard St",
"sys_created_on": {
"value": "2024-05-20 10:49:12",
"display_value": "2024-05-20 03:49:12"
},
"contact": {
"sys_id": "4d147a386f0331003b3c498f5d3ee437",
"name": ""
},
"company": "Boxeo",
"state": "CA",
"first_name": "Julie",
"email": "julie.lewis@example.com",
"consumer": null,
"sys_created_by": "admin",
"zip": "94013",
"owner": {
"sys_id": "60058fe943fe3110d6c6cd60afb8f203",
"name": "Max Blaze"
},
"website": null,
"lead_group": null,
"sys_mod_count": 0,
"last_name": "Lewis",
"other_reason": null,
"middle_name": null,
"sys_tags": null,
"do_not_share": false,
"lead_score": 78,
"stage": "400_closed_won",
"do_not_email": false,
"lead_type": null,
"work_notes": [
{
"author": "Abel Tuter",
"date": "2024-12-03 03:52:51",
"text": "Work noted for LEAD0000002"
}
],
"do_not_call": false,
"lead_rating": "200_warm",
"account": {
"sys_id": "86837a386f0331003b3c498f5d3ee4ca",
"name": ""
},
"external_system": null,
"lead_line_items": [
{
"quantity": 50,
"product_offering": {
"sys_id": "0b61dd9fd0a63110f8770dbf976be171",
"name": "Solana Modem M Series",
"code": "SOLANAMODE2"
},
"sys_mod_count": 0,
"external_id": null,
"sys_updated_on": {
"value": "2024-05-20 10:51:57",
"display_value": "2024-05-20 03:51:57"
},
"sys_tags": null,
"lead": {
"sys_id": "e71fa6d9ffde8210b85dffffffffff51",
"name": "LEAD0000002"
},
"number": "LEADL0000009",
"sys_id": "2130fa1dffde8210b85dffffffffffff",
"unit_of_measurement": {
"sys_id": "cb2795d553020110286eddeeff7b12ff",
"name": "Each"
},
"sys_updated_by": "admin",
"sys_created_on": {
"value": "2024-05-20 10:51:25",
"display_value": "2024-05-20 03:51:25"
},
"work_notes": null,
"sys_created_by": "admin",
"external_system": null
}
]
}
]
lead - GET /sn_lead_mgmt_core/lead/{sys_id}
Returns the lead record and all associated lead line items for the specified sys_id.
This endpoint retrieves information from the following tables:
- Lead [sn_lead_mgmt_core_lead]
- Lead Line Item [sn_lead_mgmt_core_lead_line_item]
URL format
Versioned URL: /api/sn_lead_mgmt_core/{api_version}/lead/{sys_id}
Default URL: /api/sn_lead_mgmt_core/{api_version}/lead/{sys_id}
Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.
Supported request parameters
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| sys\_id | Sys\_id of the lead to retrieve.Data type: String Table: Lead \[sn\_lead\_mgmt\_core\_lead\] |
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
| Header | Description |
|---|---|
| Accept | Data format of the response body. Only supports application/json. |
| Header | Description |
|---|---|
| None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
| Name | Description |
|---|---|
| account | Account linked to the lead.Data type: Object |
| account.name | Name of the account.Data type: String |
| account.sys\_id | Sys\_id of the associated account record. Data type: String Table: Account \[customer\_account\] |
| business\_phone | Lead's business phone number.Data type: String |
| city | City in which the lead resides.Data type: String |
| closed\_date | Date and time when the lead was closed.Data type: Object |
| closed\_date.display\_value | Date and time as displayed in the UI. Data type: String Format: User's format and time zone. |
| closed\_date.value | Date and time that the lead closed as defined in the associated record.Data type: String Format: UTC |
| company | Lead's company name.Data type: String |
| consumer | Consumer associated with the lead.Data type: Object |
| consumer.name | Name of the associated consumer.Data type: String |
| consumer.sys\_id | Sys\_id of the associated consumer record. Data type: String Table: Consumer \[csm\_consumer\] |
| contact | Contact associated with the lead account.Data type: Object |
| contact.name | Contact's name.Data type: String |
| contact.sys\_id | Sys\_id of the associated contact record. Data type: String Table: Contact \[customer\_contact\] |
| country | Country in which the lead resides.Data type: String |
| do\_not\_call | Flag that indicates whether the mode of communication is by phone. Valid values: - true: Can call contact. - false: Don't call contact. Data type: Boolean |
| do\_not\_email | Flag that indicates whether the mode of communication is by email. Valid values: - true: Can email contact. - false: Don't email contact. Data type: Boolean |
| do\_not\_share | Flag that indicates whether the lead details can be shared. Valid values: - true: Lead details can be shared. - false: Lead details can't be shared. Data type: Boolean |
| Lead's email address.Data type: String | |
| external\_id | ID used by the system that generated the lead to identify the lead in the associated system.Data type: String |
| external\_system | Name of the external system associated with the lead, such as HubSpot or pipedrive.Data type: String |
| first\_name | First name of the contact associated with the lead.Data type: String |
| industry | Industry to which the lead belongs.Data type: String Table: Located in the industry field of the Account [customer_account] table. |
| last\_name | Last name of the contact associated with the lead. Data type: String |
| lead\_group | Group to which the lead belongs. Data type: Object ``` "lead_group": { "name: "String", "sys_id": "String" } |
| lead\_line\_items.unit\_of\_measurement.name | Name of the measuring unit such as, each or cubic foot.Data type: String |
| lead\_line\_items.unit\_of\_measurement.sys\_id | Sys\_id of the record that describes the measuring unit.Data type: String Table: Unit of Measure \[sn\_prd\_pm\_uom\] |
| lead\_line\_items.work\_notes | List that describes the work notes created for the lead line item. Data type: Array of Objects ``` "work_notes": [ { "author": "String", "date": "String", "text": "String" } ] |
| owner.name | Name of the person that owns the lead.Data type: String |
| owner.sys\_id | Sys\_id of the user record of the person that owns the lead.Data type: String Table: User \[sys\_user\] |
| reason | Reason for the lead disqualification such as, Disqualify.Data type: String Max length: 40 characters |
| short\_description | Short description of the lead.Data type: String Max length: 160 characters |
| similar\_lead | Details on any similar lead. Use this for possible lead disqualification. Data type: Object ``` "similar_lead": { "name": "String", "sys_id": "String" } |
| work\_notes.author | User name of the person that authored the associated work note.Data type: String |
| work\_notes.date | Date that the note was created.Data type: String |
| work\_notes.text | Text of the note made by the author.Data type: String |
| zip | Zip code of the associated lead.Data type: String |
cURL request
The following code example shows how to retrieve the lead record with the sys_id of 856b6a95ffde8210b85dffffffffffd7.
curl "https://instance.service-now.com /api/sn_lead_mgmt_core/lead/856b6a95ffde8210b85dffffffffffd7" \
--request GET \
--header "Accept:application/json" \
--user "username":"password"
The following are the return results:
{
"short_description": "Looking for a quote on preventative maintenance plans for their corporate office building elevators.",
"reason": null,
"country": "USA",
"closed_date": null,
"city": "San Francisco",
"lead_source": "inbound_phone",
"external_id": null,
"industry": "manufacturing",
"sys_updated_on": {
"value": "2024-05-31 11:01:55",
"display_value": "2024-05-31 04:01:55"
},
"title": "Director of Building operations",
"sys_class_name": "Lead",
"number": "LEAD0000001",
"sys_id": "856b6a95ffde8210b85dffffffffffd7",
"business_phone": "+1 (555) 123-4567",
"similar_lead": null,
"sys_updated_by": "abel.tuter",
"mobile_phone": null,
"street": "789, Industrial drive",
"sys_created_on": {
"value": "2024-05-20 10:32:41",
"display_value": "2024-05-20 03:32:41"
},
"contact": null,
"company": "Lee Manufacturing Inc",
"state": "CA",
"first_name": "James",
"email": "james.wilson@email.com",
"consumer": null,
"sys_created_by": "abel.tuter",
"zip": "94016",
"owner": {
"sys_id": "60058fe943fe3110d6c6cd60afb8f203",
"name": "Max Blaze"
},
"website": null,
"lead_group": null,
"sys_mod_count": 1,
"last_name": "Wilson",
"other_reason": null,
"middle_name": null,
"sys_tags": null,
"do_not_share": false,
"lead_score": 92,
"stage": "300_nurturing",
"do_not_email": false,
"lead_type": null,
"work_notes": [
{
"author": "Abel Tuter",
"date": "2024-12-04 06:52:07",
"text": "Work notes for lead"
}
],
"do_not_call": false,
"lead_rating": "400_super_hot",
"account": null,
"external_system": null,
"lead_line_items": [
{
"quantity": 6,
"product_offering": {
"sys_id": "32619d9fd0a63110f8770dbf976be1f9",
"name": "Safety Test Coverage",
"code": "SAFETSTCVG1"
},
"sys_mod_count": 0,
"external_id": null,
"sys_updated_on": {
"value": "2024-05-20 10:38:41",
"display_value": "2024-05-20 03:38:41"
},
"sys_tags": null,
"lead": {
"sys_id": "856b6a95ffde8210b85dffffffffffd7",
"name": "LEAD0000001"
},
"number": "LEADL0000003",
"sys_id": "013daa19ffde8210b85dffffffffff82",
"unit_of_measurement": {
"sys_id": "cb2795d553020110286eddeeff7b12ff",
"name": "Each"
},
"sys_updated_by": "abel.tuter",
"sys_created_on": {
"value": "2024-05-20 10:38:41",
"display_value": "2024-05-20 03:38:41"
},
"work_notes": null,
"sys_created_by": "abel.tuter",
"external_system": null
}
]
}
lead - PATCH /sn_lead_mgmt_core/lead/{sys_id}
Updates the specified lead record and its associated lead line items. You can also use this endpoint to associate new lead line items to the specified lead.
This endpoint updates information in the following tables:
- Lead [sn_lead_mgmt_core_lead]
- Lead Line Item [sn_lead_mgmt_core_lead_line_item]
Rules for passed-in parameters:
- Invalid parameter names are ignored.
- Invalid values for non-mandatory choice and reference fields are ignored.
- If field WRITE access is denied for one or more fields, the restricted fields are ignored.
- You can't insert system field values using this API. Any provided values are ignored. System fields are a part of the ignored fields list, which is configurable.
- The values of the parameters account, contact, and consumer are ignored if both the account and consumer parameters are non-empty.
- Unless otherwise specified, the default value for all non-passed parameters is 'null'.
Note: This endpoint only modifies the specified parameters. If a parameter that exists in the current lead or lead line item record is not specified in the call, its contents remain unchanged.
URL format
Versioned URL: /api/sn_lead_mgmt_core/{api_version}/lead/{sys_id}
Default URL: /api/sn_lead_mgmt_core/{api_version}/lead/{sys_id}
Note: Available versions are specified in the REST API Explorer. For scripted REST APIs there is additional version information on the Scripted REST Service form.
Supported request parameters
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| sys\_id | Sys\_id of the lead record to update.Data type: String Table: Lead \[sn\_lead\_mgmt\_core\_lead\] |
| Name | Description |
|---|---|
| None |
| Name | Description |
|---|---|
| account | Details of the account associated with the lead.Data type: Object |
| account.sys\_id | Sys\_id of the associated account record. Data type: String Table: Account \[customer\_account\] |
| business\_phone | Lead's business phone number.Data type: String |
| city | City in which the lead resides.Data type: String |
| company | Lead's company name.Data type: String |
| consumer | Consumer associated with the lead.Data type: Object |
| consumer.sys\_id | Sys\_id of the associated consumer record. Data type: String Table: Consumer \[csm\_consumer\] |
| contact | Contact associated with the lead account.Data type: Object |
| contact.sys\_id | Sys\_id of the associated contact record. Data type: String Table: Contact \[customer\_contact\] |
| country | Country in which the lead resides.Data type: String |
| do\_not\_call | Flag that indicates whether the mode of communication is by phone. Valid values: - true: Can call contact. - false: Don't call contact. Data type: Boolean |
| do\_not\_email | Flag that indicates whether the mode of communication is by email. Valid values: - true: Can email contact. - false: Don't email contact. Data type: Boolean |
| do\_not\_share | Flag that indicates whether the lead details can be shared. Valid values: - true: Lead details can be shared. - false: Lead details can't be shared. Data type: Boolean |
| Lead's email address.Data type: String | |
| external\_id | ID used by the system that generated the lead to identify the lead in the associated system.Data type: String |
| external\_system | Name of the external system associated with the lead, such as HubSpot or pipedrive.Data type: String |
| first\_name | First name of the contact associated with the lead.Data type: String |
| industry | Industry to which the lead belongs.Data type: String Table: Located in the industry field of the Account [customer_account] table. |
| last\_name | Required. Last name of the contact associated with the lead. Data type: String |
| lead\_group | Group to which the lead belongs. Data type: Object ``` "lead_group": { "sys_id": "String" } |
| lead\_line\_items.unit\_of\_measurement.sys\_id | Sys\_id of the record that describes the measuring unit.Data type: String Table: Unit of Measure \[sn\_prd\_pm\_uom\] |
| lead\_line\_items.work\_notes | List that describes the work notes created for the lead line item. Data type: Array of Objects ``` "work_notes": [ "text": "String" } ] |
| owner.sys\_id | Sys\_id of the user record of the person that owns the lead.Data type: String Table: User \[sys\_user\] |
| reason | Reason for the lead disqualification such as, Disqualify.Data type: String Max length: 40 characters |
| short\_description | Short description of the lead.Data type: String Max length: 160 characters |
| similar\_lead | Details on any similar lead. Use this for possible lead disqualification. Data type: Object ``` "similar_lead": { "sys_id": "String" } |
| lead\_group.name | Lead group's name.Data type: String |
| lead\_group.sys\_id | Sys\_id of the lead group record.Data type: String Table: Group \[sys\_user\_group\] |
| lead\_line\_items | Details of the lead line items associated with the lead.Data type: Array of Objects |
| lead\_line\_items.external\_id | ID used by the system that generated the lead line item to identify the line item in the associated system.Data type: String |
| lead\_line\_items.external\_system | Name of the external system associated with the lead line item, such as HubSpot or pipedrive.Data type: String |
| lead\_line\_items.lead | Details about the lead associated with the line item.Data type: Object |
| lead\_line\_items.lead.name | Associated lead's name.Data type: String |
| lead\_line\_items.lead.sys\_id | Sys\_id of the associated lead record.Data type: String |
| lead\_line\_items.number | Unique system-generated number of the lead line item record.Data type: String |
| lead\_line\_items.product\_offering | Information about the product offering associated with the lead line item.Data type: Object |
| lead\_line\_items.product\_offering.code | Code linked to the product offering. Note: This is a system-generated alphanumeric number based on the product name. Although system generated, you can edit the code to represent a SKU or any other industry specific product codes. Data type: String |
| lead\_line\_items.product\_offering.name | Product offering's name.Data type: String |
| lead\_line\_items.product\_offering.sys\_id | Sys\_id of the product offering record associated with the lead line item. Data type: String Table: Product Offering \[sn\_prd\_pm\_product\_offering\] |
| lead\_line\_items.quantity | Quantity of items the lead wants to purchase of the associated product offering. Data type: Number \(Integer\) |
| lead\_line\_items.sys\_created\_by | User name of the person that created the lead line item.Data type: String |
| lead\_line\_items.sys\_created\_on | System-generated date and time that the lead line item was created.Data type: Object |
| lead\_line\_items.sys\_created\_on.display\_value | Date and time that the lead line item was created.Data type: String Format: Default instance format and time zone |
| lead\_line\_items.sys\_created\_on.value | Date and time that the lead line item was created.Data type: String Format: UTC |
| lead\_line\_items.sys\_domain | Sys_id of the domain record to which the lead line item belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| lead\_line\_items.sys\_domain\_path | Path of the domain to which the lead line item belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| lead\_line\_items.sys\_id | Sys\_id of the lead line item record.Data type: String |
| lead\_line\_items.sys\_mod\_count | Number of times the associated lead line item record has been modified.Data type: Number \(Integer\) |
| lead\_line\_items.sys\_tags | List of system tags associated with the lead line item.Data type: Array |
| lead\_line\_items.sys\_updated\_by | User name of the person that last updated the associated lead line item.Data type: String |
| lead\_line\_items.sys\_updated\_on | System-generated date and time when the lead line item was last updated.Data type: Object |
| lead\_line\_items.sys\_updated\_on.display\_value | Date and time that the lead line item was last updated.Data type: String Format: Default instance format and time zone |
| lead\_line\_items.sys\_updated\_on.value | Date and time that the lead line item was last updated.Data type: String Format: UTC |
| lead\_line\_items.unit\_of\_measurement | Details of the measuring unit of lead line item. Data type: Object ``` "unit_of_measurement": { "name": "String", "sys_id": "String" } |
| lead\_line\_items.work\_notes.author | User name of the person that authored the associated work note.Data type: String |
| lead\_line\_items.work\_notes.date | Date that the note was created.Data type: String |
| lead\_line\_items.work\_notes.text | Text of the note made by the author.Data type: String |
| lead\_rating | Rating for the lead such as, 100_cold, 200_warm, 300_hot, or 400_super_hot.Note: This is a choice field. It must contain one of the choice items defined in the lead_rating field of the Leads table. Data type: String |
| lead\_score | Score for the lead.Data type: Decimal Range: 1 to 100 |
| lead\_source | Originator of the lead.Note: This is a choice field. It must contain one of the choice items defined in the lead_source field of the Leads table. Data type: String |
| lead\_type | Type of lead, such as New Business or Existing Business. Note: This is a choice field. It must contain one of the choice items defined in the lead_type field of the Leads table. Data type: String |
| middle\_name | Middle name of the contact for the lead.Data type: String |
| mobile\_phone | Phone number of the contact for the lead.Data type: String |
| number | Unique system-generated number of the lead record.Data type: String |
| other\_reason | Additional reason for the lead disqualification.Data type: String Max length: 160 characters |
| owner | Details of the person associated with the lead. Data type: Object ``` "owner": { "name": "String", "sys_id": "String" } |
| similar\_lead.name | Name of the duplicate lead.Data type: String |
| similar\_lead.sys\_id | Sys\_id of the lead record that is a possible duplicate lead.Data type: String Table: Lead \[sn\_lead\_mgmt\_core\_lead\] |
| stage | Stage of the lead such as, 100_new. Note: This is a choice field. It must contain one of the choice items defined in the stage field of the Leads table. Data type: String |
| state | State in which the lead resides.Data type: String |
| street | Street on which the lead resides.Data type: String |
| sys\_class\_name | System-generated class name of the Lead table.Data type: String |
| sys\_created\_by | User name of the person that created the lead.Data type: String |
| sys\_created\_on | System-generated date and time that the lead was created.Data type: Object |
| sys\_created\_on.display\_value | Date and time when the lead was created.Data type: String Format: Default instance format and time zone |
| sys\_created\_on.value | Date and time when the lead was created.Data type: String Format: UTC |
| sys\_domain | Sys_id of the domain record to which the lead belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| sys\_domain\_path | Path of the domain to which the lead belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| sys\_id | Sys\_id of the lead record.Data type: String Table: Lead \[sn\_lead\_mgmt\_core\_lead\] |
| sys\_mod\_count | Number of times the associated lead record has been modified.Data type: Number \(Integer\) |
| sys\_tags | List of system tags associated with the lead. You can use these tags to categorize leads.Data type: Array |
| sys\_updated\_by | User name of the person that last updated the lead record.Data type: String |
| sys\_updated\_on | System-generated date and time when the lead was last updated.Data type: Object |
| sys\_updated\_on.display\_value | Date and time that the lead was last updated.Data type: String Format: Instance's default format and time zone |
| sys\_updated\_on.value | Date and time that the lead was last updated.Data type: String Format: UTC |
| title | Lead's title.Data type: String |
| website | Lead's website URL.Data type: String |
| work\_notes | List of work notes created for the lead. Data type: Array of Objects ``` "work_notes": [ { "author": "String", "date": "String", "text": "String" } ] |
| lead\_group.sys\_id | Sys\_id of the lead group record.Data type: String Table: Group \[sys\_user\_group\] |
| lead\_line\_items | List of lead line items to associated with the lead.Group to which the lead belongs. Data type: Object |
| lead\_line\_items.external\_id | ID used by the system that generated the lead line item to identify the line item in the associated system.Data type: String |
| lead\_line\_items.external\_system | Name of the external system associated with the lead line item, such as HubSpot or pipedrive.Data type: String |
| lead\_line\_items.product\_offering | Required. Information about the product offering associated with the lead line item.Data type: Object |
| lead\_line\_items.product\_offering.sys\_id | Required. Sys\_id of the product offering record associated with the lead line item. Data type: String Table: Product Offering \[sn\_prd\_pm\_product\_offering\] |
| lead\_line\_items.quantity | Quantity of items the lead wants to purchase of the associated product offering. Data type: Number \(Integer\) Default: 1 |
| lead\_line\_items.unit\_of\_measurement | Details of the measuring unit of lead line item. Data type: Object ``` "unit_of_measurement": { "sys_id": "String" } |
| owner.sys\_id | Sys\_id of the user record of the person that owns the lead.Data type: String Table: User \[sys\_user\] |
| reason | Reason for the lead disqualification such as, Disqualify.Data type: String Max length: 40 characters |
| short\_description | Short description of the lead.Data type: String Max length: 160 characters |
| similar\_lead | Details on any similar lead. Use this for possible lead disqualification. Data type: Object ``` "similar_lead": { "sys_id": "String" } |
| lead\_group.name | Lead group's name.Data type: String |
| lead\_group.sys\_id | Sys\_id of the lead group record.Data type: String Table: Group \[sys\_user\_group\] |
| lead\_line\_items | Details of the lead line items associated with the lead.Data type: Array of Objects |
| lead\_line\_items.external\_id | ID used by the system that generated the lead line item to identify the line item in the associated system.Data type: String |
| lead\_line\_items.external\_system | Name of the external system associated with the lead line item, such as HubSpot or pipedrive.Data type: String |
| lead\_line\_items.lead | Details about the lead associated with the line item.Data type: Object |
| lead\_line\_items.lead.name | Associated lead's name.Data type: String |
| lead\_line\_items.lead.sys\_id | Sys\_id of the associated lead record.Data type: String |
| lead\_line\_items.number | Unique system-generated number of the lead line item record.Data type: String |
| lead\_line\_items.product\_offering | Information about the product offering associated with the lead line item.Data type: Object |
| lead\_line\_items.product\_offering.code | Code linked to the product offering. Note: This is a system-generated alphanumeric number based on the product name. Although system generated, you can edit the code to represent a SKU or any other industry specific product codes. Data type: String |
| lead\_line\_items.product\_offering.name | Product offering's name.Data type: String |
| lead\_line\_items.product\_offering.sys\_id | Sys\_id of the product offering record associated with the lead line item. Data type: String Table: Product Offering \[sn\_prd\_pm\_product\_offering\] |
| lead\_line\_items.quantity | Quantity of items the lead wants to purchase of the associated product offering. Data type: Number \(Integer\) |
| lead\_line\_items.sys\_created\_by | User name of the person that created the lead line item.Data type: String |
| lead\_line\_items.sys\_created\_on | System-generated date and time that the lead line item was created.Data type: Object |
| lead\_line\_items.sys\_created\_on.display\_value | Date and time that the lead line item was created.Data type: String Format: Default instance format and time zone |
| lead\_line\_items.sys\_created\_on.value | Date and time that the lead line item was created.Data type: String Format: UTC |
| lead\_line\_items.sys\_domain | Sys_id of the domain record to which the lead line item belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| lead\_line\_items.sys\_domain\_path | Path of the domain to which the lead line item belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| lead\_line\_items.sys\_id | Sys\_id of the lead line item record.Data type: String |
| lead\_line\_items.sys\_mod\_count | Number of times the associated lead line item record has been modified.Data type: Number \(Integer\) |
| lead\_line\_items.sys\_tags | List of system tags associated with the lead line item.Data type: Array |
| lead\_line\_items.sys\_updated\_by | User name of the person that last updated the associated lead line item.Data type: String |
| lead\_line\_items.sys\_updated\_on | System-generated date and time when the lead line item was last updated.Data type: Object |
| lead\_line\_items.sys\_updated\_on.display\_value | Date and time that the lead line item was last updated.Data type: String Format: Default instance format and time zone |
| lead\_line\_items.sys\_updated\_on.value | Date and time that the lead line item was last updated.Data type: String Format: UTC |
| lead\_line\_items.unit\_of\_measurement | Details of the measuring unit of lead line item. Data type: Object ``` "unit_of_measurement": { "name": "String", "sys_id": "String" } |
| lead\_line\_items.work\_notes.author | User name of the person that authored the associated work note.Data type: String |
| lead\_line\_items.work\_notes.date | Date that the note was created.Data type: String |
| lead\_line\_items.work\_notes.text | Text of the note made by the author.Data type: String |
| lead\_rating | Rating for the lead such as, 100_cold, 200_warm, 300_hot, or 400_super_hot.Note: This is a choice field. It must contain one of the choice items defined in the lead_rating field of the Leads table. Data type: String |
| lead\_score | Score for the lead.Data type: Decimal Range: 1 to 100 |
| lead\_source | Originator of the lead.Note: This is a choice field. It must contain one of the choice items defined in the lead_source field of the Leads table. Data type: String |
| lead\_type | Type of lead, such as New Business or Existing Business. Note: This is a choice field. It must contain one of the choice items defined in the lead_type field of the Leads table. Data type: String |
| middle\_name | Middle name of the contact for the lead.Data type: String |
| mobile\_phone | Phone number of the contact for the lead.Data type: String |
| number | Unique system-generated number of the lead record.Data type: String |
| other\_reason | Additional reason for the lead disqualification.Data type: String Max length: 160 characters |
| owner | Details of the person associated with the lead. Data type: Object ``` "owner": { "name": "String", "sys_id": "String" } |
| similar\_lead.name | Name of the duplicate lead.Data type: String |
| similar\_lead.sys\_id | Sys\_id of the lead record that is a possible duplicate lead.Data type: String Table: Lead \[sn\_lead\_mgmt\_core\_lead\] |
| stage | Stage of the lead such as, 100_new. Note: This is a choice field. It must contain one of the choice items defined in the stage field of the Leads table. Data type: String |
| state | State in which the lead resides.Data type: String |
| street | Street on which the lead resides.Data type: String |
| sys\_class\_name | System-generated class name of the Lead table.Data type: String |
| sys\_created\_by | User name of the person that created the lead.Data type: String |
| sys\_created\_on | System-generated date and time that the lead was created.Data type: Object |
| sys\_created\_on.display\_value | Date and time when the lead was created.Data type: String Format: Default instance format and time zone |
| sys\_created\_on.value | Date and time when the lead was created.Data type: String Format: UTC |
| sys\_domain | Sys_id of the domain record to which the lead belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| sys\_domain\_path | Path of the domain to which the lead belongs. Note: This parameter is only returned in the response if domain separation is enabled. Data type: String |
| sys\_id | Sys\_id of the lead record.Data type: String Table: Lead \[sn\_lead\_mgmt\_core\_lead\] |
| sys\_mod\_count | Number of times the associated lead record has been modified.Data type: Number \(Integer\) |
| sys\_tags | List of system tags associated with the lead. You can use these tags to categorize leads.Data type: Array |
| sys\_updated\_by | User name of the person that last updated the lead record.Data type: String |
| sys\_updated\_on | System-generated date and time when the lead was last updated.Data type: Object |
| sys\_updated\_on.display\_value | Date and time that the lead was last updated.Data type: String Format: Instance's default format and time zone |
| sys\_updated\_on.value | Date and time that the lead was last updated.Data type: String Format: UTC |
| title | Lead's title.Data type: String |
| website | Lead's website URL.Data type: String |
| work\_notes | List of work notes created for the lead. Data type: Array of Objects ``` "work_notes": [ { "author": "String", "date": "String", "text": "String" } ] |