Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
CommerceStorePricing Class
Namespace
CommerceStorePricing Methods
getProductPrice(webstoreId, productId, effectiveAccountId)
API Version
49.0
Available to Guest Users
51.0
Requires Chatter
No
Signature
public static ConnectApi.ProductPrice getProductPrice(String webstoreId, String productId, String effectiveAccountId)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- productId
- Type: String
- ID of the product.
- effectiveAccountId
- Type: String
- ID of the buyer account or guest buyer profile for which the request is made.
Return Value
Type: ConnectApi.ProductPrice
getProductPrice(webstoreId, productId, effectiveAccountId, productSellingModelIds)
API Version
56.0
Available to Guest Users
56.0
Requires Chatter
No
Signature
public static ConnectApi.ProductPrice getProductPrice(String webstoreId, String productId, String effectiveAccountId, List<String> productSellingModelIds)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- productId
- Type: String
- ID of the product.
- effectiveAccountId
- Type: String
- ID of the buyer account or guest buyer profile for which the request is made.
- productSellingModelIds
- Type: List<String>
- List of product selling model IDs for the product.
Return Value
Type: ConnectApi.ProductPrice
getProductPrices(webstoreId, effectiveAccountId, productIds)
API Version
54.0
Available to Guest Users
54.0
Requires Chatter
No
Signature
public static ConnectApi.PricingResult getProductPrices(String webstoreId, String effectiveAccountId, List<String> productIds)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the buyer account or guest buyer profile for which the request is made. If null, the default value is determined from context.
- productIds
- Type: List<String>
- List of product IDs for which you want to get prices.
Return Value
Type: ConnectApi.PricingResult
Usage
This method respects buyer entitlements and only users entitled to view product and price data can access it.
If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.
getProductPrices(webstoreId, effectiveAccountId, productIds, currencyIsoCode)
API Version
57.0
Available to Guest Users
57.0
Requires Chatter
No
Signature
public static ConnectApi.PricingResult getProductPrices(String webstoreId, String effectiveAccountId, List<String> productIds, String currencyIsoCode)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the buyer account or guest buyer profile for which the request is made. If null, the default value is determined from context.
- productIds
- Type: List<String>
- List of product IDs for which you want to get prices.
- currencyIsoCode
- Type: String
- The currency ISO code of the products.
Return Value
Type: ConnectApi.PricingResult
Usage
This method respects buyer entitlements and only users entitled to view product and price data can access it.
If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.
getProductPrices(webstoreId, effectiveAccountId, pricingInput)
API Version
49.0
Available to Guest Users
51.0
Requires Chatter
No
Signature
public static ConnectApi.PricingResult getProductPrices(String webstoreId, String effectiveAccountId, ConnectApi.PricingInput pricingInput)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the buyer account or guest buyer profile for which the request is made. If null, the default value is determined from context.
- pricingInput
- Type: ConnectApi.PricingInput
- A ConnectApi.PricingInput body with the list of line items to price.
Return Value
Type: ConnectApi.PricingResult
Usage
This method respects buyer entitlements and only users entitled to view product and price data can access it.
If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.
getProductPrices(webstoreId, effectiveAccountId, pricingInput, currencyIsoCode)
API Version
57.0
Available to Guest Users
57.0
Requires Chatter
No
Signature
public static ConnectApi.PricingResult getProductPrices(String webstoreId, String effectiveAccountId, ConnectApi.PricingInput pricingInput, String currencyIsoCode)
Parameters
- webstoreId
- Type: String
- ID of the webstore.
- effectiveAccountId
- Type: String
- ID of the buyer account or guest buyer profile for which the request is made. If null, the default value is determined from context.
- pricingInput
- Type: ConnectApi.PricingInput
- A ConnectApi.PricingInput body with the list of line items to price.
- currencyIsoCode
- Type: String
- The currency ISO code of the products.
Return Value
Type: ConnectApi.PricingResult
Usage
This method respects buyer entitlements and only users entitled to view product and price data can access it.
If a store is segmented into markets, this API looks at the language parameter appended to the URL to determine the shopper’s locale and returns the appropriate values.