Product2

Represents a product that your organization sells.

Note
Products are represented by Product2 objects. The Product object is no longer available.

Supported Calls

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

Fields

Field Field Type Field Properties Description
CanUseQuantitySchedule boolean Defaulted on create

Filter

Indicates whether the product can have a quantity schedule (true) or not (false). Label is Quantity Scheduling Enabled.
CanUseRevenueSchedule boolean Defaulted on create

Filter

Indicates whether the product can have a revenue schedule (true) or not (false). Label is Revenue Scheduling Enabled.
ConnectionReceivedId reference Filter

Nillable

ID of the PartnerNetworkConnection that shared this record with your organization. This field is only available if you have enabled Salesforce to Salesforce.
ConnectionSentId reference Filter

Nillable

ID of the PartnerNetworkConnection that you shared this record with. This field is only available if you have enabled Salesforce to Salesforce. Beginning with API version 15.0, the ConnectionSentId field is no longer supported. The ConnectionSentId field is still visible, but the value is null. You can use the new PartnerNetworkRecordConnection object to forward records to connections.
CurrencyIsoCode picklist Filter

Restricted picklist

Available only for organizations with the multicurrency feature enabled. Contains the ISO code for any currency allowed by the organization.
DefaultPrice currency Create

Filter

Update

The default price for this record.
Description textarea Create

Filter

Nillable

Update

A text description of this record. Label is Product Description.
Family picklist Filter

Nillable

Name of the product family associated with this record. Product families are configured as picklists in the Salesforce.com user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.
IsActive boolean Create

Defaulted on create

Filter

Update

Indicates whether this record is active (true) or not (false). Inactive Product2s are hidden in many areas in the Salesforce.com user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.
IsDeleted boolean Defaulted on create

Filter

Indicates whether the record has been moved to the Recycle Bin (true) or not (false).

Label is Deleted.

Name string Create

Filter

idLookup

Update

Required. Default name of this record. Label is Product Name.
NumberOfQuantityInstallments int Filter

Nillable

If the product has a quantity schedule, the number of installments.
NumberofRevenueInstallments int Filter

Nillable

If the product has a revenue schedule, the number of installments.
ProductCode string Create

Filter

Nillable

Update

Default product code for this record. The product code naming pattern is defined by your organization.
QuantityInstallmentPeriod picklist Filter

Nillable

Restricted picklist

If the product has a quantity schedule, the amount of time covered by the schedule.
QuantityScheduleType picklist Filter

Nillable

Restricted picklist

The type of the quantity schedule, if the product has one.
RevenueInstallmentPeriod picklist Filter

Nillable

Restricted picklist

If the product has a revenue schedule, the period of time covered by the schedule.
RevenueScheduleType picklist Filter

Nillable

Restricted picklist

The type of the revenue schedule, if the product has one.
ConnectionReceivedId reference Filter

Nillable

ID of the PartnerNetworkConnection that shared this record with your organization. This field is only available if you have enabled Salesforce to Salesforce.
ConnectionSentId reference Filter

Nillable

ID of the PartnerNetworkConnection that you shared this record with. This field is only available if you have enabled Salesforce to Salesforce. Beginning with API version 15.0, the ConnectionSentId field is no longer supported. The ConnectionSentId field is still visible, but the value is null. You can use the new PartnerNetworkRecordConnection object to forward records to connections.

Schedule Fields

This object has several fields that are only used for schedules (for example, annuities). The API supports quantity and revenue schedules on this object. Schedules are available only for those organizations that have the products and schedules features enabled. If the organization does not have the schedules feature, the schedule fields do not appear in the DescribeSObjectResult, and you cannot query(), create(), or update() the fields.

Schedule Enabled Flags

When enabling the schedules feature, organizations 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 via a create() or update() call.

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 between 1 to 150, inclusive.
QuantityScheduleType Divide, Repeat
QuantityInstallmentPeriod Daily, Weekly, Monthly, Quarterly, Yearly
NumberOfQuantityInstallments Integer between 1 to 150, inclusive.

When you attempt to set the schedule fields via a create() or update() call, the API applies cross-field integrity checks. The integrity requirements are:

Any create() or update() calls that fail these integrity checks are rejected with an error.

These default schedule fields, as well as CanUseQuantitySchedule and CanUseRevenueSchedule, are restricted picklist fields and are available only if the organization has the schedules feature enabled.

Usage

Use this object to define the default product information for your organization. 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 and/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 organization. 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:

This object is defined only for those organizations that have products enabled as a feature. If the organization does not have the products feature, this object does not appear in the describeGlobal() call, and you cannot use describeSObjects() or query() with this object.

If you try to delete a product via the API but there is an opportunity that uses that product, the delete fails. The workaround is to delete the product in the Salesforce.com user interface, which gives you an option to archive the product.

For a visual diagram of the relationships between Product2 and other objects, see Product and Schedule Objects and PriceBook2, Product2, and PricebookEntry Relationships.

Note
With Spring ‘09, workflow rules, validation rules and Apex triggers on opportunities and opportunity products will fire when an update to a child opportunity product or schedule causes an update to the parent record. This means your custom application logic will be enforced when there are updates to the parent record, ensuring higher data quality and compliance with your organization’s business policies.
By default, all organizations signed up after the Spring ‘09 release will see this behavior. Starting in March 09, salesforce.com will begin rolling out the New Opportunity Save Behavior update in phases. Once available, you will see the update on the Critical Updates page. The update will be auto-enabled for organizations not currently using any of the customizations listed below. These customers will be required to review the update and take the necessary actions in order to enable the update prior to its auto-activation date.
  • Opportunity Amount
  • Opportunity Quantity
  • Opportunity product Total Price
  • Opportunity product Unit Price
  • Opportunity product Quantity
  • Any opportunity roll-up summary field
This change is effective in all versions of the API once the New Opportunity Save Behavior update is activated for an organization.

For more information, see What is the Spring '09 New Opportunity Save Behavior Update? in the Salesforce.com online help.

© Copyright 2000-2009 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.