Retrieving customised inventory prices in bulk  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Re: Retrieving customised inventory prices in bulk

Postby Mike.Sheen » Tue May 23, 2023 6:32 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Retrieving customised inventory prices in bulk

Postby SBarnes » Wed May 24, 2023 1:34 pm

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Previous

Return to REST API

Who is online

Users browsing this forum: No registered users and 3 guests