Subscribe


Tags

  • Commerce Server Documentation (0),
  • Architectural and Design (0),
  • Marketing System (0),
  • Orders System (0),
  • Catalog System (0),
  • CS2007 BizTalk Adapters (0),
  • Partner SDK (0),
  • Commerce Server Operations (0),
  • Profile System (0),
  • Migration (0),
  • Commerce Server Staging (0),
  • DWA and Reporting (0),
  • Deployment (0),

March 2010 (2)
February 2010 (9)
July 2010 (8)
August 2010 (8)
June 2010 (1)

Posted Date Published 8/12/2009 12:01:39 PM

Real Time Inventory? Hmm?

Does Commerce Server support real time inventory system? That’s the question of the day and I hope to shed some light on this subject.

Commerce Server Inventory System

The Inventory is a bit different than the other Systems in Commerce Server. In order to use the Inventory System you have to have the Catalog System but the other way is not true. You can have a Catalog System with no Inventory. Even thought there is a relationship between Inventory and Catalog they are two different systems. At least that’s what I used to think.

If you pay attention to the documentation of Commerce Server it’s not very clear about how closely integrated the two systems are. When caching of Catalog System is turned on then the Product object will cache the Inventory data. But what if I want to call the Inventory API so you can only get the Inventory data. What happens then? Well true believers you get the data from cache! Say what? Yes you get the data from the cache. What if I call the Refresh method? Nope, sorry that only refreshes the Inventory object not make a trip back to the database.

Commerce Server’s Real Time Inventory

So how in the world can Commerce Server be real time? The UpdateInventory and CheckInventory pipeline components are real time as they go to the database and call the stored procedures directly. In fact the documentation only notes that these components are real time.

So how do I get the inventory from the database?

Sadly,  you can’t. You have either wait for the data to fall of the cache or create your own stored procedure to fetch the data. A bit disappointing that you have to write custom call to check the inventory levels :(. By the way I looked at how difficult it would be to change this and it’s just an override boolean internally with the Inventory object. The Inventory code is hard coded to check the cache first. Say what!

by Max Akbar | Comments



Comments disabled.