Stock not decrementing when order created using API

Tourist
3 0 1

Hi,

 

I'm just posting this again as we were being helped on a previous thread but everything went quiet. We've been advised by Shopify support to post this again as they say they're unable to reach out to development support directly.

 

Below is the original thread. 

 

https://community.shopify.com/c/Shopify-APIs-SDKs/Stock-not-decrementing-when-order-created-using-AP...

 

Is there anyone else in the team who's able to help out? Our client who we've built this for has some very important deadlines looming (next week) and we're very keen to get this sorted in time for those. If there's more info required then please do get back to us and we'll get this back to you straight away.

0 Likes
Shopify Partner
1736 48 156

From you linked post:


cjquinn wrote:

The stock level does decrement on the shop that is was created. The issue is that when we create that order on another shop using the API call the stock doesn't decrement there.


Find the denominators:

  • Have you built a reduced test case that reliably produces this?
  • REST or GraphQL
  • Is this a dev store
  • Does this apply to all stores or just one
  • Does this happen for many products|variants
  • Are there other inventory apps that may be conflicting|sync'ing inventory to the wrong levels
  • Is the shop tracking inventory
  • What happens if you use decrement_ignoring_policy
  • What happens if you fiddle with fulfillment parameters
    • is there a fulfillment service 
  • Turn it off and on - set the products inventory_management set to null then back to shopify
    • is inventory management not by shopify
  • Have you validated|linted your code
    • ex: mispelling inventory_behaviour as inventory_behavior 
    • ex: passing wrong value such as passing the product.id instead of the variant.id

also see:

Workaround would probably be to update inventory separately until resolved.

Problem Solved? ✔️Accept the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
0 Likes
Highlighted
Tourist
3 0 1

Hey Paul,

 

Cheers for the response, really appreciate it. Some responses below

 

Have you built a reduced test case that reliably produces this?
Yes

REST or GraphQL
REST

Is this a dev store
All three stores are paid for using the basic monthly account option. The two fake supplier accounts are publicly accessible but the main one is password protected. All order details are coming through using the Stripe test card (4242). Is there a specific dev setting we should be aware of?
https://testbyhumans2.myshopify.com
https://testbyhumans1.myshopify.com
https://wearebyhumans.myshopify.com


Does this apply to all stores or just one

I believe all, but I will check with the client to make sure that this is 100% true

Does this happen for many products|variants

Again, I think it happens for all but I will check. There are only two public products in the system at the moment that can be ordered, one on each supplier site.

Are there other inventory apps that may be conflicting|sync'ing inventory to the wrong levels

There are no extra apps installed on the two supplier sites. The only app installed on the central Shopify account is the DHL Express one which, we'd assume, would not affect this.

Is the shop tracking inventory

Yes, all orderable products on the two supplier sites have defined inventory levels.

What happens if you use decrement_ignoring_policy

Haven’t tried, we were advised to obey the policy so we can try this and see if it makes a difference.

What happens if you fiddle with fulfillment parameters
fulfillment_service is currently manual and the fulfillment_status is set to null.

is inventory management not by shopify

variant_inventory_management is set to “shopify” on each line item.

Have you validated|linted your code

Line items are copied over exactly from the original order so these properties haven’t been altered.

1 Like
Shopify Partner
1736 48 156

 


@mrhaste wrote:

Is there a specific dev setting we should be aware of?


Just trying to nail down the variables, only thing of import probably is if you can freely bash the data around.

 

Thanks for the info.

Goodluck if anything changes please update as so far there's not solution except to probe until the underlying cause is found. NNTR.

Problem Solved? ✔️Accept the solution so you can help others.
Confused? Busy? ? Get me to solve it paull.newton+shopifyforum@gmail.com.
Buy me a coffee? ☕ paypal.me/paulnewton or donate to eff.org
0 Likes