Release Preview
Products
v67.0
To select your products, product selling model, and pricing information, use a SOQL query.
Example - Select Active Products, Pricing, and Product Selling Models
The following query selects all active products, their related product selling models, and pricing information.
Select Id, Name, ProductCode, CurrencyIsoCode, StockKeepingUnit, Family, (Select Id, Name,UnitPrice, Pricebook2Id, ProductSellingModelId, ProductSellingModel.Name, ProductSellingModel.PricingTerm, ProductSellingModel.PricingTermUnit, ProductSellingModel.SellingModelType From PricebookEntries Where IsActive=true) from Product2 Where IsActive = true order by Name ASC
The following is an example response for one product.
{
"attributes": {
"type": "Product2",
"url": "/services/data/v58.0/sobjects/Product2/01tRO000XXXXXXXXXX"
},
"Id": "01tRO000XXXXXXXXXX",
"Name": "File Storage Service",
"ProductCode": null,
"CurrencyIsoCode": "USD",
"StockKeepingUnit": null,
"Family": null,
"PricebookEntries": {
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "PricebookEntry",
"url": "/services/data/v58.0/sobjects/PricebookEntry/01uRO000XXXXXXXXXX"
},
"Id": "01uRO000000aQPqYAM",
"Name": "Product Demo - 1",
"UnitPrice": 100.0,
"Pricebook2Id": "01sRO000000MLEVYA4",
"ProductSellingModelId": "0jPRO000XXXXXXXXXX",
"ProductSellingModel": {
"attributes": {
"type": "ProductSellingModel",
"url": "/services/data/v58.0/sobjects/ProductSellingModel/0jPRO000XXXXXXXXXX"
},
"Name": "Monthly Termed PSM",
"PricingTerm": 1,
"PricingTermUnit": "Months",
"SellingModelType": "TermDefined"
}
}
]
}
}
HTTP
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!