November Happy Hour will be moved to Thursday December 5th.

Custom IInventoryService implementation

Vote:
 

I am faced with the task of changing the management of stock, the actual source of the data from which we want to get information on how much product is available is going to be our separate database in Azure, it is the only place where we are supposed to take information about the quantity of products. 

I am wondering how to approach this task, will my own implementation of the IInventoryService interface be sufficient here, in which I will make a request to Azure instead of querying the EpiCommerce tables?

#297864
Mar 07, 2023 13:06
Vote:
 

Yes it should. 

#297865
Mar 07, 2023 14:32
Vote:
 

It is possible to make and register your own implementation of IInventoryService. But:

  • Be aware that its method may be called many times. So consider the impact and maybe apply some caching in strategic places.
  • Consider whether you will be implementing the insert/update/delete methods, since they can be used from the Catalog UI.
  • Consider whether you will be adjusting the inventory in the external stock database. This is used a lot by InventoryRequester and IInventoryProcessor.AdjustInventoryOrRemoveLineItem.
#298245
Mar 13, 2023 19:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.