---
schema_version: "1"
id: a9b1eb99a5c8346a0ce8306817b2df4efdf1ad526481d588c17410698dd051a0
title: Contract
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_contract.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contract.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d0ed0cb7261e62b0a0bd2db05f5636a221f9e120f0f35a33cbb3f79ee2a732bd
description: Represents a contract (a business agreement) associated with an Account.
---
# Contract

Represents a contract (a business agreement) associated with an Account.

## Supported Calls

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

## Fields

| Field | Details |
| --- | --- |
| AccountId | 
Type

reference

Properties

Create, Filter, Group, Sort,Update

Description

Required. ID of the Account associated with this contract.

This field is a relationship field.

Relationship Name

Account

Relationship Type

Lookup

Refers To

Account



 |
| ActivatedById | 

Type

reference

Properties

Filter, Group, Nillable, Sort,Update

Description

ID of the User who activated this contract.

This field is a relationship field.

Relationship Name

ActivatedBy

Relationship Type

Lookup

Refers To

User



 |
| ActivatedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort, Update

Description

Date and time when this contract was activated.



 |
|  |  |
| ActivityMetricId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

When Einstein Activity Capture with Activity Metrics is enabled, the ID of the related activity metric.

This field is a relationship field.

Relationship Name

ActivityMetric

Refers To

ActivityMetric



 |
| ActivityMetricRollupId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

When Einstein Activity Capture with Activity Metrics is enabled, the ID of the related activity metric rollup.

This field is a relationship field.

Relationship Name

ActivityMetricRollup

Refers To

ActivityMetricRollup



 |
| AggregationStrategy | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The aggregation strategy when creating a pricing contract.

Valid value is Cumulative. This field is available with Revenue Cloud in API version 64.0 and later.



 |
| BillingAddress | 

Type

address

Properties

Filter, Nillable

Description

The compound form of the billing address. Read-only. See [Address Compound Fields](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/compound_fields_address.htm "Standard addresses—addresses built into standard objects in Salesforce—are accessible in the SOAP API and REST API as an Address, a structured compound data type, as well as individual address elements. If you enabled Custom Address Fields, you can also add custom fields that mimic the standard address field behavior.") for details on compound address fields.



 |
| BillingCity | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details for the billing address. The maximum size is 40 characters.



 |
| BillingCountry | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details for the billing address of this account. The maximum size is 80 characters.



 |
| BillingCountryCode | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ISO country code for the contract's billing address.



 |
| BillingGeocodeAccuracy | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The accuracy of the geocode for the billing address.

Possible values are:

- Address
- Block
- City
- County
- ExtendedZip
- NearAddress
- Neighborhood
- State
- Street
- Unknown
- Zip





 |
| BillingLatitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

Used with BillingLongitude to specify the precise geolocation of a billing address. Acceptable values are numbers between –90 and 90 with up to 15 decimal places.



 |
| BillingLongitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

Used with BillingLatitude to specify the precise geolocation of a billing address. Acceptable values are numbers between –180 and 180 with up to 15 decimal places.



 |
| BillingPostalCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details for the billing address of this account. The maximum size is 20 characters.



 |
| BillingState | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details for the billing address. The maximum size is 80 characters.



 |
| BillingStateCode | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ISO state code for the contract's billing address.



 |
| BillingStreet | 

Type

textarea

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Street address for the billing address.



 |
| CompanySignedDate | 

Type

date

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The date your organization signed the contract.



 |
| CompanySignedId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the user who signed the contract.

This field is a relationship field.

Relationship Name

CompanySigned

Relationship Type

Lookup

Refers To

User



 |
| ContractNumber | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Sort

Description

Number of the contract.



 |
| ContractTerm | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Number of months that the contract is valid.



 |
| CustomerSignedDate | 

Type

date

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The date when the customer signed the contract.



 |
| CustomerSignedId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the Contact who signed this contract.

This field is a relationship field.

Relationship Name

CustomerSigned

Relationship Type

Lookup

Refers To

Contact



 |
| CustomerSignedTitle | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Title of the customer who signed the contract.



 |
| Description | 

Type

textarea

Properties

Create, Nillable, Update

Description

Description of the contract.



 |
| EndDate | 

Type

date

Properties

Filter, Group, Nillable, Sort,

Description

Read-only. Calculated end date of the contract. This value is calculated by adding the ContractTerm to the StartDate. If the **Auto-calculate Contract End Date** setting is disabled, the contract end date is editable.



 |
| HasContractCotermination | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Indicates whether the contract can be coterminated (true) or not (false).

The default value is false. This field is available with Revenue Cloud in API version 65.0 and later.



 |
| IsPricingContract | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort

Description

Indicates whether the contract has related contract item prices (true) or if there are no contract item prices for the contract (false). This field is available with Revenue Cloud in API version 63.0 and later.



 |
| IsDeleted | 

Type

boolean

Properties

Defaulted on create or filter

Description

Indicates whether the object has been moved to the Recycle Bin (true) or not (false). The label is **Deleted**.



 |
| LastActivityDate | 

Type

date

Properties

Filter, Group, Nillable, Sort

Description

Value is the most recent:

- The due date of the most recent event is logged against the record.
- The due date of the most recently closed task associated with the record.





 |
| LastApprovedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Last date the contract was approved.



 |
| LastReferencedDate | 

Type

datetime

Properties

Filter, Nillable, Sort

Description

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



 |
| LastViewedDate | 

Type

datetime

Properties

Filter, Nillable, Sort

Description

The timestamp when the current user last viewed this record or list view. If this value is null, it’s possible that the user only accessed this record or list view (LastReferencedDate) but didn’t view it.



 |
| OwnerExpirationNotice | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

Number of days ahead of the contract end date (15, 30, 45, 60, 90, and 120). Used to notify the owner in advance that the contract is ending.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

ID of the user who owns the contract.

This field is a relationship field.

Relationship Name

Owner

Relationship Type

Lookup

Refers To

User



 |
| Pricebook2Id | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

ID of the pricebook, if any, associated with this contract.



 |
| PricingSource | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

Source of the pricing for the contract.

Valid values are:

- LastTransaction
- PriceBookListPrice—Price Book or List Price

Available in API version 60.0 and later.



 |
| RecordTypeId | 

Type

reference

Properties

Create, Filter, Nillable, Update

Description

ID of the record type assigned to this object.



 |
| RenewalTerm2 | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

The default subscription term for renewals. For example, if the Renewal Term Unit is months and you want a 6-month term, set the Renewal Term to 6. Available in API version 60.0 and later.



 |
| RenewalTermUnit | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The unit of time for a subscription term.

Valid values are:

- Annual—UI label is **Years**
- Months
- Quarterly—Available in API version 61.0 and later.
- Semi-Annual—Available in API version 61.0 and later.

Available in API version 60.0 and later.



 |
| ShippingAddress | 

Type

address

Properties

Filter, Nillable

Description

The compound form of the shipping address. Read-only. See [Address Compound Fields](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/compound_fields_address.htm "Standard addresses—addresses built into standard objects in Salesforce—are accessible in the SOAP API and REST API as an Address, a structured compound data type, as well as individual address elements. If you enabled Custom Address Fields, you can also add custom fields that mimic the standard address field behavior.") for details on compound address fields.



 |
| ShippingCity | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details of the shipping address. City maximum size is 40 characters.



 |
| ShippingCountry | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details of the shipping address. Country maximum size is 80 characters.



 |
| ShippingCountryCode | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ISO country code for the contract's shipping address.



 |
| ShippingGeocodeAccuracy | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The accuracy of the geocode for the shipping address.

Valid values are:

- Address
- Block
- City
- County
- ExtendedZip
- NearAddress
- Neighborhood
- State
- Street
- Unknown
- Zip

Available in API version 60.0 and later.



 |
| ShippingLatitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

Used with ShippingLongitude to specify the precise geolocation of a shipping address. Acceptable values are numbers between –90 and 90 with up to 15 decimal places.



 |
| ShippingLongitude | 

Type

double

Properties

Create, Filter, Nillable, Sort, Update

Description

Used with ShippingLatitude to specify the precise geolocation of an address. Acceptable values are numbers between –180 and 180 with up to 15 decimal places.



 |
| ShippingPostalCode | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details of the shipping address. The postal code maximum size is 20 characters.



 |
| ShippingState | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Details of the shipping address. The maximum size for the state is 80 characters.



 |
| ShippingStateCode | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The ISO state code for the contract's shipping address.



 |
| ShippingStreet | 

Type

textarea

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The street address of the shipping address. The maximum size is 255 characters.



 |
| SourceQuoteId | 

Type

reference

Properties

Create, Filter, Group, Sort,Update

Description

ID of the source quote associated with this contract. This field is available with Revenue Cloud in API version 64.0 and later.

This field is a relationship field.

Relationship Name

Contract

Relationship Type

Lookup

Refers To

Quote



 |
| SpecialTerms | 

Type

textarea

Properties

Create, Filter, Nillable, Sort, Update

Description

Special terms that apply to the contract.



 |
| StartDate | 

Type

date

Properties

Create, Filter, Group, Nillable, Sort,Update

Description

Start date for this contract. The label is **Contract Start Date**.



 |
| Status | 

Type

picklist

Properties

Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update

Description

The picklist of values that indicate order status. Each value is within one of two status categories defined in StatusCode. For example, the status picklist may contain: Ready to Ship, Shipped, Received as values within the Activated StatusCode.

Valid values are:

- Activated
- Draft
- In Approval Process

Available in API version 60.0 and later.



 |
| StatusCode | 

Type

picklist

Properties

Filter, Group, Restricted picklist, Sort

Description

The status category for the contract. A contract can be Draft, InApproval, or Activated. Label is **Status Category**.

Valid values are:

- Activated
- Draft
- InApproval

Available in API version 60.0 and later.



 |
| UnitPriceUplift | 

Type

percent

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the percentage increase of a line item’s unit price. This field is available with Revenue Cloud in API version 64.0 and later.



 |

## Usage

The Contract object represents a business agreement.

The Status field specifies the current state of a contract. Status strings (defined in the ContractStatus object) represent its current state (Draft, InApproval, or Activated).

Client applications must initially create a Contract in a non-Activated state. Client applications can subsequently activate a Contract by updating it and setting the value in its Status field to Activated; however, the Status field is the only field you can update when activating the Contract.

After a Contract has been activated, your client application can't change its status; however, before activation, your client application can change the status value from Draft to InApproval via the API. Also, your client application can delete contracts whose status is Draft or InApproval but not when a contract status is Activated.

Client applications can use the API to create, update, delete, and query any Attachment associated with a contract.

## Associated Objects

This object has these 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.

[AccountChangeEvent](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 46.0)

Change events are available for the object.

[ContractFeed](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.") (API version 18.0)

Feed tracking is available for the object.

[ContractHistory](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.

#### See Also

- [ContractContactRole](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contractcontactrole.htm "Represents the role that a Contact plays on a Contract.")
- [ContractStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contractstatus.htm "Represents the status of a Contract, such as Draft, InApproval, Activated, Terminated, or Expired.")