Product2
This object has several fields that are used only for quantity and revenue schedules (for example, annuities). Schedules are available only for orgs that have enabled the products and schedules features. If these features aren’t enabled, the schedule fields don’t appear , and you can’t query, create, or update the fields.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()
Special Access Rules
The ConfigureDuringSale and IsSoldOnlyWithOtherProds fields are available in version 58.0 and later when Industry Automotive or Subscription Management is enabled.
Fields
Field | Details |
---|---|
BillingPolicyId |
|
CanUseQuantitySchedule |
|
CanUseRevenueSchedule |
|
ConnectionReceivedId |
|
ConnectionSentId |
|
ConfigureDuringSale |
|
CurrencyIsoCode | |
Description |
|
DisplayUrl |
|
ExternalDataSourceId |
|
ExternalId |
|
Family |
|
IsActive |
|
IsArchived |
|
IsDeleted |
|
IsSerialized |
|
IsSoldOnlyWithOtherProds |
|
LastReferencedDate |
|
LastViewedDate |
|
Name |
|
NumberOfQuantityInstallments |
|
NumberOfRevenueInstallments |
|
ProductClass |
|
ProductCode |
|
QuantityInstallmentPeriod |
|
QuantityScheduleType |
|
QuantityUnitOfMeasure |
|
RecalculateTotalPrice |
|
RevenueInstallmentPeriod |
|
RevenueScheduleType |
|
StockKeepingUnit |
|
TaxPolicyId |
|
TransferRecordMode |
|
Type |
|
Schedule Enabled Flags
When enabling the schedules feature, you can decide whether to enable quantity schedules, revenue schedules, or both. In addition, you can use the API to control quantity and revenue scheduling at the product level via the CanUseQuantitySchedule and CanUseRevenueSchedule flags. A value of true for either flag indicates that the product and any OpportunityLineItems can have a schedule of that type. These flags can be set when creating or updating Product2 records.
Default Schedule Fields
The remaining schedule fields for this object define default schedules. Default schedule values are used to create an OpportunityLineItemSchedule when an OpportunityLineItem is created for the Product.
The default schedule fields support the following valid values (all fields are also nillable).
Field | Valid Values |
---|---|
RevenueScheduleType | Divide, Repeat |
RevenueInstallmentPeriod | Daily, Weekly, Monthly, Quarterly, Yearly |
NumberOfRevenueInstallments | Integer from 1 to 150, inclusive. |
QuantityScheduleType | Divide, Repeat |
QuantityInstallmentPeriod | Daily, Weekly, Monthly, Quarterly, Yearly |
NumberOfQuantityInstallments | Integer from 1 to 150, inclusive |
When you attempt to set the schedule fields when creating or updating, the API applies cross-field integrity checks. The integrity requirements are:
- If the schedule type is nil, the installment period and number of installments must be nil.
- If the schedule type is set to any value, then the installment period and number of installments must be non-nil.
Any create or update that fails these integrity checks is rejected with an error.
These default schedule fields, CanUseQuantitySchedule, and CanUseRevenueSchedule, are restricted picklist fields and are available only if the org has the schedules feature enabled.
Usage
Use this object to define the default product information for your org. This object is associated by reference with Pricebook2 objects via PricebookEntry objects. The same product can be represented in different price books as price book entries. In fact, the same product can be represented multiple times (as separate PricebookEntry records) in the same price book with different prices or currencies. A product can only have one price for a given currency within the same price book. To be used in custom price books, all standard prices must be added as price book entries to the standard price book.
You can query the products that have been configured for your org. For example, you can allow your client application to obtain valid product IDs for use when configuring PricebookEntry records via the API. Your client application can perform the following tasks on PricebookEntry objects:
- Query
- Create for the standard price book or custom price books.
- Update
- Delete
- Change the IsActive field when creating or updating records
This object is defined only for those orgs that have products enabled as a feature. If the org doesn’t have the products feature, this object doesn’t appear in the describeGlobal call, and you can't describe or query this object.
If you try to delete a product via the API but there's an opportunity that uses that product, the delete fails. The workaround is to delete the product in the user interface, which gives you an option to archive the product.
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.
- Product2ChangeEvent (API version 44.0)
- Change events are available for the object.
- Product2Feed (API version 18.0)
- Feed tracking is available for the object.
- Product2History
- History is available for tracked fields of the object.
- Product2OwnerSharingRule (API version 50.0)
- Sharing rules are available for the object.