---
schema_version: "1"
id: c497c8c05b3cc250c7813b334d78d34da053ab9017ee16925dcd0d10a3643188
title: ContractLineItem
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_contractlineitem.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contractlineitem.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d86e73b83f5bdb17dc392b008f601ced009286ce608f3325d7244ec9ae7debfc
description: Represents a product covered by a service contract (customer support agreement). This object is available in API version 18.0 and later.
---
# ContractLineItem

Represents a product covered by a service contract (customer support agreement). This object is available in API version 18.0 and later.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()

## Fields

| Field | Details |
| --- | --- |
| AssetId | 
Type

reference

Properties

Create, Filter, Nillable, Update

Description

Required. ID of the Asset associated with the contract line item. Must be a valid asset ID.



 |
| Description | 

Type

textarea

Properties

Create, Nillable, Update

Description

Description of the contract line item.



 |
| Discount | 

Type

percent

Properties

Create, Filter, Nillable, Update

Description

The discount for the product as a percentage.

When updating, if you specify Discount without specifying TotalPrice, the TotalPrice will be adjusted to accommodate the new Discount value, and the UnitPrice will be held constant.

If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.



 |
| EndDate | 

Type

date

Properties

Create, Filter, Nillable, Update

Description

The last day the contract line item is in effect.



 |
| LastReferencedDate | 

Type

date

Properties

Filter, Nillable, Sort, Update

Description

The timestamp when the current user last accessed this record, a record related to this record, or a list view.



 |
| LastViewedDate | 

Type

date

Properties

Filter, Nillable, Sort, Update

Description

The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.



 |
| LineItemNumber | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Update

Description

Automatically-generated number that identifies the contract line item.



 |
| ListPrice | 

Type

currency

Properties

Filter, Nillable

Description

Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard pricebook or a custom pricebook. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the pricebook entry list price.



 |
| LocationId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The location associated with the contract line item.

If you have access to the location entity, it doesn’t necessarily mean you can access the location id field. To access the location, you must have userHasLocation user access.



 |
| ParentContractLineItemId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The line item’s parent line item, if it has one.



 |
| PricebookEntryId | 

Type

reference

Properties

Create, Filter, Update

Description

Required. ID of the associated PricebookEntry.

Only exists if Product2 is enabled.



 |
| Product2Id | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

The product related to the contract line item.



 |
| Quantity | 

Type

double

Properties

Create, Filter, Update

Description

Number of units of the contract line item (product) included in the associated service contract.



 |
| RootContractLineItemId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

(Read only) The top-level line item in a contract line item hierarchy. Depending on where a line item lies in the hierarchy, its root could be the same as its parent.



 |
| ServiceContractId | 

Type

reference

Properties

Create, Filter

Description

Required. ID of the ServiceContract associated with the contract line item. Must be a valid service contract ID.



 |
| StartDate | 

Type

date

Properties

Create, Filter, Nillable, Update

Description

The first day the contract line item is in effect.



 |
| Status | 

Type

picklist

Properties

Filter, Nillable

Description

Status of the contract line item.



 |
| Subtotal | 

Type

currency

Properties

Filter, Nillable

Description

Contract line item's sales price multiplied by the Quantity.



 |
| TotalPrice | 

Type

currency

Properties

Filter, Nillable

Description

This field is available only for backward compatibility. It represents the total price of the ContractLineItem

If you specify Discount and Quantity, this field or UnitPrice is required.

This field is nillable, but you can't set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice for a contract line item via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity.



 |
| UnitPrice | 

Type

currency

Properties

Create, Filter, Update

Description

The unit price for the contract line item. In the user interface, this field’s value is calculated by dividing the total price of the contract line item by the quantity listed for that line item. Label is **Sales Price**.

This field or TotalPrice is required. You can’t specify both.

If you specify Discount and Quantity, this field or TotalPrice is required.



 |

## Associated Objects

This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later.

[ContractLineItemChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 44.0)

Change events are available for the object.

[ContractLineItemFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm "StandardObjectNameFeed is the model for all feed objects associated with standard objects. These objects represent the posts and feed-tracked changes of a standard object.")

Feed tracking is available for the object.

[ContractLineItemHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.