Page 4 of 4

Re: Retrieving customised inventory prices in bulk

PostPosted: Tue May 23, 2023 6:32 pm
by Mike.Sheen
mls wrote:
Ah. So it seems that my options are:

- fetch priced items one by one
- create/delete stateless Sales Quotes ad hoc
- create a Jiwa plugin to return prices in bulk

Is that correct?


Yes. How are you going to handle quantity prices breaks and price expiry dates?

There are 4 variables needed to determine a price:
  • Inventory Item
  • Debtor
  • Quantity
  • Date

The quantity and date is a bit of a spanner in the works for what you're trying to do. Date you can make a compromise on and assume that if there are any prices dependent on date, that it won't matter as you'll get a new list of prices daily (or something like that).
Quantity, however might be a problem. Perhaps you don't care about quantity price breaks. Perhaps the website only cares about 1, 5 and 10+ quantities - in which case it's a bit easier to manage.

Re: Retrieving customised inventory prices in bulk

PostPosted: Wed May 24, 2023 1:34 pm
by SBarnes
Having seen this issue several times with customers namely with web stores there probably two basic choices.


1. Expose routes for all the pricing tables involved as auto queries and then pull the data say once a day into the external system and then replicate Jiwa's pricing stored procedures, the best option but requiring the most effort.

2. Create a route that takes a debtor id, date and a list of products with their quantities and returns the same list of products with their prices, show the default price and then allow the user to press a button and get their price but also when something is added to the shopping cart get its price, then on check out show the real prices, the upside is less work but not as good.