Real time pricing and inventory

  • Updated

Enabling the real-time pricing and/or inventory service on your website in Optimizely Configured Commerce displays real-time pricing and inventory via calls made to the ERP. The Generic pricing or inventory service, however, depends on recurring integration jobs that typically run once in a 24 hour period. Real Time Inventory Service - Insite behaves like Generic Services and provides decrementing quantity for products in warehouses during checkout.

Typically, implementations set the real-time pricing service to also request the inventory data and place it all in the cache. This allows for the pricing and inventory data to be retrieved quickly. There may be a short lag as the data loads on the page, indicated by an animated ellipses.

Although you can request the pricing and inventory data uniquely via different calls, Optimizely recommends requesting the data within the same call to reduce the pings to the ERP.

Real-time set up

Pricing

To retrieve the pricing data, you must set Pricing Service to RealTime or some other custom-created service. Selecting RealTime or a service other than Generic exposes additional settings.

  1. Go to Admin Console >Administration > Settings.
  2. Search for and select Pricing Service.
  3. Select which pricing service to use. List Price only uses pricing values on the product table. Generic uses the pricing service with C# code for price matrix calculations. RealTime uses a real-time call to an external service. You can also choose StoredProcedure or Sx.

Additional pricing service settings

Additional settings can control the connections and frequency for when pricing calls are made:

  • Connection – Optional connection to the API Endpoint. Only integration jobs with a Type Name of ApiEndpoint populate this field. This optional setting simplifies the process in two ways: removes the need to hard code credentials and allows developers to uniquely define the connection criteria for production and sandbox environments. You can create a new integration connection by going to Admin Console > Connections Add Integration Connection and selecting ApiEndPoint from the Type Name menu. This connection type stores the API address, Username, and Password.
  • Real Time Pricing Service – The real time pricing service name. Default value: Insite
  • Real Time Service Timeout Seconds – The time to wait for real time pricing service to return. Default value: 10
  • Real Time Service Cache Minutes – Number of minutes before caching prices from a real time service. Default value: 60
  • Real Time Service Unavailable Retry Minutes – Number of minutes to wait if the real time service timed out. Default value: 5
  • Real Time Service Delay Seconds – Number of seconds to delay the real time pricing. This is used for testing and should be set to 0 in a production environment. Default value: 0
  • Real Time Pricing Batch Size – How many items at a time should be sent to the ERP for real time pricing calls. Default value: 20

Inventory

To retrieve the inventory data, you must set Inventory Service to RealTime or some other custom-created service. Selecting RealTime or some service other than Generic exposes the additional settings.

  1. Go to Admin Console >Administration >Settings.
  2. Search for and select Inventory Service.
  3. Select RealTime.

Additional inventory service settings

Additional settings can control the connections and frequency for when inventory calls are made:

  • Connection - Optional connection information to the API Endpoint. This allows developers to create a new integration connection to an API endpoint that can then be selected via this setting. This removes the need to hard code necessary credentials. You can create a new integration connection by going to Admin Console > Jobs > Connections Add Integration Connection and selecting ApiEndPoint from the Type Name menu. This connection type stores the API address, Username, and Password.
  • Real Time Inventory Service – The real-time inventory service name. Choosing Insite behaves like Generis Service and provides decrementing quantity for products in warehouses during checkout. Default value: Insite
  • Real Time Service Timeout Seconds – Time to wait for real time inventory service to return. Default value: 10
  • Real Time Service Cache Minutes – Number of minutes before caching inventory from a real time service. Default value: 15
  • Real Time Service Unavailable Retry Minutes – Number of minutes to wait if the real time service timed out. Default value: 5
  • Real Time Service Delay Seconds – Number of seconds to delay the real time inventory. This is used for testing and should be set to 0 in a production environment. Default value: 0
  • Included With Pricing – If Yes, then inventory should be returned with pricing, and the system does not execute the inventory service until pricing is completed. Default value: Off
  • Real Time Inventory Batch Size – How many items at a time should be sent to the ERP for real-time inventory calls. Default value: 20

Add real-time inventory and pricing to SEO product pages

If you want to display real-time inventory and pricing information on your SEO catalog pages, you need to turn on a specific setting. This uses the guest ERP customer pricing to show pricing in search results.

  1. Go to Admin Console > Administration > Settings.
  2. Search for Add Real-Time Inventory and Pricing on SEO Product Pages or go to Site Configurations > SEO.
  3. Change the setting to Yes.
  4. Click Save.

Extensibility

The real-time inventory functionality provides some opportunities for developers to extend the platform. When calls are made to retrieve product inventory, it pulls down a number of collections, such as inventory by warehouse and inventory by unit of measure, which are then interpreted and calculated. The storefront can expose the results of these calculations. For example, you could display the number of items available at each warehouse in various places on the storefront. This example requires that the API call has the data correctly mapped and then exposed via customization made to the desired widget.

Inventory messaging

If inventory is not available, due to the product not being tracked, the service being down, missing inventory information, and so on, there are options and logic for what is displayed on the storefront. For more information, see Overview of Inventory Management.