Product2
Represents a product that your company sells.
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.
As of API version 8.0, the Product object is no longer available. Requests that contain Product are refused, and responses don’t contain the Product object. Use the Products2 object instead.
Introduced in API version 3.0.
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()
- The ConfigureDuringSale and IsSoldOnlyWithOtherProds fields are available in version 58.0 and later when Industry Automotive or Subscription Management is enabled.
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 55.0
-
Description:
The ID of the related billing policy. This field is available when Subscription Management is enabled.
This field is a relationship field.
-
Relationship name: BillingPolicy
-
Relationship type: relationship
-
Refers to: BillingPolicy
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Description: Indicates whether the product can have a quantity schedule (
true) or not (false). Label is Quantity Scheduling Enabled. - Default value: false
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Description: Indicates whether the product can have a revenue schedule (
true) or not (false). Label is Revenue Scheduling Enabled. - Default value: false
-
Type: picklist
-
Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
-
Introduced: API version 57.0
-
Description:
Determines whether a user can edit a configuration when creating a bundle order or quote.
This field is available when Industries Automotive or Subscription Management is enabled.
-
Possible values:
- Allowed — Allowed — Changes are allowed while adding line items to a bundle; for example, when adding products or editing quantity.
- NotAllowed — NotAllowed — Changes aren’t allowed.
- Type: reference
- Properties: Filter, Group, Nillable, Sort
- Introduced: API version 14.0
- Description: ID of the PartnerNetworkConnection that shared this record with your org. This field is available when Salesforce to Salesforce is enabled.
- Relationship name: ConnectionReceived
- Relationship type: relationship
- Refers to: PartnerNetworkConnection
- Type: reference
- Properties: Filter, Group, Nillable, Sort
- Introduced: API version 14.0
- Description: ID of the PartnerNetworkConnection that this record is shared with. This field is available Salesforce to Salesforce is enabled. In API version 16.0 and later, this value is
null. Use PartnerNetworkRecordConnection object to forward records to connections. - Relationship name: ConnectionSent
- Relationship type: relationship
- Refers to: PartnerNetworkConnection
- Type: textarea
- Properties: Create, Filter, Nillable, Sort, Update
- Description: A text description of this record. Label is Product Description.
- Type: url
- Properties: Create, Filter, Nillable, Sort, Update
- Introduced: API version 39.0
- Description: URL leading to a specific version of a record in the linked external data source.
- Type: reference
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 39.0
- Description: ID of the related external data source.
- Relationship name: ExternalDataSource
- Relationship type: relationship
- Refers to: ExternalDataSource
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 39.0
- Description: The unique identifier of a record in the linked external data source. For example,
ID #123.
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call
describeSObjects()and process the result for the values associated with theFamilyfield. Label is Product Family.
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Description: Indicates whether this record is active (
true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change theIsActiveflag on a Product2 object as often as necessary. Label is Active. - Default value: false
- Type: boolean
- Properties: Defaulted on create, Filter, Group, Sort
- Introduced: API version 43.0
- Description: Describes whether the product is archived. The default value is
false. - Default value: false
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Introduced: API version 57.0
- Description: Indicates whether a product can be converted into an asset when a subscription order is placed. The default value is
true.
-
Type: boolean
-
Properties: Create, Defaulted on create, Filter, Group, Sort, Update
-
Introduced: API version 25.0
-
Default value: false
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Introduced: API version 50.0
- Description: Indicates if a product is a serialized product (
true) or not (false). Label is Serialized. - Default value: false
-
Type: boolean
-
Properties: Create, Defaulted on create, Filter, Group, Sort, Update
-
Introduced: API version 61.0
-
Default value: false
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Introduced: API version 57.0
- Description: Determines whether the product can be sold independently or only as part of a bundle. This field is available when Industries Automotive or Subscription Management is enabled. The default value is
false, which means that the product can be sold independently. - Default value: false
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
- Type: int
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
- Type: string
- Properties: Create, Filter, Group, idLookup, Sort, Update
- Description: Required. Default name of this record. Label is Product Name.
- Type: string
- Properties: Create, Filter, Group, idLookup, Nillable, Sort, Update
- Introduced: API version 68.0
- Type: int
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: If the product has a quantity schedule, the number of installments.
- Type: int
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: If the product has a revenue schedule, the number of installments.
-
Type: picklist
-
Properties: Defaulted on create, Filter, Group, Restricted picklist, Sort
-
Introduced: API version 50.0
-
Description:
This field is read-only. Its value is determined by the value of the
Typefield and whether the product is associated with a[ProductAttribute](./object-productattribute.md)record. It describes whether a product is a bundle, set, or simple product, a variation parent, or a product variation.When the value of
ProductClass=VariationParent, it never changes. The value ofProductClasschanges betweenSimpleandVariationwhen you attach or detach a[ProductAttribute](./object-productattribute.md)record to the product.If you attach a
[ProductAttribute](./object-productattribute.md)record to a product, then the product’sProductClassvalue changes toVariation. Conversely, when you detach allProductAttributerecords from a product, theProductClassvalue changes toSimple.The default value is
Simple. It was introduced to support of B2B and B2C Commerce implementations. -
Possible values:
- Bundle — Bundle — This product is a parent or component in a product bundle.
- Set — Set — This product is included in a product set.
- Simple — Simple (default) — This product has no variations
- VariationParent — VariationParent — This product is a variation parent. It’s the base product for one or more product variations and, though it has its own stock-keeping unit (SKU), isn’t a sellable entity. Instead, it’s the parent of sellable entities—its variations.
- Variation — Variation — This product is a variation of a parent product. Each variation has its own SKU.
-
Default value: Simple
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: Default product code for this record. Your org defines the product’s code-naming pattern.
- Type: picklist
- Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Introduced: API version 55.0
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Description: If the product has a quantity schedule, the amount of time covered by the schedule.
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Description: The type of the quantity schedule, if the product has one.
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 39.0
- Description: Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The
QuantityUnitOfMeasurefield on ProductItem inherits this field’s values.
- Type: boolean
- Properties: Create, Defaulted on create, Filter, Group, Sort, Update
- Introduced: API version 5.0
- Description: Changes behavior of OpportunityLineItem calculations when a line item has child schedule rows for the
Quantityvalue. When enabled, if the rollup quantity changes, then the quantity rollup value is multiplied against the sales price to change the total price. - Default value: false
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Description: If the product has a revenue schedule, the time period covered by the schedule.
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Description: The type of the revenue schedule, if the product has one.
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 57.0
-
Relationship name: Seller
-
Relationship type: relationship
-
Refers to: Seller
- Type: double
- Properties: Create, Filter, Nillable, Sort, Update
- Introduced: API version 61.0
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 61.0
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 57.0
-
Relationship name: SourceProduct
-
Relationship type: relationship
-
Refers to: Product2
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Introduced: API version 62.0
- Description: The method for how a product’s inventory is checked. Stock checks on parent products are common when bundles are prepackaged and individual child components can’t be sold separately. Stock checks on child products are common when bundles aren’t prepackaged and must be put together during fulfillment. If bundles aren’t prepackaged, child components can usually be sold separately.
- Possible values:
- Null — Null — Check stock on the product SKU.
- DoNotCheck — DoNotCheck — The stock shouldn’t be check.
- ParentProduct — ParentProduct — If the product is a parent of a bundle, check stock on the parent product.
- ChildProducts — ChildProducts — If the product is a parent of a bundle, check stock on the child components.
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 41.0
- Description: The SKU for the product. Use in tandem with or instead of the
ProductCodefield. For example, you can track the manufacturer’s identifying code in the Product Code field and assign the product a SKU when you resell it.
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 55.0
-
Description:
The ID of the related tax policy.
This field is available when Subscription Management is enabled.
This field is a relationship field.
-
Relationship name: TaxPolicy
-
Relationship type: relationship
-
Refers to: TaxPolicy
-
Type: picklist
-
Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update
-
Introduced: API version 52.0
-
Description:
If serialized, indicates when the serial number is recorded. This field is visible based on field-level security.
The value affects the read-only value of the
Product2TransferModefield on theProductTransferobject. -
Possible values:
- SendAndReceive — SendAndReceive — The serial number is recorded when sending or receiving.
- ReceiveOnly — ReceiveOnly — The serial number is recorded when receiving only.
-
Type: picklist
-
Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
-
Introduced: API version 50.0
-
Description:
The type of product. This field’s value affects the read-only value of the
ProductClassfield on theProduct2object. The following mappings define how theTypeselection updates theProductClass.This field is available when Revenue Cloud, B2B Commerce, B2C Commerce, or other clouds with PCM add-on is enabled.
-
Possible values:
-
Base — Base — When
Type=Base, thenProductClass=VariationParent. -
Null — Null — When
Type=Null, thenProductClass=Simplefor standalone products.When
Type=Null, thenProductClass=Variationfor variation products. -
Bundle — Bundle — When
Type=Bundle, thenProductClass=Bundle. -
Set — Set — When
Type=Set, thenProductClass=Set.
- Revenue Cloud doesn’t support products with these specific combinations:
Type=BaseandProductClass=VariationParentorType=NullandProductClass=Variation.
-
-
Values
Null,Base,Bundle, andSetare available in environments where both Commerce and Revenue Cloud co-exist. -
The Type field can only be updated from Null to Bundle for products with a Simple ProductClass :::
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 55.0
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.
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.
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.
Note: You can’t create lookup fields to Product2 object, which have Required check box set to true or the Don’t Allow Deletion” radio button selected, as the platform would otherwise interpret this and throw an error that you cannot create a master-detail relationship to the object.
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
IsActivefield 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.
On opportunities and opportunity products, the workflow rules, validation rules, and Apex triggers fire when an update to a child opportunity product or schedule causes an update to the parent record. This means your custom application logic is enforced when there are updates to the parent record, ensuring higher data quality and compliance with your organization’s business policies.
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.
-
Product2ChangeEvent: Introduced in API version 44.0.
-
Product2Feed: Introduced in API version 18.0.
-
Product2OwnerSharingRule: Introduced in API version 50.0.