Calculating least cost of a product across stores using OPA
964796Sep 27 2012 — edited Dec 4 2012Hi,
I have been working on POC which needs to return set of store names and least cost for a list of products available in different stores. I m having the following challenges in development.
1. How to return multiple store names in OPA since an attribute holds a single value.
2. Calculating least cost according to the availability in all the stores. How to declaratively do this?
3. How to design the entity model in OPA.
An example of the problem is, an order is placed for products A, B and C with the quantities 1,2,2 of each unit. Assume there are P, Q, R, S and T stores which offer the products A, B and C. Each store maintains its own inventory/stock of each product. The challenge is to fulfill the order requests according to the least cost offerred by a store with the available units of the product's inventory.
It would be very helpful if any reply is posted early.