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 Apr 11, 2023 10:50 am

SBarnes wrote:hence my suggestion it might be the side effect of another plugin


That's my first instinct after reading this topic.

@mls you could try as a test against our public https://api.jiwa.com.au demo API - do you get the error when POSTing there?
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 » Tue Apr 11, 2023 10:52 am

I have been there and done that. :D
And NO you don't.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Retrieving customised inventory prices in bulk

Postby Mike.Sheen » Tue Apr 11, 2023 10:54 am

SBarnes wrote:I have been there and done that. :D
And NO you don't.


thumbs-up.png
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 mls » Tue Apr 11, 2023 12:26 pm

@Mike The Jiwa test API is working for me
mls
Occasional Contributor
Occasional Contributor
 
Posts: 16
Joined: Tue Jul 05, 2022 5:50 am
Topics Solved: 1

Re: Retrieving customised inventory prices in bulk

Postby mls » Thu May 11, 2023 1:07 pm

Update: the problem has now been resolved. Turns out the error message above was very misleading...we finally realised after some detailed troubleshooting that the error was caused by incorrect API user group permissions.
mls
Occasional Contributor
Occasional Contributor
 
Posts: 16
Joined: Tue Jul 05, 2022 5:50 am
Topics Solved: 1

Re: Retrieving customised inventory prices in bulk

Postby Mike.Sheen » Thu May 11, 2023 1:12 pm

mls wrote:Update: the problem has now been resolved. Turns out the error message above was very misleading...we finally realised after some detailed troubleshooting that the error was caused by incorrect API user group permissions.


So - in order for us to improve the message, how would I go about reproducing the issue?
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 mls » Tue May 23, 2023 9:48 am

Mike.Sheen wrote:
mls wrote:Update: the problem has now been resolved. Turns out the error message above was very misleading...we finally realised after some detailed troubleshooting that the error was caused by incorrect API user group permissions.


So - in order for us to improve the message, how would I go about reproducing the issue?


I'm waiting to get clarification on that from the person who manages our Jiwa installation. Will let you know when I get a reply.
mls
Occasional Contributor
Occasional Contributor
 
Posts: 16
Joined: Tue Jul 05, 2022 5:50 am
Topics Solved: 1

Re: Retrieving customised inventory prices in bulk

Postby mls » Tue May 23, 2023 10:28 am

I have some more questions about creating stateful Sales Quotes/Orders to retrieve customised inventory prices in bulk.

Is there any reason to use Sales Quotes rather than Sales Orders (or vice versa)? Or would both work equally well to solve this problem?

Are there any reasons why a request might fail? Perhaps if some of the inventory items are unavailable, or...?

If we end up using this solution, we will be creating a large number of stateful objects...basically every time a customer loads a new page of product listings on the website. How likely is this to cause a problem inside Jiwa? I'm thinking we should be ok if we free up memory by abandoning the Quote/Order immediately after creating it...does that make sense?
mls
Occasional Contributor
Occasional Contributor
 
Posts: 16
Joined: Tue Jul 05, 2022 5:50 am
Topics Solved: 1

Re: Retrieving customised inventory prices in bulk

Postby Mike.Sheen » Tue May 23, 2023 10:58 am

mls wrote:Is there any reason to use Sales Quotes rather than Sales Orders (or vice versa)? Or would both work equally well to solve this problem?


Sales orders will take the stock and make it unavailable to other orders or uses - except if the sales order is a type Forward Order - sales quotes on the other hand, won't take the stock.
If you use sales orders and set it as a Forward order, then it's the same practically as quotes.

mls wrote:Are there any reasons why a request might fail? Perhaps if some of the inventory items are unavailable, or...?

Not really - if a sales order is not a forward order, and you don't have enough stock AND the item(s) are not backorderable items, then you may have a problem setting the quantity - but I'm pretty sure it just adjusts the quantity down and does not throw an exception.[/quote]

mls wrote:If we end up using this solution, we will be creating a large number of stateful objects...basically every time a customer loads a new page of product listings on the website. How likely is this to cause a problem inside Jiwa? I'm thinking we should be ok if we free up memory by abandoning the Quote/Order immediately after creating it...does that make sense?


We've actually removed stateful from the next major release of Jiwa (what will be Version 8) - I think you may now want to steer away from that as a solution.
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 mls » Tue May 23, 2023 11:08 am

Mike.Sheen wrote:We've actually removed stateful from the next major release of Jiwa (what will be Version 8) - I think you may now want to steer away from that as a solution.


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?
mls
Occasional Contributor
Occasional Contributor
 
Posts: 16
Joined: Tue Jul 05, 2022 5:50 am
Topics Solved: 1

PreviousNext

Return to REST API

Who is online

Users browsing this forum: No registered users and 2 guests