Loading
B2C Commerce Release Notes
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          New Product Attributes for Price Per Unit Feature

          New Product Attributes for Price Per Unit Feature

          You can now display two new product attributes for shoppers on the product display and product list pages: unit quantity and unit of measurement. These attributes let shoppers compare the value between similar products of varying quantities.

          How: You can import these two product attributes. The pricing engine then calculates and returns the price per unit (PPU) via the following APIs:

          • OCAPI
            • Shop API
              • GET /products
              • GET /product_search
            • Data API
              • GET /products
              • POST /product_search
            • Script API
              • dw/catalog/ProductPriceModel
              • dw/catalog/ProductSearchHit

          We don’t currently support the ability for the merchant to directly input the PPU from an external source. Although PPU can be shown as a product attribute in search results or on product list page (PLP), sorting and filtering by PPU is not currently supported. This functionality will be available in the Commerce API in a future release. For more information, see Pricing and Price Books.

          Detailed list of APIs updated:

          • Shop Resources (OCAPI)
          • products_{} with expand=prices
            • GET /products/{id}
            • New fields: "price_per_unit", "price_per_unit_max"
          • products_({}) with expand=prices
            • GET /products/({id})
            • New fields: "price_per_unit", "price_per_unit_max"
          • product_{}_pricesGET /products/{id}/prices
            • New fields: "price_per_unit", "price_per_unit_max"
          • product_search with expand=prices
            • GET /product_search with expand=prices
            • New fields: "price_per_unit", "price_per_unit_max"
          • product_search_prices
            • GET /product_search/prices
            • New fields: "price_per_unit", "price_per_unit_max"
            • Data Resources (OCAPI)
          • products_{} with expand=prices
            • GET /products/{id}
            • New fields: "price_per_unit"
          • product_search with expand=prices
            • POST /product_search
            • New fields: "price_per_unit"
          • dw/catalog/ProductPriceModel (Script API)
            • getPricePerUnit() : Money
            • getPricePerUnit( quantity:Quantity ) : Money
            • getMinPricePerUnit() : Money
            • getMaxPricePerUnit() : Money
            • getPriceBookPrice(priceBookID : String) : Money (TODO in W-7655829)
            • getPriceBookPrice(priceBookID : String, quantity : Quantity) : Money (TODO in W-7655829)
            • getMinPriceBookPrice(priceBookID : String) : Money (TODO in W-7655829)
            • getMaxPriceBookPrice(priceBookID : String) : Money (TODO in W-7655829)
          • dw/catalog/ProductSearchHit (Script API)
            • getMinPricePerUnit() : Money
            • getMaxPricePerUnit() : Money
           
          Loading
          Salesforce Help | Article